大家好,我是烤鸭:

      又到了采坑实录。ngix莫名挂掉 error.log一直出现 signal process started
查看了access.log和error.log

access.log:

43.245.218.208 - - [06/Jan/2019:18:08:43 +0800] "GET / HTTP/1.1" 200 555 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36"
139.162.230.58 - - [06/Jan/2019:18:38:07 +0800] "GET / HTTP/1.0" 200 555 "-" "-"
201.13.175.100 - - [06/Jan/2019:18:41:07 +0800] "GET / HTTP/1.1" 200 555 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/601.7.7 (KHTML, like Gecko) Version/9.1.2 Safari/601.7.7"
80.82.70.187 - - [06/Jan/2019:19:54:35 +0800] "GET http://www.baidu.com/cache/global/img/gs.gif HTTP/1.1" 404 614 "-" "Mozilla" 

error.log:

2019/01/06 09:44:34 [error] 26262#0: *33538 open() "/opt/tools/tengine//html/cache/global/img/gs.gif" failed (2: No such file or directory), client: 80.82.70.187, server: localhost, request: "GET http://www.baidu.com/cache/global/img/gs.gif HTTP/1.1", host: "www.baidu.com"
2019/01/06 19:54:35 [error] 26262#0: *33564 open() "/opt/tools/tengine//html/cache/global/img/gs.gif" failed (2: No such file or directory), client: 80.82.70.187, server: localhost, request: "GET http://www.baidu.com/cache/global/img/gs.gif HTTP/1.1", host: "www.baidu.com"
2019/01/06 20:01:08 [error] 26262#0: *33565 open() "/opt/tools/tengine//html/cache/global/img/gs.gif" failed (2: No such file or directory), client: 80.82.78.50, server: localhost, request: "GET http://www.baidu.com/cache/global/img/gs.gif HTTP/1.1", host: "www.baidu.com"
2019/01/06 22:56:26 [error] 26262#0: *33571 open() "/opt/static/html/film/index.html" failed (2: No such file or directory), client: 120.92.92.251, server: film.7zhanglao.vip, request: "GET / HTTP/1.1", host: "film.7zhanglao.vip"
2019/01/07 00:48:06 [error] 26262#0: *33575 open() "/opt/tools/tengine//html/azenv.php" failed (2: No such file or directory), client: 95.213.177.123, server: localhost, request: "POST http://check.proxyradar.com/azenv.php?auth=154679328611&a=PSCN&i=794688341&p=80 HTTP/1.1", host: "check.proxyradar.com", referrer: "http://best-proxies.ru/"
2019/01/07 02:04:58 [error] 26262#0: *33578 open() "/opt/tools/tengine//html/ccvv" failed (2: No such file or directory), client: 71.6.202.198, server: localhost, request: "GET /ccvv HTTP/1.1", host: "47.93.251.85"
2019/01/07 03:09:24 [error] 26262#0: *33581 open() "/opt/tools/tengine//html/xmlrpc.php" failed (2: No such file or directory), client: 213.174.145.35, server: localhost, request: "GET /xmlrpc.php HTTP/1.1", host: "47.93.251.85"
2019/01/07 06:02:23 [error] 26262#0: *33588 open() "/opt/tools/tengine//html/cache/global/img/gs.gif" failed (2: No such file or directory), client: 80.82.70.187, server: localhost, request: "GET http://www.baidu.com/cache/global/img/gs.gif HTTP/1.1", host: "www.baidu.com"
2019/01/07 10:07:16 [notice] 1393#0: signal process started

可以看得出来两个日志时间上是没有什么交集的。
我这个报错信息是比较明显的,open() "/opt/tools/tengine//logs/nginx.pid" failed (2: No such file or directory)
虽然不知道为什么,配置文件没有改过,运行过一段时间没有问题,昨天第一次出现这个。
莫名其妙的tengine路径后面多了一个/。
原来的conf目录下的nginx.conf文件。

#user  nobody;
worker_processes  1;

error_log   logs/error.log;
#error_log  logs/error.log  notice;
#error_log  logs/error.log  info;

pid         logs/nginx.pid;

修改为

#user  nobody;
worker_processes  1;

error_log  /opt/tools/tengine/logs/error.log;
#error_log  logs/error.log  notice;
#error_log  logs/error.log  info;

pid        /opt/tools/tengine/logs/nginx.pid;


重新启动之后就可以了。

./nginx -c /opt/tools/tengine/conf/nginx.conf

虽然还不知道什么原因导致的nginx挂掉,观察一段时间再看。做个记录。

Logo

开放原子开发者工作坊旨在鼓励更多人参与开源活动,与志同道合的开发者们相互交流开发经验、分享开发心得、获取前沿技术趋势。工作坊有多种形式的开发者活动,如meetup、训练营等,主打技术交流,干货满满,真诚地邀请各位开发者共同参与!

更多推荐