Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am developing a ruby on rails application to implement chat. I am not able to setup juggernaut server in production mode.

I followed this guide to setup redis. and its working perfectly fine.

Then I followed this for setting up juggernaut. But when I am trying to start juggernaut its not working.

Here is the out for grep commands to check that redis is working but juggernaut is not.

enter image description here

When I am trying to stop/start redis server its gives me output ie:

 Starting/Stopping redis-server: redis-server.

But nothing when i m doing the same for juggernaut. Check screenshot.

enter image description here

Some other things to check what actually going on:

  1. Executable file permissions to /etc/init.d/juggernaut file -- YES

        -rwxr-xr-x 1 fizzy fizzy 1310 Sep 19 11:06 juggernaut
  2. PIDFILE=/var/run/' is defined. Does that exist? --- NO

  3. In the 'start' part it runs 'chown juggernaut:juggernaut'. Does the user juggernaut exist and is it member of the group juggernaut? -- YES/YES

      cat /etc/group
      groups juggernaut
          juggernaut : juggernaut
  4. Running sudo juggernaut start the server, but i want to it to keep on running in background process/service.

enter image description here

I am stuck now. Can anybody help me.


     fizzy@li136-198:~$ sudo ls -l /usr/bin/juggernaut 
              ls: cannot access /usr/bin/juggernaut: No such file or directory
     fizzy@li136-198:~$ sudo ls -l /usr/local/bin/juggernaut 
            lrwxrwxrwx 1 root root 40 Sep 20 02:48 /usr/local/bin/juggernaut -> ../lib/node_modules/juggernaut/server.js

I tried changing




after that i tried restarting the juggernaut using

         sudo /etc/init.d/juggernaut start

Server started but not as background process/service.

PS: Somebody please create proper tags for this question.

share|improve this question
Is the /etc/inin.d/juggernaut file the one they provided from the crib sheet you are using? Can you provide the output of ls -l /usr/bin/juggernaut ( I'm trying to see if its executable )? Line 21 of checks to see if its executable and it isn't printing out that its starting up the service. – becomingwisest Sep 20 '11 at 0:16
@ChristopherEvans check my edit.. – Mohit Jain Sep 20 '11 at 7:03

The juggernaut program doesn't seem to daemonise itself by default, and the initscript doesn't provide parameters to make it do so. Check the output of jaggernaut --help for options regarding daemon mode, and if you find them modify the initscript to provide those. For example:

if start-stop-daemon --start --quiet --umask 007 --pidfile $PIDFILE --chuid juggernaut:juggernaut --exec $DAEMON -- $OPTIONS

If there aren't any options you'll have to make start-stop-daemon do the daemonising (which isn't ideal for various reasons). To do this add the --background and probably --make-pidfile options:

if start-stop-daemon --start --quiet --umask 007 --pidfile $PIDFILE --chuid juggernaut:juggernaut --background --make-pidfile --exec $DAEMON
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.