我有一个运行 PHP 5.3.2 + PHP-FPM 和 Nginx 0.7.65 的网站,在更改 root 密码后重新启动了服务器。Web 服务器启动正常,但网站没有出现,我唯一的线索是在 Web 应用程序的日志中(具体来说来自 Predis):
/home/myapp/dev/releases/20110520160839/components/Predis/Predis.php(1250): Predis\TcpConnection->w in /home/myapp/dev/releases/20110520160839/components/Predis/Predis.php on line 1259" while reading response header from upstream, client: 69.X.X.X, server: dev.example.com, request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "dev.example.com"
似乎 FastCGI 的 9000 端口连接被拒绝了。当我运行“nmap 127.0.0.1”时,9000 端口上没有显示任何内容。
但是“netstat -ntlp”确实显示了这一点:
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:4949 0.0.0.0:* LISTEN 1169/munin-node
tcp 0 0 0.0.0.0:21 0.0.0.0:* LISTEN 1089/vsftpd
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 985/sshd
tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN 1076/master
tcp 0 0 127.0.0.1:9000 0.0.0.0:* LISTEN 2309/php5-fpm
tcp 0 0 0.0.0.0:10000 0.0.0.0:* LISTEN 1297/perl
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 1272/nginx
tcp6 0 0 :::22 :::* LISTEN 985/sshd
这很有趣:
# lsof -i tcp:9000
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
php5-fpm 1331 root 6u IPv4 4810 TCP localhost:9000 (LISTEN)
php5-fpm 1332 theuser 0u IPv4 4810 TCP localhost:9000 (LISTEN)
php5-fpm 1333 theuser 0u IPv4 4810 TCP localhost:9000 (LISTEN)
php5-fpm 1334 theuser 0u IPv4 4810 TCP localhost:9000 (LISTEN)
php5-fpm 1335 theuser 0u IPv4 4810 TCP localhost:9000 (LISTEN)
... 20 more lines like that ...
有人能帮助我缩小问题的范围吗?