[Twisted-Python] Unable to start twistd service on Ubuntu 10.04 when using pseudo terminal
powdahound at gmail.com
Mon Sep 27 23:15:15 EDT 2010
To me this seems like a very strange problem and I've tried to debug it best
I can but I don't know much about many of the components at work. Here's
I've been happily using Capistrano to deploy many twistd services to Ubuntu
9.04 machines. It restarts them via an init.d script based off this
I'm running a self-installed Twisted 8.2.0 on both systems with some small
tweaks to logging.
On newer Ubuntu 10.04 machines I've been deploying to the twistd services
don't restart properly. There are no errors in the log. The only log lines
I'd get were:
[-] Log opened.
[-] twistd 8.2.0 (/usr/bin/python 2.6.5) starting up.
[-] reactor class: twisted.internet.epollreactor.EPollReactor.
But they were only failing to restart when run via Capistrano. I realized
that the only difference was that Capistrano was using a pseudo terminal
when it issued its commands. To recreate the problem without Capistrano I
> ssh -t user at host "/etc/init.d/service start"
But it works fine when I run:
> ssh user at host "/etc/init.d/service start"
The 3 log lines I see in the failed case are written by twistd before it
forks (clone() syscall) to create the daemon process. The strace dump of
twistd when run with and without pseudo terminal were identical. I tried
running strace with the -f option to get some info about the child process
but it didn't fail in that case since I guess it doesn't actually fork.
Running in a pseudo terminal with --nodaemon passed to twistd also works
I've tested this with multiple twistd services and am having the same issue
with all of them.
Any ideas? Did I completely misdiagnose the problem? Has there been some
change in this area between Twisted 8.2.0 and 10.x? I'm certainly confused.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Twisted-Python