nginx的error日志里经常报错
2011/09/27 13:03:47 [error] 17493#0: *7438996 connect() failed (111: Connection refused) while connecting to upstream, client: 180.168.109.106, server: mysite.com, request: "GET /favicon.ico HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "mysite.com"
2011/09/27 13:03:48 [error] 17493#0: *7438996 connect() failed (111: Connection refused) while connecting to upstream, client: 180.168.109.106, server: mysite.com, request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "mysite.com"
2011/09/27 13:03:49 [error] 17493#0: *7438996 connect() failed (111: Connection refused) while connecting to upstream, client: 180.168.109.106, server: mysite.com, request: "GET /favicon.ico HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "mysite.com"
php-fpm的 ERROR级别的日志是,
[27-Sep-2011 12:08:02] ERROR: bind() for address '127.0.0.1:9000' failed: Address already in use (98)
[27-Sep-2011 12:30:04] ERROR: bind() for address '127.0.0.1:9000' failed: Address already in use (98)
[27-Sep-2011 12:40:04] ERROR: bind() for address '127.0.0.1:9000' failed: Address already in use (98)
[27-Sep-2011 12:50:04] ERROR: bind() for address '127.0.0.1:9000' failed: Address already in use (98)
[27-Sep-2011 12:57:04] ERROR: bind() for address '127.0.0.1:9000' failed: Address already in use (98)
[27-Sep-2011 13:03:04] ERROR: bind() for address '127.0.0.1:9000' failed: Address already in use (98)
[27-Sep-2011 13:03:04] ERROR: bind() for address '127.0.0.1:9000' failed: Address already in use (98)
偶尔出现
[26-Sep-2011 17:48:24] ERROR: ptrace(PEEKDATA) failed: Input/output error (5)
[26-Sep-2011 17:49:04] ERROR: bind() for address '127.0.0.1:9000' failed: Address already in use (98)
[26-Sep-2011 17:49:32] ERROR: ptrace(PEEKDATA) failed: Input/output error (5)
[26-Sep-2011 17:49:33] ERROR: ptrace(PEEKDATA) failed: Input/output error (5)
[26-Sep-2011 17:49:42] ERROR: ptrace(PEEKDATA) failed: Input/output error (5)
nginx一直报错, 请帮忙看看日志,怎么解决
-
- 帖子: 6
- 注册时间: 2010-11-26 15:48
- missU
- 帖子: 1610
- 注册时间: 2010-03-28 16:16
- 来自: 你知道么?
Re: nginx一直报错, 请帮忙看看日志,怎么解决
ERROR: bind() for address '127.0.0.1:9000' failed: Address already in use (98)
很明显9000端口被占用。
3个解决办法
1 在nginx.conf中换个php的端口试试
2 实在不行还有sock方式。
3 杀死那个占用9000端口的程序。
选择题,lz去选吧。
很明显9000端口被占用。
3个解决办法
1 在nginx.conf中换个php的端口试试
2 实在不行还有sock方式。
3 杀死那个占用9000端口的程序。
选择题,lz去选吧。
代码: 全选
shutdown -h now && 睡觉
-
- 帖子: 6
- 注册时间: 2010-11-26 15:48
Re: nginx一直报错, 请帮忙看看日志,怎么解决
sock方式应该怎么做呢?
怎么做到在出现错误的时候自动杀死那个占用9000端口的程序,然后能正常启动
怎么做到在出现错误的时候自动杀死那个占用9000端口的程序,然后能正常启动
- missU
- 帖子: 1610
- 注册时间: 2010-03-28 16:16
- 来自: 你知道么?
Re: nginx一直报错, 请帮忙看看日志,怎么解决
人工智能?怎么做到在出现错误的时候自动杀死那个占用9000端口的程序,然后能正常启动
俺不会。
代码: 全选
shutdown -h now && 睡觉
-
- 帖子: 6
- 注册时间: 2010-11-26 15:48
Re: nginx一直报错, 请帮忙看看日志,怎么解决
那sock方式应该怎么做呢?
-
- 帖子: 3
- 注册时间: 2011-10-23 17:58
Re: nginx一直报错, 请帮忙看看日志,怎么解决
。。。配置 php-fpm 文件 将 127.0.0.1:9000 换掉 可以换 端口 也可 换sock 的 绝对 路径
- xyy_xx
- 帖子: 344
- 注册时间: 2008-09-17 13:37
- 系统: arch|centos
Re: nginx一直报错, 请帮忙看看日志,怎么解决
代码: 全选
sudo vim /etc/php/php-fpm.conf
代码: 全选
listen = 127.0.0.1:9000
listen = /var/run/php-fpm/php-fpm.sock
拥有书籍并不表示拥有知识;拥有知识并不表示拥有技能;拥有技能并不表示拥有文化;拥有文化并不表示拥有智慧
渣浪:@CodewalkerDotMe
推特:@codewalkertse
博客:http://codewalker.me/
渣浪:@CodewalkerDotMe
推特:@codewalkertse
博客:http://codewalker.me/