On 03/10/10 21:33, Juan J. Martínez wrote:
El dom, 03-10-2010 a las 20:58 +1100, David Taylor escribió:
[...]
It does work from the command line.  But when Cherokee does it, it fails.
I can see a difference. Cherokee uses /bin/sh -c exec ...

Any ideas how to debug what's going on in spawn-fcgi?

As far as I can tell, it's not running anything at all:

www-d...@hal:~$ /bin/sh -c exec /usr/bin/spawn-fcgi -n -a 127.0.0.1 -p 53993 -- /usr/bin/python -c "open('/tmp/testing', 'w').write('this is a test under exec\n')"
www-d...@hal:~$ cat /tmp/testing
cat: /tmp/testing: No such file or directory

www-d...@hal:~$ /usr/bin/spawn-fcgi -n -a 127.0.0.1 -p 53993 -- /usr/bin/python -c "open('/tmp/testing', 'w').write('this is a test without exec\n')"
www-d...@hal:~$ cat /tmp/testing
this is a test without exec

How do I begin to debug this?

Is it possible
that there's something in the spawn-fcgi script that makes it behave
differently?

I don't know, may be the PATH it's different and it's failing to execute
something (?).


Possibly, but I can't figure out how to replicate/debug it.

All I know so far is Cherokee fails to exec spawn-fcgi. If I'm reading the output correctly, Cherokee is getting an exit status of 1:

PID 1765: launched '/bin/sh -c exec /usr/bin/spawn-fcgi -n -a 127.0.0.1 -p 53993 -- /usr/share/moin/server/moin.fcg' with uid=33, gid=33, env=inherited
PID 1765: exited re=1

When I become the same user as Cherokee and run the same command as Cherokee I get an exit status of 0:

r...@hal:/etc/moin# su - www-data
www-d...@hal:~$ /bin/sh -c exec /usr/bin/spawn-fcgi -n -a 127.0.0.1 -p 53993 -- /usr/share/moin/server/moin.fcg
www-d...@hal:~$ echo $?
0
www-d...@hal:~$ ps auxw | grep fcg | grep -v grep
www-d...@hal:~$

But still no process.

Any idea how I can figure out why this is failing?

Cheers,
David.

_______________________________________________
Cherokee mailing list
[email protected]
http://lists.octality.com/listinfo/cherokee

Reply via email to