supervisord

2,608 views
Skip to first unread message

Terry Schutte

unread,
Jan 10, 2012, 12:13:44 PM1/10/12
to storm-user
Has anyone been able to setup supervisord with storm? I have it
working, but it seems to be eating the worker.log files generated by
the worker processes. I am still seeing the nimbus.log and
supervisor.log files after setting up supervision. I'm mainly
wondering if I missed a flag in the supervisord setup or if this is
simply a side-effect of the multiple spawning of java processes after
the storm supervisor is up and running.

Mike Stanley

unread,
Jan 10, 2012, 4:32:54 PM1/10/12
to storm...@googlegroups.com
I have storm running with daemontools.   

Nothing really special about my setup.  

My "/etc/service.d/storm-supervisor/run" script looks something like this:

#!/bin/sh
exec su -l storm -c "cd /opt/storm && ./bin/storm supervisor"

my worker.log files are definitely not being clobbered.

I have a similar run file for nimbus and storm-ui as well.   The only storm related process that is handled slightly differently is zookeeper.

cheers,
... Mike

Terry Schutte

unread,
Jan 11, 2012, 11:07:59 AM1/11/12
to storm-user
Thanks Mike. I'm going to give Monit a try, and if that fails will
give daemontools a go.

For reference, what OS are you running under?
> > the storm supervisor is up and running.- Hide quoted text -
>
> - Show quoted text -

P. Taylor Goetz

unread,
Jan 11, 2012, 2:00:29 PM1/11/12
to storm...@googlegroups.com
We're using supervisord, and ran into the exact same issue you did.

If supervisord runs as root, you need to use su to change users and load that users environment.

The relevant section for running a nimbus looks like:

[program:nimbus]
command=su -l storm --command='storm nimbus'
autorestart=true

And for storm supervisors:

[program:supervisor]
command=su -l storm --command='storm supervisor'
autorestart=true


The storm user's environment should have the $STORM_HOME/bin on the PATH

- Taylor

Terry Schutte

unread,
Jan 12, 2012, 9:57:00 AM1/12/12
to storm-user
Taylor, thanks for the tip. I am running as root. I'll give your
suggestion a try today and hopefully that will fix this.
> >> - Show quoted text -- Hide quoted text -

Terry Schutte

unread,
Jan 12, 2012, 12:09:55 PM1/12/12
to storm-user
This fix worked perfectly, thanks again Taylor.

Terry Schutte

unread,
Jan 12, 2012, 12:49:36 PM1/12/12
to storm-user
One more note, in case this helps anyone else in the future. It took
me awhile to figure out at least, but that may be my lack of
experience with zookeeper.

When running zookeeper under supervision, use "zkServer.sh start-
foreground" instead of "zkServer.sh start". The regular start command
forks and exits too many times for supervisord to track the
application state successfully.

Avijit Paul

unread,
Apr 21, 2012, 11:22:22 AM4/21/12
to storm...@googlegroups.com
Hi Terry and Mike,
I setup supervisor but keep getting this 

root@yetanotherstorm:/home/ubuntu# supervisorctl
nimbus                           RUNNING    pid 1418, uptime 0:02:06
stormUI                          FATAL      Exited too quickly (process log may have details)
supervisor                       RUNNING    pid 1421, uptime 0:02:06
zookeeper                        FATAL      Exited too quickly (process log may have details)


And in my supervisord.conf file

[program:zookeeper]
command=/zookeeper/bin/zkServer.sh start-foreground
autorestart=true
stopsignal=KILL

[program:nimbus]
command=/storm/bin/storm nimbus

[program:supervisor]
command=/storm/bin/storm supervisor


[program:stormUI]
command=/storm/bin/storm UI

What am I doing wrong?

Regards
Avi

James Xu

unread,
Apr 21, 2012, 11:43:12 AM4/21/12
to storm...@googlegroups.com
in "/storm/bin/storm UI", UI should be lowercase: ui, you probably want to run each command individually before use supervisorctl

2012/4/21 Avijit Paul <avijit.p...@gmail.com>

James Xu

unread,
Apr 21, 2012, 11:45:28 AM4/21/12
to storm...@googlegroups.com
and in my zookeeper install, zkServer.sh dont have a start-foreground option.

2012/4/21 James Xu <xumingmin...@gmail.com>

Randy E.

unread,
Aug 29, 2013, 3:32:56 PM8/29/13
to storm...@googlegroups.com, xumingmin...@gmail.com
I tried the command by hand:  zkServer.sh start-foreground

And, it said that it was already running, so I did:  zkServer.sh stop

Then restarted supervisord, and zookeeper stayed up.

FYI

Reply all
Reply to author
Forward
0 new messages