Reputation: 538
I have a similar issue with this ab is erroring out with apr_socket_recv: Connection refused (61), and I have tried upgrading the new apache bench but the problem still exists. I have no idea whether the problem lies in apache bench or the server. I am using python Gevent Server with bottle framework.
Apache bench version
This is ApacheBench, Version 2.3 <$Revision: 1430300 $>
Trace error
Benchmarking ec2-xx-xx-xx-xx.eu-west-1.compute.amazonaws.com (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
apr_socket_recv: Connection refused (61)
apr_socket_recv: Connection refused (61)
apr_socket_recv: Connection refused (61)
apr_socket_recv: Connection refused (61)
Test aborted after 10 failures
apr_socket_connect(): Operation already in progress (37)
Total of 468 requests completed
Upvotes: 4
Views: 3728
Reputation: 15775
I just had this error show up after an OSX restart with system and xcode updates. After trying several things, on a hunch, I tried running xcode first and then re-tried ab. And it just worked. I was guessing if there was some interaction with command line tool terms had to be accepted as it had been in the past, but there was no such prompt. That said, after I ran xcode once, ab just worked. In case this help anyone ...
Upvotes: 0
Reputation: 9072
Does the hostname for which you're testing with ab have an IPv6 record? I resolved my problems by adding IPv6 configurations to my servers. ab http://111.222.111.222/
worked, but ab http://subdomain.domain.com/
didn't work. subdomain.domain.com
had both IPv4 and IPv6 records, and I changed my configuration:
New, Enabled IPv6 Configuration
server {
listen [80; #IPv4
listen [::]:80; #IPv6
server_name localhost;
...
}
Original, Disabled IPv6 Configuration
server {
listen 80;
server_name localhost;
...
}
More info: http://nginxlibrary.com/enable-ipv6-support/
Upvotes: 1