Postgresql error while stating PBS

After new installation of PBS , I am getting below error while starting pbs service.

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…
Starting PBS Data Service…
waiting for server to start…2018-08-06 14:56:05 ISTFATAL: could not create lock file “/var/run/postgresql/.s.PGSQL.15007.lock”: No such file or directory
stopped waiting
pg_ctl: could not start server
Examine the log output.
Failed to start PBS Data Service
Error starting PBS Data Service

Please check



I have gone through these suggstions but none worked. Still i am not able to start pbs service.

[root@engit-05 ~]# ls -ld /var/spool/pbs/datastore
drwxr-xr-x 2 root root 4096 Aug 9 14:44 /var/spool/pbs/datastore
[root@engit-05 ~]#
[root@engit-05 ~]# chown -R postgres:postgres /var/spool/pbs/datastore
[root@engit-05 ~]#
[root@engit-05 ~]# ls -ld /var/spool/pbs/datastore
drwxr-xr-x 2 postgres postgres 4096 Aug 9 14:44 /var/spool/pbs/datastore
[root@engit-05 ~]#
[root@engit-05 ~]# ps uax|grep pbs
root 22310 0.0 0.0 112704 972 pts/0 S+ 14:45 0:00 grep --color=auto pbs
[root@engit-05 ~]#
[root@engit-05 ~]# /opt/pbs/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]
.Failed to start PBS dataservice:[PBS Data Service not initialized]
continuing in background.
[root@engit-05 ~]#
[root@engit-05 ~]# ls -ld /var/spool/pbs/datastore
drwxr-xr-x 2 postgres postgres 4096 Aug 9 14:44 /var/spool/pbs/datastore
[root@engit-05 ~]#
[root@engit-05 ~]# chown -R pbsdata:pbsdata /var/spool/pbs/datastore
[root@engit-05 ~]# ls -ld /var/spool/pbs/datastore
drwxr-xr-x 2 pbsdata pbsdata 4096 Aug 9 14:44 /var/spool/pbs/datastore
[root@engit-05 ~]#
[root@engit-05 ~]# ps uax|grep pbs
root 22523 0.0 0.0 89836 1820 ? Ss 14:46 0:00 /opt/pbs/sbin/pbs_server.bin
root 22765 0.0 0.0 112704 976 pts/0 S+ 14:47 0:00 grep --color=auto pbs
[root@engit-05 ~]#
[root@engit-05 ~]# kill -9 22523
[root@engit-ssd-05 ~]# /opt/pbs/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]
.Failed to start PBS dataservice:[PBS Data Service not initialized]
continuing in background.
[root@engit-05 ~]# ps uax|grep pbs
root 23020 0.0 0.0 89836 1824 ? Ss 14:47 0:00 /opt/pbs/sbin/pbs_server.bin
root 23142 0.0 0.0 112704 976 pts/0 R+ 14:48 0:00 grep --color=auto pbs
[root@engit-05 ~]#

I notice that when I restarted pbs with below method , it removed “/var/spool/pbs/datastore”. do not know why it happens.

[root@engit-05 ~]#
[root@engit-05 ~]# ls -ld /var/spool/pbs/datastore
drwxr-xr-x 2 pbsdata pbsdata 4096 Aug 9 14:44 /var/spool/pbs/datastore
[root@engit-05 ~]#
[root@engit-05 ~]# /etc/init.d/pbs start
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…
Starting PBS Data Service…
pg_ctl: could not start server
Examine the log output.
Failed to start PBS Data Service
Error starting PBS Data Service
[root@engit-05 ~]#
[root@engit-05 ~]# ls -ld /var/spool/pbs/datastore
ls: cannot access /var/spool/pbs/datastore: No such file or directory
[root@engit-05 ~]#
[root@engit-05 ~]#

Could you please share the Operating System flavour and version.
Did you compile is from the source or used the rpms ?
Would it be possible to re-install from scratch ?

Thank you

pg_ctl is failing somewhere, and it says to check postgres logs. What do they say?

your postgresql-server installation uses unix socket location which is not exist on your distribution.
it’s hard to reveal this error but easy to fix.

find the line
unix_socket_directories=’/var/run/postgresql’ (it’s default location of distribution Debian/Ubuntu)
to
unix_socket_directories=’/tmp’ (it’s default for CentOS/RHEL) in your postgresql.conf would fix this.

I had an issue with similar symptoms, not sure if the underlying issue is the same or not but putting here for anyone else who it might benefit.

as root:
cd /opt/pbs/libexec
./install_db
./pbs_init.d start

I wasted a lot of time suffering with this issue today, tried all suggestions on this and other related pages, nothing worked. What did work in the end was disabling SElinux, posting in case it helps others.

Yes. Selinux must be disabled before starting pbs. You can write one checking script about env before installing PBSPro.

1 Like