Pbs starts too slow

When I started the PBS service, all daemon processes took tens of seconds to identify the network interface, for example pbs_server daemon, 13:52:34 – > 13:52:54 takes 20 seconds (similar to other comm, mom and sched)

02/07/2022 13:52:34; 0002; Server@cf -poc-master; Svr; Log; Log opened

02/07/2022 13:52:34; 0002; Server@cf -poc-master; Svr; Server@cf -poc-master; pbs_ version=19.1.3

02/07/2022 13:52:34; 0002; Server@cf -poc-master; Svr; Server@cf -poc-master; pbs_ build=mach=N/A:security=N/A:configure_ args=N/A

02/07/2022 13:52:34; 0002; Server@cf -poc-master; Svr; Server@cf -poc-master; hostname=cf-poc-master; pbs_ leaf_ name=N/A; pbs_ mom_ node_ name=N/A

//the next use 20s!!!
02/07/2022 13:52:54; 0002; Server@cf -poc-master; Svr; Server@cf -poc-master; ipv4 interface lo: localhost4. localdomain4

02/07/2022 13:52:54; 0002; Server@cf -poc-master; Svr; Server@cf -poc-master; ipv4 interface bond0: cf-poc-master

02/07/2022 13:52:54; 0002; Server@cf -poc-master; Svr; Server@cf -poc-master; ipv6 interface lo: localhost6. localdomain6

02/07/2022 13:52:54; 0002; Server@cf -poc-master; Svr; Server@cf -poc-master; ipv6 interface bond0: cf-poc-master

Why? Is it because this machine is a physical machine, and cannot be connected to the public network, or is it caused by other reasons? Thank you!

A 20 second delay is often due to DNS issues (hostname lookup). Double check that the name you have in /etc/pbs.conf for the server also appears exactly the same in /etc/hosts.

I don’t know if this is an artifact of how you copy/pasted, but the server name in the logs has a space character between the “cf” and the “-poc-master” parts.

The blank space is caused by copy and paste.
I confirmed that the configuration in /etc/hosts is the same as /etc/pbs.conf about cf-poc-master

I did the following tests:

  1. Maintain offline status. execute command “getent hosts cf-poc-master” also takes about 20 seconds, which is equal to the time spent identifying the interface when PBS’s every daemon starts

  2. Change the server online, then both command “getent hosts cf-poc-master” and pbs start are completed instantly

PS:
command “getent hosts cf-poc-master” outputs IPv6 address not IPv4 address. I think this is another problem, no need to care here.
In addition, command “getent ahost cf-poc-master” can instantly get the IPv4 address, no matter online or offline

Q: How can I further locate the DNS problem? Thank you!!!

Check the hosts entry in /etc/nsswitch.conf. It probably looks like:

hosts:      files dns myhostname

Try removing the dns part and see if that speeds things up. If it does, see if you can still boot.

Also, just for curiosity, disable ipv6 and see if that makes a difference:

sysctl -w net/ipv6/conf/all/disable_ipv6=1