PBS Pro Installation with source code

I have successfully installed open PBS Pro from source code on our EHRL7 cluster server.
I specified these options on the line,

configure --prefix=/usr/physics/pbspro --with-python=/usr/physics/python/anaconda2 --with-pbs-server-home=/var/spool/pbspro --with-pbs-conf-file=/var/spool/pbspro

but I can’t see the directory /var/spool/pbspro created and I can’t find pbs.conf anywhere.

Thanks,

Sue

Hello,

Did you run post-install script after “make install”? You should be able to find the script installed under /usr/physics/pbspro/libexec/pbs_postinstall. This script is responsible for creating and/or updating the PBS Pro configuration file and the PBS_HOME directory.

Hope this helps. Also you can refer pbspro/INSTALL file for installation instructions.

Regards,
Ashwath

thanks.

I would like to put pbs.conf in a different place with a different name. therefore on the building line, I specify this option,

configure … --with-pbs-conf-file=/var/spool/pbspro/pbspro.conf

it doesn’t work. still /etc/pbs.conf.14.0.1 was created.

Sue

Hi Sxy,
This option seems to be broken, you can raise a bug ticket here
https://pbspro.atlassian.net/secure/Dashboard.jspa

Regards
Dilip

Please set the environment variable PBS_CONF_FILE prior to running pbs_postinstall. It should point to the location where you want the configuration file to live (e.g. /var/spool/pbs/pbs.conf). Make sure you export the environment variable so that it is visible to the script. After you run pbs_postinstall, you will likely need to update /etc/profile.d/pbs.sh and /etc/profile.d/pbs.csh to export PBS_CONF_FILE when users log in.

Hi All,

thanks for the information provided.

I have further issues with PBS Pro installation from source code on RHEL7:

after successfully installing PBS Pro from source code
(I followed the instructions given in file pbspro-master/INSTALL), I tried to start pbs server,

/etc/init.d/pbs start
Starting PBS
PBS Home directory /var/spool/pbspro needs updating.
Running /usr/physics/pbspro/libexec/pbs_habitat to update it.


PBS Dataservice user postgres does not exist

I am confused with this message.
I gathered that the commercial version requires setting an user account for PBS Dataservice. but open source version seems not having this step?

any ideas?

thanks,

Sue

Cont.

my PBS_HOME directory doesn’t have subdirectory datastore.

Sue

Hi,
By default pbs expect postgres user to exist in server node. But if you want to use a different user, please
use --with-database-user=USER option ( Specify any non-root user account that owns the PBS database,.)
in configure.

Datastore directory is created when dataservice is initialized properly. In your case it failed hence never created.

Regards

@dilip-krishnan is correct. I’ll add that installing the PostgreSQL package supplied for your Linux distribution should automatically create an account named “postgres”. This account only needs to exist on the node where the pbs_server runs. Keep in mind that settings in files like /etc/nsswitch.conf will affect how user accounts are configured.

Hi, thanks.

I have tried a fresh installation again with this configuration eg.

$ configure --prefix=/usr/physics/pbspro --with-python=/usr/physics/python/anaconda2 --with-database-user=sxy

then

$ /etc/init.d/pbs start
Starting PBS
PBS Home directory /var/spool/pbs needs updating.
Running /usr/physics/pbspro/libexec/pbs_habitat to update it.


*** Error initializing the PBS dataservice
Error details:
/usr/bin exists, binaries missing…exiting

pbs_habitat is calling install_db which in turn calls /usr/bin/initdb. However no initdb available on our RHEL7. postgresql-devel-9.2.18-1.el7.x86_64 has been installed on our system via yum. but as shown in my previous email, user postgres does not exist.

is initdb part of postgresql?

any suggestions please? thanks,

Sue

Hi,
Can you check if these postgresql-9.2.18-1.el7.x86_64 & postgresql-server-9.2.18-1.el7.x86_64 packages are installed, if not please install and then try installing PBS. I suspect you missed the 2 step in INSTALL docs, and that these packages are not installed.

Regards.
Dilip

1 Like

Hi,

thanks. now postgresql-server-9.2.18-1.el7.x86_64 has been installed.

try it again:

/etc/init.d/pbs start

Starting PBS
PBS Home directory /var/spool/pbspro needs updating.
Running /usr/physics/pbspro/libexec/pbs_habitat to update it.


/usr/physics/pbspro/pgsql/pg_upgrade not found
Failed to upgrade PBS Datastore


there is no directory in $PBS_EXEC/pgsql on the server.
the following packages were installed via “yum install …”

rpm -qa | grep postgresql

postgresql-libs-9.2.18-1.el7.x86_64
postgresql-server-9.2.18-1.el7.x86_64
postgresql-devel-9.2.18-1.el7.x86_64
postgresql-9.2.18-1.el7.x86_64

any suggestions? thanks,

Sue

CAUTION: The following suggestion will result in deleting your existing PBS Pro configuration. Do NOT follow this suggestion unless you are willing to delete your existing PBS Pro configuration.

You are experiencing this problem due to ticket PP-306.

The reason PBS Pro is trying to upgrade your database is because it detects a previous installation has already created it. You should be able to delete PBS_HOME (/var/spool/pbs by default) and try restarting by issuing “/etc/init.d/pbs restart”. As noted above, this will delete any previous configuration you have created. A better suggestion might be to move (mv) /var/spool/pbs to /var/spool/pbs.old so that you can put it back if you need to.

Hi,

our pbspro server was rebooted. when I tried to start pbspro:

/etc/init.d/pbs start

Starting PBS
PBS comm
/usr/physics/pbspro/sbin/pbs_comm ready (pid=175159), Proxy Name:headnode.physics.usyd.edu.au:17001, Threads:4
PBS sched
Connecting to PBS dataservice…Failed to start PBS dataservice:[Failed to acquire lock on /var/spool/pbspro/datastore/pbs_dblock. Lock seems to be held by pid: 175438 running on host: headnode.physics.usyd.edu.au - cannot start]
.Failed to start PBS dataservice:[Failed to acquire lock on /var/spool/pbspro/datastore/pbs_dblock. Lock seems to be held by pid: 175438 running on host: headnode.physics.usyd.edu.au - cannot start]
.Failed to start PBS dataservice:[Failed to acquire lock on /var/spool/pbspro/datastore/pbs_dblock. Lock seems to be held by pid: 175438 running on host: headnode.physics.usyd.edu.au - cannot start]
.continuing in background.
PBS server

any ideas about what caused the failure of pbs dataservice?

thanks,

Sue

Hi Sue,

Could you please provide the output of “ps -ef | grep pbs” on your headnode? It’s possible there is another instance of the PBS data service already running. If you are certain this is not the case, you could try removing the lock file and restarting PBS.

Thanks,

Mike

Hi Mike,

thanks. the problem has been identified.
after system is rebooted (rhel7), system creates directory /var/run/postgresql with postgres as the owner.
however, when pbspro was installed, an existing user was chosen as database user, who is not “postgres”.
therefore, the user can not create lock file in /var/run/postgresql owned by “postgres”. that caused the failure of starting pbs dataservice.

I suggest that a few lines be added in pbspro/sbin/pbs_dataservice to check the ownership of /var/run/postgresql.
if it is different from the database user defined in /var/spool/pbspro/server_priv/db_user, the ownership should be changed accordingly.

thanks,

Sue

are there any options in configurations of dataservice for pbspro to store the lock file within $PBS_HOME?

Sue

Hi Micheal,

in your previous email, you mentioned,

actually if the database user name was not specified in pbspro compilation assuming user postgres is used, we would receive a message saying that postgres is not an existing user on the system.

Sue

Hello Sue,

That is an excellent suggestion. As a fellow member of the community, I encourage you to file a ticket on http://pbspro.atlassian.net

If you are unable to do so, please let me know and I’ll file one on your behalf.

Thanks,

Mike