Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Siege zip encoding disable with zlib installed on mac installed via brew #94

Open
counterbeing opened this issue Jan 4, 2017 · 21 comments

Comments

@counterbeing
Copy link

I've figured this out, but I think maybe it should be documented somewhere, so consider this a request for documentation.

I'm getting Zip encoding disabled; siege requires zlib support to enable it warning when running siege. To fix this:

brew uninstall siege
brew install zlib
brew install --build-from-source siege

Thanks for the great tool!

@JoeDog
Copy link
Owner

JoeDog commented Jan 4, 2017 via email

@counterbeing
Copy link
Author

No problem, thanks for all of the work on this. Seige is super handy, and now at least the problem is google-able. 👍

It just helped me debug some server side caching issues.

@JoeDog
Copy link
Owner

JoeDog commented Jan 4, 2017 via email

@anotheri
Copy link

anotheri commented Jan 5, 2017

unfortunately that fix w/ --build-from-source doesn't work for me:

siege 4.0.2
zlib 1.2.8
macOS 10.12.2

any other suggestions how to fix it?

@JoeDog
Copy link
Owner

JoeDog commented Jan 5, 2017 via email

@anotheri
Copy link

anotheri commented Jan 5, 2017

@JoeDog it shows output like this and no results:

> siege -q -c10 -t10s "http://localhost:3000/"
[alert] Zip encoding disabled; siege requires zlib support to enable it

Lifting the server siege...%

@anotheri
Copy link

anotheri commented Jan 5, 2017

@JoeDog or without -q it looks like this:

> siege -c10 -t10s http://localhost:3000
[alert] Zip encoding disabled; siege requires zlib support to enable it
** SIEGE 4.0.2
** Preparing 10 concurrent users for battle.
The server is now under siege...
HTTP/1.1 200     1.60 secs:  227220 bytes ==> GET  /
HTTP/1.1 200     1.60 secs:  227220 bytes ==> GET  /
HTTP/1.1 200     1.60 secs:  227220 bytes ==> GET  /
HTTP/1.1 200     1.60 secs:  227220 bytes ==> GET  /
HTTP/1.1 200     1.60 secs:  227220 bytes ==> GET  /
HTTP/1.1 200     1.61 secs:  227220 bytes ==> GET  /
HTTP/1.1 200     1.61 secs:  227220 bytes ==> GET  /
HTTP/1.1 200     1.61 secs:  227220 bytes ==> GET  /
HTTP/1.1 200     9.14 secs:  227220 bytes ==> GET  /
HTTP/1.1 200     9.14 secs:  227220 bytes ==> GET  /

Lifting the server siege...

and it is hanging, no results as well.

@JoeDog
Copy link
Owner

JoeDog commented Jan 6, 2017 via email

@ronpeled
Copy link

Just to keep this thread going. Both of these issues are still occurring on MacOS 10.12.3 with latest brew installed. The two issues:

  1. Zip encoding disabled... even if I install zlib and run the --build-from-source command.
  2. if I run a simple benchmarking command with 60 seconds, it hangs and never finishes.

Thanks!

@norbour
Copy link

norbour commented Feb 27, 2017

confused by the same problem

@jonthemiller
Copy link

Same issue on macOS 10.12.2. I have the zlib and lzlib packages also installed with Homebrew. here's the portion of the output from brew install --build-from-source -v siege pertaining to zlib:

checking for zlib support... yes
checking /include/zlib.h usability... no
checking /include/zlib.h presence... no
checking for /include/zlib.h... no
checking /usr/include/zlib.h usability... no
checking /usr/include/zlib.h presence... no
checking for /usr/include/zlib.h... no
checking /usr/local/include/zlib.h usability... no
checking /usr/local/include/zlib.h presence... no
checking for /usr/local/include/zlib.h... no
checking /usr/local/ssl/include/zlib.h usability... no
checking /usr/local/ssl/include/zlib.h presence... no
checking for /usr/local/ssl/include/zlib.h... no
checking /usr/pkg/include/zlib.h usability... no
checking /usr/pkg/include/zlib.h presence... no
checking for /usr/pkg/include/zlib.h... no
checking /usr/lib/zlib/include/zlib.h usability... no
checking /usr/lib/zlib/include/zlib.h presence... no
checking for /usr/lib/zlib/include/zlib.h... no
checking /usr/include/zlib/include/zlib.h usability... no
checking /usr/include/zlib/include/zlib.h presence... no
checking for /usr/include/zlib/include/zlib.h... no
checking /usr/include/include/zlib.h usability... no
checking /usr/include/include/zlib.h presence... no
checking for /usr/include/include/zlib.h... no

@pasha
Copy link

pasha commented Apr 13, 2017

I had similar issues on macOS 10.12.4, where server never finish it's run. After following reinstall instructions in original post, i noticed some warnings about sysctl net.inet.tcp.msl:15000, I updated settings to 1 sec sudo sysctl net.inet.tcp.msl:1000.

@fukuball
Copy link

same as @anotheri

@pwaldo2
Copy link

pwaldo2 commented Jun 20, 2017

I managed to stop getting the zlib warning with a combination of xcode-select --install and updating the TIME_WAIT to 1 second, but I still get a 400 error on my JSON POST test. Sending the JSON over with Postman works just fine.

@jonasanso
Copy link

I followed the instructions and worked nicely for me.
Only detail to add I had an old zlib version and I ran brew upgrade zlib.

Thanks Joe for this great tool.

Note to @pwaldo2 : I am executing a json POST without warnings.

siege -c5 -t1M -H 'Content-Type: application/json' 'http://localhost:9200/user/_search POST { "query": { "query_string": {"query": "daniel"}}}'

@vikas027
Copy link

Didn't worked for me too on OSX 10.14

@emanserav
Copy link

encountering the same problem on OS Mojave , Version 10.14.2 (18C54)

@jasonmccreary
Copy link

jasonmccreary commented Jan 17, 2019

Was encountering the same issues as @jonthemiller noted. Found a potential solution on another projects thread.

tl;dr Xcode command line tools no longer includes the header files. To install them run:

sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target /

After doing so I rebuilt from source with the following output:

checking for zlib support... yes
checking /include/zlib.h usability... no
checking /include/zlib.h presence... no
checking for /include/zlib.h... no
checking /usr/include/zlib.h usability... yes
checking /usr/include/zlib.h presence... yes
checking for /usr/include/zlib.h... yes
checking for ZLIB version... checking for inline... inline

Note: I am not using brew, but my guess is this would resolve the issue there as well as it could resolve the zlib headers from the underlying system files.

@anapsix
Copy link

anapsix commented Feb 25, 2019

I've had to install zlib via brew install zlib, and edit siege recipe with brew edit siege
updated to following

system "./configure", "--disable-dependency-tracking",¬
                      "--prefix=#{prefix}",¬
                      "--mandir=#{man}",¬
                      "--localstatedir=#{var}",¬
                      "--with-ssl=#{Formula["openssl"].opt_prefix}",¬
                      "--with-zlib=#{Formula["zlib"].opt_prefix}"¬

Works as expected after this modification, and installation with brew install siege --build-from-source

@anapsix
Copy link

anapsix commented Feb 26, 2019

confirmed Homebrew/homebrew-core#37342 solves zlib related issue

@mistydemeo
Copy link

I've opened #152 to improve the configure check so it can find macOS's builtin zlib.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests