rabbitmq service fails to start on system boot

Bug #1979168 reported by Max Khon
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MicroStack
New
Undecided
Unassigned

Bug Description

rabbitmq-server does not start automatically during system boot:

eq-os1:~$ systemctl status snap.microstack.rabbitmq-server
● snap.microstack.rabbitmq-server.service - Service for snap application microstack.rabbitmq-server
   Loaded: loaded (/etc/systemd/system/snap.microstack.rabbitmq-server.service; enabled; vendor preset: enable
   Active: failed (Result: exit-code) since Sun 2022-06-19 14:37:39 CST; 21h ago
  Process: 9923 ExecStart=/usr/bin/snap run microstack.rabbitmq-server (code=exited, status=1/FAILURE)
 Main PID: 9923 (code=exited, status=1/FAILURE)

6月 19 14:37:39 eq-os1 systemd[1]: snap.microstack.rabbitmq-server.service: Service hold-off time over, schedu
6月 19 14:37:39 eq-os1 systemd[1]: snap.microstack.rabbitmq-server.service: Scheduled restart job, restart cou
6月 19 14:37:39 eq-os1 systemd[1]: Stopped Service for snap application microstack.rabbitmq-server.
6月 19 14:37:39 eq-os1 systemd[1]: snap.microstack.rabbitmq-server.service: Start request repeated too quickly
6月 19 14:37:39 eq-os1 systemd[1]: snap.microstack.rabbitmq-server.service: Failed with result 'exit-code'.
6月 19 14:37:39 eq-os1 systemd[1]: Failed to start Service for snap application microstack.rabbitmq-server.
eq-os1:~$ sudo cat /var/snap/microstack/common/log/rabbitmq/startup_log
ERROR: epmd error for host eq-os1: address (cannot connect to host/port)
eq-os1:~$

This happens because it tries to connect to epmd via hostname which points to IP address of eno1 interface (via /etc/hosts):

eq-os1:~$ grep eq-os1 /etc/hosts
10.30.0.11 eq-os1
eq-os1:~$ ip addr show dev eno1
2: eno1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 78:2b:cb:3b:50:89 brd ff:ff:ff:ff:ff:ff
    inet 10.30.0.11/22 brd 10.30.3.255 scope global eno1
       valid_lft forever preferred_lft forever
    inet6 fe80::7a2b:cbff:fe3b:5089/64 scope link
       valid_lft forever preferred_lft forever
eq-os1:~$

The workaround is to add a missing dependency on network-online.target for snap.microstack.rabbitmq-server.service:

eq-os1:~$ cat /etc/systemd/system/snap.microstack.rabbitmq-server.service.d/deps.conf
[Unit]
Wants=network-online.target
eq-os1:~$

System information:

eq-os1:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.6 LTS
Release: 18.04
Codename: bionic
dell@eq-os1:~$ snap list microstack
Name Version Rev Tracking Publisher Notes
microstack ussuri 245 latest/beta canonical✓ -
eq-os1:~$

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.