Open dnd opened 9 years ago
server start
in flapjack v1 is daemonized, you'd need to run it with --no-daemonize
I think. (v2 just runs in the foreground, but not knowing much about this stuff I've used start-stop-daemon
: e.g. https://github.com/flapjack/omnibus-flapjack/blob/master/dist/etc/init.d/v2/deb/flapjack )
If you do come up with working Upstart scripts, we can integrate them into the packages via https://github.com/flapjack/omnibus-flapjack/tree/master/dist/etc/init.d/ , either v1 or v2 or both.
If the crashes are logged, can you open separate issues for those?
I'm running 1.6, and I tried --no-daemonize. It works great running straight from the command line, but when run inside an upstart script it never starts. Issuing service flapjack start
just hangs there and never returns.
It looks like I may have been running into a bug with upstart. I tried a workaround to rename the upstart file since I couldn't restart, and for now at least it appears to be working.
This is tentatively what I have
description "flapjack"
start on runlevel [2345]
stop on runlevel [016]
respawn
env PATH=/opt/flapjack/bin:$PATH
exec flapjack server start --no-daemonize
Also, just to make sure. Is it perfectly safe to run flapjack on multiple machines at the same time?
As long as they're pointing to the same Redis instance, yes. In the future it'd be nice to move to a more easily distributed data store, but for now that's the limiting factor.
What's the recommended way to run Flapjack with Upstart? Using the regular init script that comes with Flapjack I find it periodically crashing. I have tried multiple forms of
flapjack server start
with the upstart script(exec, script, expect fork/daemon, etc...), but it usually just hangs and doesn't come back. The only thing that seems to work is just straightexec flapjack server start
with no fork expectations, but then upstart just continually tries to start the server process. Any help would be appreciated.