Problem starting PBS server


#1

In have installed PBS Server on CentOS system from given RPM package after resolving associated dependencies which was successful. When I invoke the server, I see following error message.

[root@localhost sbin]# pbs_server
Connecting to PBS dataservice..Failed to start PBS dataservice:[PBS Data Service not initialized]
.Failed to start PBS dataservice:[PBS Data Service not initialized]
.Failed to start PBS dataservice:[PBS Data Service not initialized]
.Failed to start PBS dataservice:[PBS Data Service not initialized]
continuing in background.

The ps command shows following:

[root@localhost sbin]# ps -ef | grep pbs
root      4270     1  0 02:42 ?        00:00:00 /opt/pbs/sbin/pbs_server.bin
root      4921  4029  0 02:45 pts/0    00:00:00 grep --color=auto pbs

And restarting pbs service given following message:

[root@localhost sbin]# service pbs restart
Restarting PBS
Stopping PBS
Killing Server.
PBS server - was pid: 4270
Waiting for shutdown to complete
Starting PBS
PBS Home directory /var/spool/pbs needs updating.
Running /opt/pbs/libexec/pbs_habitat to update it.
***
*** Error initializing the PBS dataservice
Error details:
Creating the PBS Data Service...
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.

The database cluster will be initialized with locale "C".
The default text search configuration will be set to "english".

initdb: could not access directory "/var/spool/pbs/datastore": Permission denied
Error creating PBS datastore

Kindly help me to resolve this matter.

Thanks

Muhammad Waseem


#2

PBSPro uses pgsql to store the server configuration, and comes with a pgsql embedded (see rpm -ql pbspro-server). You will need to create a new system-level user, typically called ‘pbsdata’, and ensure that /var/spool/pbs/datastore is owned by that user. The RPM does not automatically create that user, which is not obvious, in my opinion. I would do this on a new PBSPro install:

groupadd pbsdata
useradd -g pbsdata -r pbsdata
mkdir -p /var/spool/pbs/datastore
chown pbsdata:pbsdata /var/spool/pbs/datastore

Then start PBS server.


#3

Just to clarify… the commercial version of PBS Pro comes packaged with PostgreSQL, where the open source version lists PostgreSQL as a prerequisite. When PostgreSQL is installed independently of PBS Pro it creates a user named postgres, and the open source release uses that user ID for the PBS Pro database. I’ve seen cases where the ownership of the PBS Pro database directory has been inadvertently changed. This can be fixed with the following command:

chown -R postgres:postgres /var/spool/pbs/datastore