CentOS 5 + Passenger

30 April, 2008

Tip of the day: For anyone out there with CentOS 5, despite what Passenger thinks, your http-devel libraries likely are installed. I was getting an error "you need to yum install http-devel" , which I had, but still getting the error. If like me, the export APXS2 as per passenger docs doesn't work, just add "/usr/local/apache/bin/" into your profile path and passenger will then work fine (I just checked by ensuring axps ran at the command prompt before running the passenger module install) In theory then you should be good to go...

Read More

Monit restarting Mongrel Cluster - "Execution Failed"

06 February, 2008

Following in the footsteps of numerous other hapless people seeing this error - I had a frustrating number of hours, trying every combination of stuff that *should* work according to various recipes. The following is what I had to do to get monit playing nice with mongrel cluster (and thereby avoiding the lovely error "execution failed" when trying to get mongrel restarted via monit) This is on a CentOS 5 Enterprise x86_64 server. For some reason calling the cluster::start option on mongrel_rails would not work, I had to pass in all the flags manually to mongrel_rails, along with absolute paths for everything. But hey it works ... you can manually kill a mongrel process and watch monit bring it back up for you, right as rain !!! (note next step I'd change the monitrc to actually test a response from the mongrel server in question, rather than rely on the pid file) Setup: - mongrel user, in mongrel group. - mongrel owns /var/www/apps/myappname/ - monit is run as root user - mongrel user doesn't have sudo privileges in /etc/monitrc check process mongrel_8000 with pidfile /var/www/apps/myappname/shared/pids/mongrel.8000.pid start program = "/usr/local/bin/ruby /usr/local/bin/mongrel_rails start -d -e production -c /var/www/apps/myappname/current/ --user mongrel --group mongrel -p 8000 -P /var/www/apps/myappname/shared/pids/mongrel.8000.pid -l /var/www/apps/myappname/shared/log/mongrel.8000.log" [stop program, rules etc following] [Rinse and repeat for each mongrel you're running in the cluster] Note that this will not work... start program = "/usr/local/bin/mongrel_rails cluster::start -C /var/www/apps/myappname/current/config/mongrel_cluster.yml --clean --only 8000"

Read More

Creative Commons License
This work is licensed under a Creative Commons Attribution 3.0 Unported License.