I have a site running PHP 5.3.2 + PHP-FPM and Nginx 0.7.65 and rebooted the server after changing the root password. The web server starts up fine, but the site doesn't come up and the only clue I have is in the web application's log (from Predis, specifically):

/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://", host: "dev.example.com"

It seems the connection is refused on port 9000 for FastCGI. When I run "nmap" I don't see anything for port 9000.

"netstat -ntlp" does show this, though:

Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0  *               LISTEN      1169/munin-node 
tcp        0      0    *               LISTEN      1089/vsftpd     
tcp        0      0    *               LISTEN      985/sshd        
tcp        0      0    *               LISTEN      1076/master     
tcp        0      0*               LISTEN      2309/php5-fpm   
tcp        0      0 *               LISTEN      1297/perl       
tcp        0      0    *               LISTEN      1272/nginx      
tcp6       0      0 :::22                   :::*                    LISTEN      985/sshd

And this is interesting:

# lsof -i tcp:9000
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 ...

Can someone help me narrow down where the problem is here?

  • Nevermind, we fixed it by restarting redis (/etc/init.d/redis restart). Apparently it was not set to start along with nginx and php5-fpm on boot.
    – Devin
    Jun 21, 2011 at 2:31
  • What is the relation of Redis [key-value db] to the network problem? Jul 11, 2011 at 0:32


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.