VPS侦探论坛

 找回密码
 注册
查看: 5216|回复: 5

求助,这是什么原因啊

[复制链接]
发表于 2015-3-28 17:09:03 | 显示全部楼层 |阅读模式

用的 LNMP1.1 默认就是php-fpm啊  没有php-cgi啊 另一个服务器新安装的也没有发现有啊

access.log 日志从2015年就一直是记录的这样内容
113.215.11.149 - - [26/Mar/2015:20:48:31 +0800] "GET / HTTP/1.1" 403 162 "-" "nws" -
113.215.11.149 - - [26/Mar/2015:20:48:31 +0800] "\x00" 400 166 "-" "-" -
183.224.43.65 - - [26/Mar/2015:20:48:31 +0800] "GET / HTTP/1.1" 403 162 "-" "nws" -
183.224.43.65 - - [26/Mar/2015:20:48:32 +0800] "\x00" 400 166 "-" "-" -
124.228.42.54 - - [26/Mar/2015:20:48:32 +0800] "GET / HTTP/1.1" 403 162 "-" "nws" -
124.228.42.54 - - [26/Mar/2015:20:48:32 +0800] "\x00" 400 166 "-" "-" -
211.162.54.53 - - [26/Mar/2015:20:48:32 +0800] "GET / HTTP/1.1" 403 162 "-" "nws" -
211.162.54.53 - - [26/Mar/2015:20:48:32 +0800] "\x00" 400 166 "-" "-" -

nginx_error.log 一直是这样的内容
2015/01/20 21:33:09 [crit] 1180#0: *1 connect() to unix:/tmp/php-cgi.sock failed (2: No such file or directory) while connecting to upstream, client: 42.121.43.140, server: www.XXX.com, request: "GET / HTTP/1.0", upstream: "fastcgi://unix:/tmp/php-cgi.sock:", host: "www.XXX.com"
2015/01/20 21:33:09 [crit] 1180#0: *2 connect() to unix:/tmp/php-cgi.sock failed (2: No such file or directory) while connecting to upstream, client: 42.121.43.140, server: www.XXX.com, request: "GET / HTTP/1.0", upstream: "fastcgi://unix:/tmp/php-cgi.sock:", host: "www.XXX.com"
2015/01/20 21:33:09 [crit] 1180#0: *5 connect() to unix:/tmp/php-cgi.sock failed (2: No such file or directory) while connecting to upstream, client: 42.121.43.140, server: www.XXX.com, request: "GET / HTTP/1.0", upstream: "fastcgi://unix:/tmp/php-cgi.sock:", host: "www.XXX.com"
2015/01/20 21:33:09 [crit] 1180#0: *6 connect() to unix:/tmp/php-cgi.sock failed (2: No such file or directory) while connecting to upstream, client: 42.121.43.140, server: www.XXX.com, request: "GET / HTTP/1.0", upstream: "fastcgi://unix:/tmp/php-cgi.sock:", host: "www.XXX.com"
2015/03/02 18:50:22 [crit] 1268#0: *1 connect() to unix:/tmp/php-cgi.sock failed (2: No such file or directory) while connecting to upstream, client: 125.107.94.50, server: www.XXX.com, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/tmp/php-cgi.sock:", host: "www.XXX.com"
2015/03/02 18:50:22 [crit] 1268#0: *3 connect() to unix:/tmp/php-cgi.sock failed (2: No such file or directory) while connecting to upstream, client: 125.107.94.50, server: www.XXX.com, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/tmp/php-cgi.sock:", host: "www.XXX.com"
2015/03/02 18:50:22 [crit] 1268#0: *4 connect() to unix:/tmp/php-cgi.sock failed (2: No such file or directory) while connecting to upstream, client: 125.107.94.50, server: www.XXX.com, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/tmp/php-cgi.sock:", host: "www.XXX.com"
2015/03/02 18:50:22 [crit] 1268#0: *5 connect() to unix:/tmp/php-cgi.sock failed (2: No such file or directory) while connecting to upstream, client: 125.107.94.50, server: www.XXX.com, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/tmp/php-cgi.sock:", host: "www.XXX.com
中间略..................................................
2015/03/25 18:14:29 [crit] 31379#0: *10065 connect() to unix:/tmp/php-cgi.sock failed (2: No such file or directory) while connecting to upstream, client: 180.153.81.158, server: www.XXX.com, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/tmp/php-cgi.sock:", host: "www.XXX.com"
2015/03/25 18:14:29 [crit] 31379#0: *10067 connect() to unix:/tmp/php-cgi.sock failed (2: No such file or directory) while connecting to upstream, client: 61.155.149.57, server: www.XXX.com, request: "GET /space-username-hwqjrmdu.html HTTP/1.1", upstream: "fastcgi://unix:/tmp/php-cgi.sock:", host: "www.XXX.com", referrer: "http://www.XXX.com/space-username-hwqjrmdu.html"
2015/03/25 18:14:29 [crit] 31379#0: *10069 connect() to unix:/tmp/php-cgi.sock failed (2: No such file or directory) while connecting to upstream, client: 117.34.28.63, server: www.XXX.com, request: "GET /forum.php HTTP/1.1", upstream: "fastcgi://unix:/tmp/php-cgi.sock:", host: "www.XXX.com"
2015/03/25 18:14:29 [crit] 31379#0: *10072 connect() to unix:/tmp/php-cgi.sock failed (2: No such file or directory) while connecting to upstream, client: 117.34.28.63, server: www.XXX.com, request: "GET /forum.php HTTP/1.1", upstream: "fastcgi://unix:/tmp/php-cgi.sock:", host: "www.XXX.com"
2015/03/25 18:14:29 [crit] 31379#0: *10074 connect() to unix:/tmp/php-cgi.sock failed (2: No such file or directory) while connecting to upstream, client: 117.34.28.63, server: www.XXX.com, request: "GET /forum.php HTTP/1.1", upstream: "fastcgi://unix:/tmp/php-cgi.sock:", host: "www.XXX.com"

怎么回事呀哪里有问题,求帮忙  该怎么解决啊 在这里O(∩_∩)O谢谢大家了  稍后补上修改配置文件
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2015-3-28 17:12:13 | 显示全部楼层

php-fpm配置文件



[global]
pid = /usr/local/php/var/run/php-fpm.pid
error_log = /usr/local/php/var/log/php-fpm.log
log_level = notice

[www]
listen = /tmp/php-cgi.sock
listen.backlog = -1
listen.allowed_clients = 127.0.0.1
listen.owner = www
listen.group = www
listen.mode = 0666
user = www
group = www
pm = dynamic
pm.max_children = 10
pm.start_servers = 1
pm.min_spare_servers = 1
pm.max_spare_servers = 10
request_terminate_timeout = 100
request_slowlog_timeout = 0
slowlog = var/log/slow.log
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2015-3-28 17:15:33 | 显示全部楼层

nginx配置文件


ser  www www;

worker_processes auto;

error_log  /home/wwwlogs/nginx_error.log  crit;

pid        /usr/local/nginx/logs/nginx.pid;

#Specifies the value for maximum file descriptors that can be opened by this process.
worker_rlimit_nofile 65535;

events
        {
                use epoll;
                worker_connections 65535;
                multi_accept on;
        }

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

                server_names_hash_bucket_size 128;
                client_header_buffer_size 32k;
                large_client_header_buffers 4 32k;
                client_max_body_size 50m;

                sendfile on;
                tcp_nopush     on;

                keepalive_timeout 60;

                tcp_nodelay on;

                fastcgi_connect_timeout 300;
                fastcgi_send_timeout 300;
                fastcgi_read_timeout 300;
                fastcgi_buffer_size 64k;
                fastcgi_buffers 4 64k;
                fastcgi_busy_buffers_size 128k;
                fastcgi_temp_file_write_size 256k;

                gzip on;
                gzip_min_length  1k;
                gzip_buffers     4 16k;
                gzip_http_version 1.0;
                gzip_comp_level 2;
                gzip_types       text/plain application/x-javascript text/css application/xml;
                gzip_vary on;
                gzip_proxied        expired no-cache no-store private auth;
                gzip_disable        "MSIE [1-6].";

                #limit_conn_zone $binary_remote_addr zone=perip:10m;
                ##If enable limit_conn_zone,add "limit_conn perip 10;" to server section.

                server_tokens off;
                #log format
                log_format  access  '$remote_addr - $remote_user [$time_local] "$request" '
             '$status $body_bytes_sent "$http_referer" '
             '"$http_user_agent" $http_x_forwarded_for';

server
        {
                listen 80 default;
                #listen [::]:80 default ipv6only=on;
                server_name www.lnmp.org;
                index index.html index.htm index.php;
                root  /home/wwwroot/default;

                #error_page   404   /404.html;
                location ~ [^/].php(/|$)
                        {
                                # comment try_files $uri =404; to enable pathinfo
                                try_files $uri =404;
                                fastcgi_pass  unix:/tmp/php-cgi.sock;
                                fastcgi_index index.php;
                                include fastcgi.conf;
                                #include pathinfo.conf;
                        }

                location /nginx_status {
                        stub_status on;
                        access_log   off;
                }

                location ~ .*.(gif|jpg|jpeg|png|bmp|swf)$
                        {
                                expires      30d;
                        }

                location ~ .*.(js|css)?$
                        {
                                expires      12h;
                        }

                access_log  /home/wwwlogs/access.log  access;
        }
include vhost/*.conf;
}
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2015-3-28 21:06:16 | 显示全部楼层



connect() to unix:/tmp/php-cgi.sock failed (2: No such file or directory) 说明你的php-fpm挂掉了
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2015-3-29 23:26:51 | 显示全部楼层

回复 4# 的帖子


奇怪的是网站一直访问正常啊 只是云监控会经常发服务器响应超时丢包的告警邮件,用top命令也可以看到php-fpm的进程,便一直没有当回事
可是每次看到日志这样报错又觉得不应该不管它,

请问军哥 这个问题该怎么解决修复,我还是个新手 能告诉一下具体操作方法及相关命令吗,在此谢过了...

军哥运维代购:http://shop63846532.taobao.com/

发表于 2015-3-30 09:22:12 | 显示全部楼层

只按日志看是有执行很长的程序,可以自己开慢日志看看是什么程序
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2024-11-16 09:28 , Processed in 0.027132 second(s), 16 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表