[rabbitmq-discuss] RabbitMQ 2.6.0 failing to start (Debian Package)
    Philip K. Warren 
    pkwarren at gmail.com
       
    Thu Sep  1 17:38:09 BST 2011
    
    
  
I have installed the RabbitMQ Debian package from the Apt repository
located here: http://www.rabbitmq.com/debian.html#apt. Previous
releases worked great, but the latest release is failing to start
after a reboot. I believe it is due to small PID file handling changes
between 2.5.1 and 2.6.0 and the fact that Ubuntu is mounting /var/run
as a tmpfs filesystem (so it is wiped after every reboot).
This is what /var/log/rabbitmq/startup_err is reporting:
mkdir: cannot create directory `/var/run/rabbitmq': Permission denied
/usr/lib/rabbitmq/bin/rabbitmq-server: 71: cannot create
/var/run/rabbitmq/pid: Directory nonexistent
I think the rabbitmq-server init script needs to create the
/var/run/rabbitmq directory if it doesn't exist, as the rabbitmq user
doesn't have permission to create the directory.
I have temporarily made this change to the init script to get it working:
--- 2_6_0/etc/init.d/rabbitmq-server	2011-08-26 10:42:19.000000000 -0500
+++ /etc/init.d/rabbitmq-server	2011-09-01 11:36:59.537220755 -0500
@@ -41,6 +41,13 @@
     else
         RETVAL=0
         set +e
+        # BEGIN LOCAL MODIFICATIONS
+        if [ ! -d /var/run/rabbitmq ]; then
+            mkdir /var/run/rabbitmq
+            chmod 0755 /var/run/rabbitmq
+            chown $USER:$USER /var/run/rabbitmq
+        fi
+        # END LOCAL MODIFICATIONS
         setsid sh -c "RABBITMQ_PID_FILE=$PID_FILE $DAEMON > \
             ${INIT_LOG_DIR}/startup_log 2> ${INIT_LOG_DIR}/startup_err" &
         $CONTROL wait $PID_FILE >/dev/null 2>&1
-- 
Philip K. Warren
    
    
More information about the rabbitmq-discuss
mailing list