Siege https error: HTTPS requires libssl

FreshSnow picture FreshSnow · Feb 21, 2017 · Viewed 8.4k times · Source

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.

Answer

FreshSnow picture FreshSnow · Feb 23, 2017

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