次奥,这个必须要记一下……关于nginx错误110: Connection timed out
2012-11-11 19:22
886 查看
一下午啊一下午!!!
找尽原因!!!
nginx和php装好,配置好,各种优化,完成之后,网站就是无法打开,怎样调试,怎么访问都是无响应,都是报499错误
access.log
error.log
最后还重新编译的nginx,加上了debug,几次重试之后,发现error.log里有这么一句:
注意那个Connection time out,光看这,你可能会直接去查php-fpm的日志,你会发现什么都没有,一切正常,但是就是连不上9000端口,但我一直觉得是php或者nginx的问题,又将平台转移到本地(前面是我买的vps)虚拟机,将配置文件导入,打开,一切ok啊……
直接说了吧,最后以关键字Connection time out在Google查了一下,“http://houwenhui.gotoip2.com/archives/1621” 看了这哥们儿的blog,才恍然大悟……
其实是iptables的问题,我用的ubuntu平台,没有iptable的默认策略,后来我自己加的策略,也都只是针对外网的,启动之后,本机内的环回借口通讯被阻挡了,但是本地的centos就不同,因为有默认的策略,本身就有这条,行了,这一下午也没白费……最后在iptables加入:
一切搞定……
找尽原因!!!
nginx和php装好,配置好,各种优化,完成之后,网站就是无法打开,怎样调试,怎么访问都是无响应,都是报499错误
access.log
x.x.x.x - - [11/Nov/2012:14:55:57 +0400] "GET / HTTP/1.1" 499 0 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)"
error.log
2012/11/11 15:07:46 [info] 20091#0: *74 client prematurely closed connection while reading client request line, client: x.x.x.x, server: localhost 2012/11/11 15:07:56 [info] 20091#0: *76 client prematurely closed connection while reading client request line, client: x.x.x.x, server: localhost
最后还重新编译的nginx,加上了debug,几次重试之后,发现error.log里有这么一句:
2012/11/11 15:04:32 [error] 20091#0: *69 connect() failed (110: Connection timed out) while connecting to upstream, client: x.x.x.x, server: localhost, request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "x.x.x.x"
注意那个Connection time out,光看这,你可能会直接去查php-fpm的日志,你会发现什么都没有,一切正常,但是就是连不上9000端口,但我一直觉得是php或者nginx的问题,又将平台转移到本地(前面是我买的vps)虚拟机,将配置文件导入,打开,一切ok啊……
直接说了吧,最后以关键字Connection time out在Google查了一下,“http://houwenhui.gotoip2.com/archives/1621” 看了这哥们儿的blog,才恍然大悟……
其实是iptables的问题,我用的ubuntu平台,没有iptable的默认策略,后来我自己加的策略,也都只是针对外网的,启动之后,本机内的环回借口通讯被阻挡了,但是本地的centos就不同,因为有默认的策略,本身就有这条,行了,这一下午也没白费……最后在iptables加入:
iptables -A INPUT -i lo -j ACCEPT
一切搞定……
相关文章推荐
- nginx php-fpm 110: Connection timed out) while connecting to upstream 错误
- nginx 无法解析php,(110: Connection timed out)
- Nginx报错:upstream timed out (110: Connection timed out)和client intended to send too large body【转】
- Nginx Upstream timed out (110: Connection timed out)
- nginx 报错 upstream timed out (110: Connection timed out)解决方案【转】
- nginx upstream timed out (110: Connection timed out) while reading response header from upstream
- (110) Connection timed out的错HttpClient 每次请求未close导致 Nginx connect failed (110- Connection timed out)
- nginx之connect() failed (110: Connection timed out) while connecting to upstream
- nginx 报错 upstream timed out (110: Connection timed out)解决方案
- nginx 报错 upstream timed out (110: Connection timed out)解决方案
- nginx 报错 upstream timed out (110: Connection timed out)解决方案
- Nginx报错:upstream timed out (110: Connection timed out)
- Nginx报错:upstream timed out (110: Connection timed out)
- nginx upstream timed out 错误
- ab)测试报错: apr_socket_recv: Connection timed out (110)
- 大数据【关于ssh: connect to host master port 22: Connection timed out问题的总结】
- 关于ssh: connect to host master port 22: Connection timed out问题的总结
- 使用apache benchmark(ab) 测试报错: apr_socket_recv: Connection timed out (110)
- DownloadError: android.googlesource.com: <urlopen error [Errno 110] Connection timed out>
- docker “FATA[0162] ... connection timed out" 错误改正方法