I am testing eventlet out, and I am getting this error:
~>ab -n 10 -c 1 http://localhost:8090/
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Another related bug that is still present in ab
(apache-2.4.29
) is that it takes just the first result from getaddrinfo
. It's probably this bug that is mentioned by Jürgen Strobel in a comment. Let's say you have /etc/hosts
that goes like this:
127.0.0.1 localhost.localdomain localhost
::1 localhost.localdomain localhost
The first result returned by getaddrinfo
for localhost
is ::1
. So ab
tries to connect over IPv6 and fails. The workaround is to use 127.0.0.1
: ab -n 10 127.0.0.1/
. Or reorder the lines. Though, in my case it says:
Benchmarking localhost (be patient)...apr_socket_recv: Connection refused (111)