MOS 9.0 installation - RabbitMQ hostname issue
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Fuel for OpenStack |
Fix Committed
|
High
|
Oleksiy Molchanov | ||
Mitaka |
Fix Released
|
High
|
Oleksiy Molchanov |
Bug Description
While testing the latest Mirantis release (9.0, Mitaka) I ran into some issues while doing a test environment deployment. After some investigation, I noticed something sucpisious about RabbitMQ behaviour.
After a couple of unsuccessfull deployments I noticed that rabbitmq-server keeps failing after the initial setup. I believe the reason is the misconfigured NODENAME parameter which doesn't use the system hostname correctly. Following are the steps that should show what's happening:
# Boot system from MOS9 ISO. At the Fuel menu set the following options:
DNS & Hostname >> Hostname >> "fuelsrv"
DNS & Hostname >> External DNS >> leave blank
DNS & Hostname >> Hostname to test DNS >> leave blank
Bootstrap Image >> Select "Skip buildinig bootstrap image"
Set Root Password >> Quit Setup >> Save and Continue + press "F8" afterwards
# The Fuel should install everything correctly. When the installation finishes, log into the system and verify hostname and RabbitMQ configuration:
[root@fuel ~]# hostname
fuel.domain.tld
[root@fuel ~]# hostnamectl
Static hostname: fuelsrv
Transient hostname: fuel.domain.tld
Icon name: computer-vm
Chassis: vm
Machine ID: 5e522aabe4bf436
Boot ID: 187546a671094d7
Virtualization: kvm
Operating System: CentOS Linux 7 (Core)
CPE OS Name: cpe:/o:
Kernel: Linux 3.10.0-
Architecture: x86-64
[root@fuel ~]# cat /etc/hosts
127.0.0.1 localhost localhost.
::1 localhost localhost.
10.20.0.2 fuelsrv.domain.tld fuelsrv
[root@fuel ~]# cat /etc/rabbitmq/
ERL_EPMD_
NODENAME=
NODE_IP_
NODE_PORT=5672
RABBITMQ_
[root@fuel ~]# systemctl status rabbitmq-server
● rabbitmq-
Loaded: loaded (/usr/lib/
Drop-In: /etc/systemd/
Active: active (running) since Sun 2016-07-17 11:30:34 UTC; 9min ago
Main PID: 16598 (beam)
Status: "Initialized"
CGroup: /system.
├─16598 /usr/lib64/
├─16778 inet_gethost 4
└─16779 inet_gethost 4
Jul 17 11:30:31 fuel.domain.tld rabbitmq-
Jul 17 11:30:31 fuel.domain.tld rabbitmq-
Jul 17 11:30:31 fuel.domain.tld rabbitmq-
Jul 17 11:30:31 fuel.domain.tld rabbitmq-
Jul 17 11:30:31 fuel.domain.tld rabbitmq-
Jul 17 11:30:31 fuel.domain.tld rabbitmq-
Jul 17 11:30:31 fuel.domain.tld rabbitmq-
Jul 17 11:30:34 fuel.domain.tld rabbitmq-
Jul 17 11:30:34 fuel.domain.tld systemd[1]: Started RabbitMQ broker.
Jul 17 11:30:34 fuel.domain.tld rabbitmq-
Hint: Some lines were ellipsized, use -l to show in full.
# So far everything looks ok. Notice that the system hostname is currently at the default value ("fuel"). Now, reboot the system, log into back into it and check the forementioned configuration again:
[root@fuelsrv ~]# hostname
fuelsrv
[root@fuelsrv ~]# hostnamectl
Static hostname: fuelsrv
Icon name: computer-vm
Chassis: vm
Machine ID: 5e522aabe4bf436
Boot ID: f32fc83db9b24d0
Virtualization: kvm
Operating System: CentOS Linux 7 (Core)
CPE OS Name: cpe:/o:
Kernel: Linux 3.10.0-
Architecture: x86-64
[root@fuelsrv ~]# cat /etc/hosts
127.0.0.1 localhost localhost.
::1 localhost localhost.
10.20.0.2 fuelsrv.domain.tld fuelsrv
[root@fuelsrv ~]# cat /etc/rabbitmq/
ERL_EPMD_
NODENAME=
NODE_IP_
NODE_PORT=5672
RABBITMQ_
[root@fuelsrv ~]# systemctl status rabbitmq-server
● rabbitmq-
Loaded: loaded (/usr/lib/
Drop-In: /etc/systemd/
Active: failed (Result: start-limit) since Sun 2016-07-17 11:42:12 UTC; 31s ago
Process: 2933 ExecStop=
Process: 2825 ExecStart=
Main PID: 2825 (code=exited, status=1/FAILURE)
Status: "Exited."
Jul 17 11:42:12 fuelsrv systemd[1]: rabbitmq-
Jul 17 11:42:12 fuelsrv systemd[1]: rabbitmq-
Jul 17 11:42:12 fuelsrv systemd[1]: Job rabbitmq-
Jul 17 11:42:12 fuelsrv systemd[1]: Converting job rabbitmq-
Jul 17 11:42:12 fuelsrv systemd[1]: start request repeated too quickly for rabbitmq-ser...ice
Jul 17 11:42:12 fuelsrv systemd[1]: rabbitmq-
Jul 17 11:42:12 fuelsrv systemd[1]: Job rabbitmq-
Jul 17 11:42:12 fuelsrv systemd[1]: Failed to start RabbitMQ broker.
Jul 17 11:42:12 fuelsrv systemd[1]: Unit rabbitmq-
Jul 17 11:42:12 fuelsrv systemd[1]: rabbitmq-
Hint: Some lines were ellipsized, use -l to show in full.
# Notice that rabbitmq-server is now not working currently. Doing an service restart via systemctl doesn't help, but starting the service directly indicates what could be the problem:
[root@fuelsrv ~]# systemctl restart rabbitmq-server
Job for rabbitmq-
To force a start use "systemctl reset-failed rabbitmq-
[root@fuelsrv ~]# runuser -u rabbitmq /usr/lib/
ERROR: epmd error for host fuel: nxdomain (non-existing domain)
# If we take a look at the RabbitMQ configuration we can see that it's actually using the wrong hostname for it's NODENAME parameter (notice that the system hostname is now set to "fuelsrv", as set during the Fuel installation):
[root@fuelsrv ~]# cat /etc/rabbitmq/
ERL_EPMD_
NODENAME=
NODE_IP_
NODE_PORT=5672
RABBITMQ_
# After a simple change to the rabbitmq-env.conf the service should start sucessfully and work fine afterwards (and "survive" future reboots).
[root@fuelsrv ~]# cat /etc/rabbitmq/
ERL_EPMD_
-NODENAME=
+NODENAME=
NODE_IP_
NODE_PORT=5672
RABBITMQ_
[root@fuelsrv ~]# runuser -u rabbitmq /usr/lib/
## ## Licensed under the MPL. See http://
## ##
########## Logs: /<email address hidden>
###### ## /<email address hidden>
##########
completed with 7 plugins.
^CStopping and halting node rabbit@fuelsrv ...
Gracefully halting Erlang VM
[root@fuelsrv ~]# grep -i fuelsrv /var/log/
/<email address hidden>:node : rabbit@fuelsrv
/<email address hidden>:log : /<email address hidden>
/<email address hidden>:sasl log : /<email address hidden>
/<email address hidden>:database dir : /var/lib/
/<email address hidden>:Database directory at /var/lib/
[root@fuelsrv ~]# systemctl start rabbitmq-server
[root@fuelsrv ~]# systemctl status rabbitmq-server
● rabbitmq-
Loaded: loaded (/usr/lib/
Drop-In: /etc/systemd/
Active: active (running) since Sun 2016-07-17 11:43:52 UTC; 5s ago
Process: 2933 ExecStop=
Main PID: 3260 (beam)
Status: "Initialized"
CGroup: /system.
├─3260 /usr/lib64/
├─3446 inet_gethost 4
└─3447 inet_gethost 4
Jul 17 11:43:52 fuelsrv systemd[1]: rabbitmq-
Jul 17 11:43:52 fuelsrv systemd[1]: rabbitmq-
Jul 17 11:43:52 fuelsrv systemd[1]: rabbitmq-
Jul 17 11:43:52 fuelsrv systemd[1]: rabbitmq-
Jul 17 11:43:52 fuelsrv systemd[1]: Job rabbitmq-
Jul 17 11:43:52 fuelsrv systemd[1]: Started RabbitMQ broker.
Jul 17 11:43:52 fuelsrv systemd[1]: rabbitmq-
Jul 17 11:43:52 fuelsrv rabbitmq-
Jul 17 11:43:52 fuelsrv rabbitmq-
Jul 17 11:43:52 fuelsrv rabbitmq-
Hint: Some lines were ellipsized, use -l to show in full.
Of course, this doesn't happen if the default hostname is used for the installation. Could somebody please try to reproduce and (possibly) confirm the described behaviour?
Changed in mos: | |
assignee: | nobody → Fuel Sustaining (fuel-sustaining-team) |
Changed in mos: | |
milestone: | none → 10.0 |
no longer affects: | fuel |
Changed in fuel: | |
assignee: | nobody → Fuel Sustaining (fuel-sustaining-team) |
milestone: | none → 10.0 |
no longer affects: | mos/9.x |
no longer affects: | mos |
Changed in fuel: | |
importance: | Undecided → High |
status: | New → Confirmed |
Changed in fuel: | |
status: | Confirmed → In Progress |
tags: | added: area-library |
Changed in fuel: | |
assignee: | Fuel Sustaining (fuel-sustaining-team) → Oleksiy Molchanov (omolchanov) |
tags: | added: 9.1-proposed |
tags: | added: on-verification |
Fix proposed to branch: master /review. openstack. org/344774
Review: https:/