4

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
4

2 回答 2

2

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/

于 2014-12-05T05:37:38.973 回答
0

在 OSX 10.10.4 更新或重启后看到这个?

在使用系统和 xcode 更新重新启动 OSX 后,我刚刚出现了这个错误。尝试了几件事后,凭直觉,我尝试先运行xcode,然后重新尝试ab。它刚刚奏效。我猜测是否必须像过去那样接受与命令行工具术语的交互,但没有这样的提示。也就是说,在我运行一次 xcode 之后,ab 就可以工作了。万一这对任何人都有帮助...

于 2015-10-04T17:46:59.393 回答