Looks like provided value (‘centos7’) for $clienthost in /var/spool/pbs/mom_priv/config is not a valid hostname.
pbs_mom is getting error on gethostbyname(3)
Starting Nmap 6.40 ( http://nmap.org ) at 2020-05-17 05:36 CEST
Nmap scan report for localhost (127.0.0.1)
Host is up (0.00026s latency).
Other addresses for localhost (not scanned): 127.0.0.1
Not shown: 990 closed ports
PORT STATE SERVICE
22/tcp open ssh
25/tcp open smtp
80/tcp open http
111/tcp open rpcbind
631/tcp open ipp
3306/tcp open mysql
5432/tcp open postgresql
15002/tcp open unknown
15003/tcp open unknown
15004/tcp open unknown
Device type: general purpose
Running: Linux 3.X
OS CPE: cpe:/o:linux:linux_kernel:3
OS details: Linux 3.7 - 3.9
Network Distance: 0 hops
It seems that the canonicalized hostname keeps changing.
The server sets the administrators to root on the canonical name of the hostname when you set things up. Since you now get “unauthorized request”, the qmgr commands no longer seem to come from the address that name is bound to – possibly because that name is no longer resolvable because you changed things (is the host supposed to be “centos7” or “centos7-1”? Decide once and for all…)
Ditto for your node:
centos7
Mom = centos7.home
You created the node by passing the name “centos”. BTW: this name MUST match the output of “hostname” or your hooks won’t work well. It resolved it to an IP address, and reached a MoM. MoM sent back a message, and the IP address it gave resolved to centos7.home, but this name currently does not map to an IP address. I bet that now centos7-1.home exists but not centos7.home.
In other words: stick to one canonical name for each IP address and don’t change it. Make sure that /etc/nsswitch.conf has “files” first for the hosts map, and then control your IP/name translations from there (the canonicalized hostname is always the first entry). Make sure names that you use only appear on one line (do not be tempted to add e.g. “centos7” to two different lines, because that will confuse a lot of software since your canonicalisation is then ambiguous).
How you get out of this conundrum indeed depends on what you see in the logs and what the output of qmgr -c “print server” is.