歡迎您光臨本站 註冊首頁

江湖救急!!nginx問題

←手機掃碼閱讀     火星人 @ 2014-03-04 , reply:0

江湖救急!!nginx問題

我的是用nginx+tomcat 做web的,部署在as5上 nginx-0.6.32的包 ,但是最近nginx無故死掉,小弟是新手啊,希望各位大哥幫忙看看啊
nginx.conf
user www;
#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;


events {
    worker_connections  1024;
}


http {
    include       mime.types;
    default_type  application/octet-stream;

    #log_format  main  '$remote_addr - $remote_user [$time_local] $request '
    #                  '"$status" $body_bytes_sent "$http_referer" '
    #                  '"$http_user_agent" "$http_x_forwarded_for"';

    #access_log  logs/access.log  main;

    sendfile        on;
    #tcp_nopush     on;

    #keepalive_timeout  0;
    keepalive_timeout  65;

    gzip  on;
    gzip_min_length 1100;
    gzip_buffers    4 80k;
    gzip_types     text/plain;
    output_buffers  1 32k;
    postpone_output  1460;


upstream  192.168.212.141 {
     server 192.168.212.139:8080  weight=35;
     server 127.0.0.1:8080       weight=5;
}


   
    server {
        listen       80;
        server_name  211.167.102.54;
        index index.htm index.html index.htm index.php;        
        #charset koi8-r;

        #access_log  logs/host.access.log  main;

        location / {
        #    root   html;
         #   index  index.html index.htm;
           proxy_pass  http://192.168.212.141;
        }
《解決方案》

error.log
2009/06/03 10:43:07 3613#0: *3498 connect() failed (111: Connection refused) while connecting to upstream, client: 218.242.165.8, server: 211.167.102.54, request: "GET /images/left_nav_gkzn.jpg HTTP/1.1", upstream: "http://127.0.0.1:8080/images/left_nav_gkzn.jpg", host: "211.167.102.54", referrer: "http://211.167.102.54/bulletin/list.html"
2009/06/09 10:18:13 11061#0: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 211.167.97.247, server: 211.167.102.54, request: "GET /randImage.jsp HTTP/1.1", upstream: "http://192.168.212.139:8080/randImage.jsp", host: "211.167.102.54", referrer: "http://211.167.102.54/index.htm"
2009/06/09 10:21:25 11089#0: *3 connect() failed (111: Connection refused) while connecting to upstream, client: 211.167.97.247, server: 211.167.102.54, request: "GET /index.htm HTTP/1.1", upstream: "http://192.168.212.139:8080/index.htm", host: "211.167.102.54"
2009/06/09 10:21:38 11089#0: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.212.2, server: 211.167.102.54, request: "GET / HTTP/1.1", upstream: "http://192.168.212.139:8080/", host: "192.168.212.141"
2009/06/09 10:34:41 11177#0: *2 connect() failed (111: Connection refused) while connecting to upstream, client: 211.167.97.247, server: 211.167.102.54, request: "GET /styles/images/tt_top.gif HTTP/1.1", upstream: "http://192.168.212.139:8080/styles/images/tt_top.gif", host: "211.167.102.54", referrer: "http://211.167.102.54/styles/em-package-all.css"
2009/06/09 10:36:29 11177#0: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 211.167.97.247, server: 211.167.102.54, request: "GET /index.htm HTTP/1.1", upstream: "http://192.168.212.139:8080/index.htm", host: "211.167.102.54", referrer: "http://211.167.102.54/index.htm"
2009/06/09 10:36:43 11177#0: *4 connect() failed (111: Connection refused) while connecting to upstream, client: 211.167.97.247, server: 211.167.102.54, request: "GET /undefined HTTP/1.1", upstream: "http://192.168.212.139:8080/undefined", host: "211.167.102.54", referrer: "http://211.167.102.54/index.htm"
2009/06/10 11:37:33 5302#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2009/06/10 11:37:33 5302#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2009/06/10 11:37:33 5302#0: bind() to 0.0.0.0:80 failed (98: Address already in use)





但是,我6.10 號5點多看的時候 nginx還是 在運行的 今天早上來一看就 掛了 ~~~~~~~~~~~~~~~!!
《解決方案》

在線=高手
《解決方案》

bind() to 0.0.0.0:80 failed
已經有80埠監聽了,樓主檢查下
《解決方案》

但是 我沒有啟用其他的程序啊,而且nginx 是一直在跑的 在昨天5點的時候都還是好啊 ,而且netstat -ntlp 一直看到 是nginx在使用80啊
《解決方案》

kill掉nginx,重新啟動nginx
《解決方案》

暈死 剛剛nginx 又掛了 我今天早上啟動的




這是 最新的error.log
2009/06/11 08:53:42 16943#0: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.212.2, server: 211.167.102.54, request: "GET / HTTP/1.0", upstream: "http://127.0.0.1:8080/"
2009/06/11 08:58:42 16943#0: *11 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.212.2, server: 211.167.102.54, request: "GET / HTTP/1.0", upstream: "http://127.0.0.1:8080/"
2009/06/11 09:03:42 16943#0: *14 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.212.2, server: 211.167.102.54, request: "GET / HTTP/1.0", upstream: "http://127.0.0.1:8080/"
2009/06/11 09:08:42 16943#0: *17 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.212.2, server: 211.167.102.54, request: "GET / HTTP/1.0", upstream: "http://127.0.0.1:8080/"
2009/06/11 09:13:42 17094#0: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.212.2, server: 211.167.102.54, request: "GET / HTTP/1.0", upstream: "http://127.0.0.1:8080/"
2009/06/11 09:38:58 17094#0: *26 connect() failed (111: Connection refused) while connecting to upstream, client: 218.242.165.8, server: 211.167.102.54, request: "GET /images/left_nav_jmsh.jpg HTTP/1.1", upstream: "http://127.0.0.1:8080/images/left_nav_jmsh.jpg", host: "211.167.102.54", referrer: "http://211.167.102.54/index.htm"
2009/06/11 09:39:10 17094#0: *86 connect() failed (111: Connection refused) while connecting to upstream, client: 218.242.165.8, server: 211.167.102.54, request: "GET /account/activate/show.html HTTP/1.1", upstream: "http://127.0.0.1:8080/account/activate/show.html", host: "211.167.102.54", referrer: "http://211.167.102.54/index.htm?login_error=2
《解決方案》

檢查下192.168.212.2是否正常
《解決方案》

內網的網關 路由器
《解決方案》

不知道與nagios 有關係沒啊
tail /var/log/messages 一直報



Jun 12 00:02:02 ORIENTPAY2 snmpd: error on subcontainer 'ia_addr' insert (-1)
Jun 12 00:02:02 ORIENTPAY2 snmpd: error on subcontainer '' insert (-1)
Jun 12 00:02:32 ORIENTPAY2 snmpd: netsnmp_assert index == tmp failed if-mib/data_access/interface.c:467 _access_interface_entry_save_name()
Jun 12 00:02:32 ORIENTPAY2 snmpd: netsnmp_assert __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (rowreq_ctx->data.ifentry->name) && __builtin_constant_p (ifentry->name) && (__s1_len = strlen (rowreq_ctx->data.ifentry->name), __s2_len = strlen (ifentry->name), (!((size_t)(const void *)((rowreq_ctx->data.ifentry->name) + 1) - (size_t)(const void *)(rowreq_ctx->data.ifentry->name) == 1) || __s1_len >= 4) && (!((size_t)(const void *)((ifentry->name) + 1) - (size_t)(const void *)(ifentry->name) == 1) || __s2_len >= 4)) ? __builtin_strcmp (rowreq_ctx->data.ifentry->name, ifentry->name) : (__builtin_constant_p (rowreq_ctx->data.ifentry->name) && ((size_t)(const void *)((rowreq_ctx->data.ifentry->name) + 1) - (size_t)(const void *)(rowreq_ctx->data.ifentry->name) == 1) && (__s1_len = strlen (rowreq_ctx->data.ifentry->name), __s1_len < 4) ? (__builtin_constant_p (ifentry->name) && ((size_t)(const void *)((ifentry->name) + 1) - (size_t)(const void *)(ifentry->name) == 1) ? __builtin_strcmp (rowreq_c
Jun 12 00:02:32 ORIENTPAY2 snmpd: error on subcontainer 'ia_addr' insert (-1)
Jun 12 00:02:32 ORIENTPAY2 snmpd: error on subcontainer '' insert (-1)
Jun 12 00:03:02 ORIENTPAY2 snmpd: netsnmp_assert index == tmp failed if-mib/data_access/interface.c:467 _access_interface_entry_save_name()
Jun 12 00:03:02 ORIENTPAY2 snmpd: netsnmp_assert __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (rowreq_ctx->data.ifentry->name) && __builtin_constant_p (ifentry->name) && (__s1_len = strlen (rowreq_ctx->data.ifentry->name), __s2_len = strlen (ifentry->name), (!((size_t)(const void *)((rowreq_ctx->data.ifentry->name) + 1) - (size_t)(const void *)(rowreq_ctx->data.ifentry->name) == 1) || __s1_len >= 4) && (!((size_t)(const void *)((ifentry->name) + 1) - (size_t)(const void *)(ifentry->name) == 1) || __s2_len >= 4)) ? __builtin_strcmp (rowreq_ctx->data.ifentry->name, ifentry->name) : (__builtin_constant_p (rowreq_ctx->data.ifentry->name) && ((size_t)(const void *)((rowreq_ctx->data.ifentry->name) + 1) - (size_t)(const void *)(rowreq_ctx->data.ifentry->name) == 1) && (__s1_len = strlen (rowreq_ctx->data.ifentry->name), __s1_len < 4) ? (__builtin_constant_p (ifentry->name) && ((size_t)(const void *)((ifentry->name) + 1) - (size_t)(const void *)(ifentry->name) == 1) ? __builtin_strcmp (rowreq_c
Jun 12 00:03:02 ORIENTPAY2 snmpd: error on subcontainer 'ia_addr' insert (-1)
Jun 12 00:03:02 ORIENTPAY2 snmpd: error on subcontainer '' insert (-1)



一直反覆的報錯

error on subcontainer 'ia_addr' insert (-1)
error on subcontainer '' insert (-1)

不知道 與nginx 有關係沒?????

[火星人 ] 江湖救急!!nginx問題已經有964次圍觀

http://coctec.com/docs/service/show-post-22125.html