Is it possible to call a bash shell script using supervisord?



I’m trying to call this shell script using supervisord. supervisorctl reports the following error when trying to start the process:

kerby-kdc FATAL Exited too quickly
(process log may have details)

I checked the kerby logs but no errors were reported.

I configured the process in /etc/supervisor/supervisord.conf as follows:

command=bash -c "/home/test/kerberos/server/kdc-dist/bin/" /home/test/kerberos/server/kdc-dist/conf /home/test/kerberos/server/kdc-dist/runtime

Is there something wrong with this configuration?


The shell script referenced in the OP contains the following:

java $DEBUG \
-classpath target/lib/*:. \
org.apache.kerby.kerberos.kdc.KerbyKdcServer -start $args

Note that the classpath is relative. When supervisord tries to execute the java command, the JVM will be unable to find the class org.apache.kerby.kerberos.kdc.KerbyKdcServer. That’s because target/lib doesn’t exist relative to the supervisord execution path.

The classpath needs to be absolute or a CLASSPATH environment variable needs to be added to the supervisord.conf file.

Answered By – James

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave A Reply

Your email address will not be published.

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More