Running Ubuntu raring 13.04 from http://cloud-images.ubuntu.com/vagrant/raring/current/raring-server-cloudimg-amd64-vagrant-disk1.box on 2013-06-14 running on VirtualBox 4.2.12r84980.
# apt-get install rabbitmq-server
# service rabbitmq-server status #ok
root@test:/# dpkg -l rabbit\*
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-===========================-==================-==================-===========================================================
ii rabbitmq-server 3.0.2-1 all AMQP server written in Erlang
#### reboot ####
root@test:/home/vagrant# service rabbitmq-server status
Status of node rabbit@test ...
Error: unable to connect to node rabbit@test: nodedown
DIAGNOSTICS
===========
nodes in question: [rabbit@test]
hosts, their running nodes and ports:
- test: [{rabbitmqctl1700,57559}]
current node details:
- node name: rabbitmqctl1700@test
- home dir: /var/lib/rabbitmq
- cookie hash: /Psls2BWC6J7L8b3ekhS2Q==
root@test:/# find /etc/rc* -name \*rabbit\*
/etc/rc0.d/K20rabbitmq-server
/etc/rc1.d/K20rabbitmq-server
/etc/rc2.d/S20rabbitmq-server
/etc/rc3.d/S20rabbitmq-server
/etc/rc4.d/S20rabbitmq-server
/etc/rc5.d/S20rabbitmq-server
/etc/rc6.d/K20rabbitmq-server
root@test:/# ls -l /etc/rc2.d/S20rabbitmq-server
lrwxrwxrwx 1 root root 25 Jun 15 20:21 /etc/rc2.d/S20rabbitmq-server -> ../init.d/rabbitmq-server
root@test:/# ls -l /etc/init.d/rabbitmq-server
-rwxr-xr-x 1 root root 3991 Jan 31 23:10 /etc/init.d/rabbitmq-server
/var/log/rabbit/ has nothing from boot time
/var/run/rabbitmq don't exist
nothing in syslog or /var/log/upstart/*
/var/log/boot dont exist
This problem did not happen with rabbit 2.7.1 on precise.
root@test:/# service rabbitmq-server start
* Starting message broker rabbitmq-server [ OK ]
root@test:/# service rabbitmq-server status # OK
# enable boot logging
root@test:/# update-rc.d bootlogd defaults 01 99
update-rc.d: warning: bootlogd start runlevel arguments (2 3 4 5) do not match LSB Default-Start values (S)
update-rc.d: warning: bootlogd stop runlevel arguments (0 1 6) do not match LSB Default-Stop values (none)
Adding system startup for /etc/init.d/bootlogd ...
/etc/rc0.d/K99bootlogd -> ../init.d/bootlogd
/etc/rc1.d/K99bootlogd -> ../init.d/bootlogd
/etc/rc6.d/K99bootlogd -> ../init.d/bootlogd
/etc/rc2.d/S01bootlogd -> ../init.d/bootlogd
/etc/rc3.d/S01bootlogd -> ../init.d/bootlogd
/etc/rc4.d/S01bootlogd -> ../init.d/bootlogd
/etc/rc5.d/S01bootlogd -> ../init.d/bootlogd
root@test:/# sed -i 's/BOOTLOGD_ENABLE=No/BOOTLOGD_ENABLE=Yes/' /etc/default/bootlogd
### reboot ###
still no /var/log/boot
but now rabbitmq-server is starting on boot! Undo bootlogd and reboot and rabbit does not start. So bootlogd is doing something that allows the rabbit script to run at boot time.
But now bootlogd can start hogging CPU after a while. So thats no good, but now know that problem was due to script not having anything to write its output to.
vagrant@test:~$ dmesg | grep console | head -1
[ 0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-3.8.0-23-generic root=UUID=5f06979c-5a4b-4b70-9c58-60ac4dff987d ro console=tty1 console=ttyS0
Enable serial port for ttyS0.
VBoxManage modifyvm testlinux --uart1 0x3F8 4
Or in vagrant 1.1.5
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "raring64"
config.vm.box_url = "http://cloud-images.ubuntu.com/vagrant/raring/current/raring-server-cloudimg-amd64-vagrant-disk1.box"
config.vm.hostname = "test"
config.vm.provider "virtualbox" do |vb|
vb.customize ["modifyvm", :id, "--uart1", "0x3F8", 4] # turn on ttyS0 - works!
#vb.gui = true # tty1 - doesn't solve rabbit problem
end
end
But now bootlogd can start hogging CPU after a while. So thats no good, but now know that problem was due to script not having anything to write its output to.
vagrant@test:~$ dmesg | grep console | head -1
[ 0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-3.8.0-23-generic root=UUID=5f06979c-5a4b-4b70-9c58-60ac4dff987d ro console=tty1 console=ttyS0
Solution
Enable serial port for ttyS0.
VBoxManage modifyvm testlinux --uart1 0x3F8 4
Or in vagrant 1.1.5
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "raring64"
config.vm.box_url = "http://cloud-images.ubuntu.com/vagrant/raring/current/raring-server-cloudimg-amd64-vagrant-disk1.box"
config.vm.hostname = "test"
config.vm.provider "virtualbox" do |vb|
vb.customize ["modifyvm", :id, "--uart1", "0x3F8", 4] # turn on ttyS0 - works!
#vb.gui = true # tty1 - doesn't solve rabbit problem
end
end
Root Cause
The raring image ~/.vagrant.d/boxes/raring64/virtualbox/box.ovf has the port disabled:
<UART>
<Port slot="0" enabled="false" IOBase="0x3f8" IRQ="4" hostMode="Disconnected"/>
<Port slot="1" enabled="false" IOBase="0x2f8" IRQ="3" hostMode="Disconnected"/>
</UART>
But the precise image had it disabled too:
<UART>
<Port slot="0" enabled="false" IOBase="0x3f8" IRQ="4" hostMode="Disconnected"/>
<Port slot="1" enabled="false" IOBase="0x2f8" IRQ="3" hostMode="Disconnected"/>
</UART>
but the running precise shows it enabled ???