mongrel_cluster does not work on restart of ubuntu gutsy?
I been struggling a couple of days to get my mongrel_cluster to run when system is restarted. As usual, this involves some configuration in the /etc/init.d directory. The proccess is pretty easy, and you can read it from the mongrel_cluster documentation. From the README of mongrel_cluster:
Supporting starting clusters on boot.
1. Create mongrel_cluster conf directory (/etc/mongrel_cluster).
3. Copy the init.d script from mongrel_cluster’s resouces directory to /etc/init.d.
4. chmod +x /etc/init.d/mongrel_cluster
5. Add to init.d startup. On ubuntu: “sudo update-rc.d mongrel_cluster defaults”
Now you should simlink the mongrel_cluster.yml of your app config directory to a file.yml on the /etc/mongrel_cluster directory. All this is all right and good, the problem is: when you restart the os, nothing happens! The solution: modifying the mongrel_cluster file on /etc/init.d. You should:
1) Add a path statement to mongrel_cluster file just above the CONF_DIR variable:
sudo vi /etc/init.d/mongrel_cluster
(Russ Brooks tip)
2) Create the proper user and user group… OR! just comment out the “USER=mongrel” line and the “chown $USER:$USER $PID_DIR”.
Thats it! Restart, and watch your mongrels be started by the /etc/init.d/mongrel_cluster script.
I should point out that I have found all this info in other places on the net. The problem is that every resource on the net has different pieces of the whole picture you need to get the thing up and running. The places I recommend for info are:
- also excellent documentation on http://wiki.slicehost.com/doku.php#ubuntu
The last one has the “path” tip, the one that i was needing to get the thing to work.