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.
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.
Some other things to check what actually going on:
Executable file permissions to /etc/init.d/juggernaut file -- YES
-rwxr-xr-x 1 fizzy fizzy 1310 Sep 19 11:06 juggernaut
PIDFILE=/var/run/juggernaut.pid' is defined. Does that exist? --- NO
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 redis:x:1002: juggernaut:x:113: groups juggernaut juggernaut : juggernaut
Running sudo juggernaut start the server, but i want to it to keep on running in background process/service.
I am stuck now. Can anybody help me.
EDIT
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
DAEMON=/usr/bin/juggernaut
to
DAEMON=/usr/local/bin/juggernaut
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.
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 ofjaggernaut --help
for options regarding daemon mode, and if you find them modify the initscript to provide those. For example: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: