MaaS region+rack on CentOS

We have a CentOS server at our lab that provides DHCP over a private network to our lab. I want to make the server the region+rack controller, and have hence installed maas on the machine using snap.

sudo maas init region+rack --database-uri "postgres://$MAAS_DBUSER:$MAAS_DBPASS@$HOSTNAME/$MAAS_DBNAME"

On initializing, however, only the region controller gets configured, but the rack configuration fails.

sudo maas status

bind9 RUNNING pid 25826, uptime 0:13:50
dhcpd STOPPED Not started
dhcpd6 STOPPED Not started
http RUNNING pid 25827, uptime 0:13:50
ntp RUNNING pid 26017, uptime 0:13:48
proxy RUNNING pid 26338, uptime 0:13:37
rackd FATAL Exited too quickly (process log may have details)
regiond RUNNING pid 25833, uptime 0:13:50
syslog RUNNING pid 26002, uptime 0:13:48

I was hoping to figure out where I can find these logs, and how I can troubleshoot to get rackd up and running.

Thank you.

Hi Masood,

You’ll find some useful information in /var/log/syslog, by default I think all the stderr output ends up here.

For the specific logs files you’ll need to take a look in /var/snap/maas/common/log

Good luck,

–J

Hi J,

Thank you so much for pointing me to the logs.

I checked my log for rackd, and it says that Port 69 is already in use:

twisted.internet.error.CannotListenError: Couldn’t listen on 131.193.183.149:69: [Errno 98] Address already in use.

I checked for the service using it, which is expectedly an existing tftp service. lsof -i:69

lsof -i:69
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
systemd 1 root 96u IPv6 73976 0t0 UDP *:tftp

The issue doesn’t seem to get resolved despite turning off the tftp-server via systemctl stop tftp-server and re-initializing maas.

I eventually resolved it by turning off both, tftp-server and tftp-server.socket

tftp-server.socket

maas status

bind9 RUNNING pid 44512, uptime 0:01:12
dhcpd STOPPED Not started
dhcpd6 STOPPED Not started
http RUNNING pid 45139, uptime 0:00:56
ntp RUNNING pid 44787, uptime 0:01:10
proxy RUNNING pid 45059, uptime 0:01:00
rackd RUNNING pid 44515, uptime 0:01:12
regiond RUNNING pid 44517, uptime 0:01:12
syslog RUNNING pid 44781, uptime 0:01:10

Thank you for your patience.

-Masood

Hi Masood,

Glad they helped you to fix the issue, maas is quite complex and can be hard to diagnose issues at times.

All the best,

–J