Short name or FQDN in /etc/pbs.conf

Hi all,

I have a PBS complex that can resolve host name with FQDN only.
And I have experienced the issue that PBS doesn’t start with messages below:

*** The PBS server could not be found: ${server}
*** This value must resolve to a valid IP address.

I have setup /etc/pbs.conf like this.

PBS_SERVER=pbsserver1.example.com
PBS_PRIMARY=pbsserver1.example.com
PBS_SECONDARY=pbsserver2.example.com
:
:

I can “host pbsserver1.example.com” and “host pbsserver2.example.com”.
But I cannot *host pbsserver1".
I think I can write FQDN in PBS_SERVER and PBS_PRIMARY, PBS_SECONDARY, because man pbs.conf said:

Hostname of host running the server.  
If the short name of the server host resolves to the
correct IP address, you can use the short name for the value of the
PBS_SERVER entry in pbs.conf.  If only the FQDN of the server host
resolves to the correct IP address, you must use the FQDN for the
value of PBS_SERVER.  

On the other hand, we found that the PBS startup script (/opt/pbs/libexec/init.d/pbs_init.d) converts the FQDN set in PBS_SERVER to a short name and checks if the name resolution can be done with the short name.

My questions are:

  1. Is the current behavior a glitch that does not match the specification? Or is it working according to specifications and there are no problems?

  2. Is there any workaround to start PBS in this environment ?

Thank you in advance.

Could you please state the version of PBS Pro you are using and also output of the below commands run on pbsserver1 and pbsserver2

hostname
pbs_hostn -v pbsserver1
pbs_hostn -v pbsserver2

Would it be possible to add the short hostname to the /etc/hosts file

cat /etc/hosts
STATIC-IP-ADDRESS pbserver1.example.com pbsserver1
STATIC-IP-ADDRESS pbserver2.example.com pbsserver2

In the /etc/pbs.conf , the hostname mentioned against PBS_SERVER should be resolvable (and should be mapped to a static IP).

adarsh,

Thank you for your reply.
I’m using OpenPBS 20.0.1.

And the result of pbs_hostn command is below.

/opt/pbs/bin/pbs_hostn -v pbsserver1.example.com
primary name: pbsserver1.example.com (from gethostbyname())
aliases:            -none-
     address length:  4 bytes
     address:        10.XXX.XXX.XXX   (3509676298 dec)  name:  pbsserver1.example.com

I added the entry you mentioned to /etc/hosts and now I can start PBS.
Thank you!

I understood from this that the hostname in pbs.conf must be able to be resolved by not only FQDN but also short name, is this correct?

Thank you @aojs53 .

Not mandatory.
Every hostname resolves to only one IP address and /etc/hosts is correctly populated and is same across the pbs complex i.e., name resolution should be consistent across the entire pbs complex/cluster and the IP resolves to the same canonical name across all the compute nodes/ headnode that runs PBS Pro services or daemons.

Recommendation: The canonical name for each address (first on the line in /etc/hosts) is usually fully qualified (with domain name); the output of “hostname” is usually the short name.