Siege https error: HTTPS requires libssl
Asked Answered
L

3

7

I am having trouble getting siege to work with https. Running Siege 4.0.2 on Ubuntu 16.04 LTS with OpenSSL 1.0.2g preinstalled and libssl-dev 1.0.2g-1ubuntu4.6.

The errors
When I run it, I get a lot of these errors:
[error] HTTPS requires libssl: Unable to reach www.mysite.com with this protocol: Transport endpoint is already connected

And a couple of these
[error] descriptor table full sock.c:133: Too many open files

Then finally
libgcc_s.so.1 must be installed for pthread_cancel to work
[1] 18421 abort (core dumped) sudo siege -t 5M -d1 -c200 -f urls-f1.txt

My research
I found a couple of answers online for getting siege to work with https. For example, this thread on stackoverflow that says "configure using the --with-ssl option. Additionally, the openssl development headers must be installed".

Perhaps the best source is the INSTALL file in the siege package itself, which says:
To enable https, you must have ssl installed on your system. Get the latest version from http://www.openssl.org. AFTER ssl is installed, then you have to configure siege to use it:

$ ./configure --prefix=/some/dir --with-ssl=/ssl/install/dir

The openssl default installation is /usr/local/ssl. If you installed openssl in that directory, then you would configure siege like this:

$ ./configure --prefix=/some/dir --with-ssl=/usr/local/ssl
$ make
$ make uninstall (if you have a previous version already installed)
$ make install

I tried all these suggestions and found a couple more which said the same. But still I am stuck with the errors shown above. Perhaps I missed something or the latest software or OS has an issue. The next section shows what I did to set up the machine.

How I set up the machine
I am using a new VPS on DigitalOcean with Ubuntu 16.04.1 preinstalled. After setting up an additional user, SSH access and firewall, this is what I did to setup siege.

  1. Update system
    sudo apt-get update && sudo apt-get upgrade --show-upgraded

  2. Install GNU Compiler Collection
    sudo apt-get install build-essential

  3. Install openssl development headers package
    sudo apt-get install libssl-dev

  4. Download siege and extract
    wget http://download.joedog.org/siege/siege-latest.tar.gz
    tar -zxvf siege-latest.tar.gz

  5. Configure and install siege
    cd siege-*/
    find where openssl resides:
    which openssl use this info for the with-ssl flag
    ./configure --with-ssl=/usr/bin/openssl
    make
    sudo make install

My question
Please help me to get siege working with https URLs. In answering this question, please know that I am quite new to Linux admin stuff, so details on what to do are much appreciated.

Laceylach answered 21/2, 2017 at 12:39 Comment(3)
Did you get this working? running into similar issue, and following their wiki for the setup :S wiki.mikejung.biz/SiegeGorgeous
@kafka: yes I did get it working, see my answer belowLaceylach
thanks, i did try that but to no avail. turned out we were able to use HTTP urls instead so just went with that!Gorgeous
L
9

Turns out the --prefix was needed to link up the libraries in my system. Even though installing seems to work fine and without errors if you don't supply that info. I set the prefix to the directory that siege was installing to before I supplied the prefix. So the installation ended up in the same directory but now it works with https.

This worked for me:

$ ./configure --prefix=/usr/local --with-ssl=/usr/bin/openssl
$ make
$ sudo make install
Laceylach answered 23/2, 2017 at 9:23 Comment(0)
G
5

Do a 'make clean' before 'make install' to remove objects compiled without ssl support:

  1. cd siege-*/
  2. sudo make clean
  3. sudo make install
Garwin answered 21/2, 2017 at 23:5 Comment(1)
that's the one, make clean, the ./configure with the ssl params, then make installSattler
I
0

I first uninstalled whatever I had tried to install first, then I simply used Brew to install siege

brew install siege

and it worked out of the box

Innermost answered 1/2, 2022 at 11:28 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.