Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Following some nice instructions I am almost through setting up PHP to run on nginx. However, every time I try to start spawn-fcgi I get an error message

demo@desktop:/usr/bin$ sudo /etc/init.d/php-fastcgi start
spawn-fcgi: bind failed: Cannot assign requested address

My /etc/init.d/php-fastcgi startup script is:

case "$1" in
      killall -9 php5-cgi
      killall -9 php5-cgi
      echo "Usage: php-fastcgi {start|stop|restart}"
      exit 1
exit $RETVAL
console output

which loads /usr/bin/php-fastcgi

/usr/bin/spawn-fcgi -a -p 9000 -C 6 -u demo -f /usr/bin/php5-cgi

One thing to note is that I am running the PHP cgi as the user "demo" which is my account.


I manually ran the spawn-fcgi command and it worked. Strange...

sudo /usr/bin/spawn-fcgi -a -p 9000 -C 6 -u demo -f /usr/bin/php5-cgi
share|improve this question
up vote 3 down vote accepted

Is something else listening on port 9000?

netstat -tnap | grep LIST grep 9000

On the other hand, I'd recommend to strace the start script to check the system calls:

sudo strace -f -o strace.output /etc/init.d/php-fastcgi start

Then take a look at the file strace.output, especially the last few lines. strace is always good to "enlighten" the way :)

Hope this helps.

share|improve this answer
netstat returns nothing and I think if the port was used spawn-fcgi would say something like "port already in use". I tried strace and ended up with a file thousands and thousands of lines long. O_o – Xeoncross May 24 '10 at 2:24
@Xenocross: Indeed, but I've seen some misleading error messages confusing ports and address :) – Marco Ramos May 24 '10 at 10:12
The netstat command should read: netstat -tnap | grep LIST | grep 9000 – Datageek Dec 19 '11 at 22:59

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.