# PBS Pro Installation with source code

**URL:** <https://community.openpbs.org/t/pbs-pro-installation-with-source-code/206>\
**Category:** Users/Site Administrators\
**Created:** [August 11, 2016, 3:03am UTC](https://community.openpbs.org/t/pbs-pro-installation-with-source-code/206 "2016-08-11T03:03:14Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![sxy](https://avatars.discourse-cdn.com/v4/letter/s/c89c15/32.png) [@sxy](https://community.openpbs.org/u/sxy)\
**Post date:** [August 11, 2016, 3:03am UTC](https://community.openpbs.org/t/pbs-pro-installation-with-source-code/206/1 "2016-08-11T03:03:14Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ashwathraop](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.openpbs.org/ashwathraop/32/79_2.png) [@ashwathraop](https://community.openpbs.org/u/ashwathraop)\
**Post date:** [August 11, 2016, 4:01am UTC](https://community.openpbs.org/t/pbs-pro-installation-with-source-code/206/2 "2016-08-11T04:01:47Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![sxy](https://avatars.discourse-cdn.com/v4/letter/s/c89c15/32.png) [@sxy](https://community.openpbs.org/u/sxy)\
**Post date:** [August 11, 2016, 4:50am UTC](https://community.openpbs.org/t/pbs-pro-installation-with-source-code/206/3 "2016-08-11T04:50:23Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![dilip-krishnan](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.openpbs.org/dilip-krishnan/32/75_2.png) [@dilip-krishnan](https://community.openpbs.org/u/dilip-krishnan)\
**Post date:** [August 11, 2016, 9:27am UTC](https://community.openpbs.org/t/pbs-pro-installation-with-source-code/206/4 "2016-08-11T09:27:40Z")

</div>

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

Regards  
Dilip

---

<div class="post-metadata">

**Author:** ![mkaro](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.openpbs.org/mkaro/32/85_2.png) [@mkaro](https://community.openpbs.org/u/mkaro)\
**Post date:** [August 11, 2016, 5:13pm UTC](https://community.openpbs.org/t/pbs-pro-installation-with-source-code/206/5 "2016-08-11T17:13:12Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![sxy](https://avatars.discourse-cdn.com/v4/letter/s/c89c15/32.png) [@sxy](https://community.openpbs.org/u/sxy)\
**Post date:** [March 31, 2017, 4:56am UTC](https://community.openpbs.org/t/pbs-pro-installation-with-source-code/206/6 "2017-03-31T04:56:47Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![sxy](https://avatars.discourse-cdn.com/v4/letter/s/c89c15/32.png) [@sxy](https://community.openpbs.org/u/sxy)\
**Post date:** [March 31, 2017, 5:37am UTC](https://community.openpbs.org/t/pbs-pro-installation-with-source-code/206/7 "2017-03-31T05:37:02Z")

</div>

Cont.

my PBS\_HOME directory doesn’t have subdirectory datastore.

Sue

---

<div class="post-metadata">

**Author:** ![dilip-krishnan](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.openpbs.org/dilip-krishnan/32/75_2.png) [@dilip-krishnan](https://community.openpbs.org/u/dilip-krishnan)\
**Post date:** [April 4, 2017, 11:36am UTC](https://community.openpbs.org/t/pbs-pro-installation-with-source-code/206/8 "2017-04-04T11:36:29Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![mkaro](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.openpbs.org/mkaro/32/85_2.png) [@mkaro](https://community.openpbs.org/u/mkaro)\
**Post date:** [April 5, 2017, 11:33pm UTC](https://community.openpbs.org/t/pbs-pro-installation-with-source-code/206/9 "2017-04-05T23:33:54Z")

</div>

@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.

---

<div class="post-metadata">

**Author:** ![sxy](https://avatars.discourse-cdn.com/v4/letter/s/c89c15/32.png) [@sxy](https://community.openpbs.org/u/sxy)\
**Post date:** [April 6, 2017, 5:07am UTC](https://community.openpbs.org/t/pbs-pro-installation-with-source-code/206/10 "2017-04-06T05:07:40Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![dilip-krishnan](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.openpbs.org/dilip-krishnan/32/75_2.png) [@dilip-krishnan](https://community.openpbs.org/u/dilip-krishnan)\
**Post date:** [April 6, 2017, 5:34am UTC](https://community.openpbs.org/t/pbs-pro-installation-with-source-code/206/11 "2017-04-06T05:34:27Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![sxy](https://avatars.discourse-cdn.com/v4/letter/s/c89c15/32.png) [@sxy](https://community.openpbs.org/u/sxy)\
**Post date:** [April 10, 2017, 5:22am UTC](https://community.openpbs.org/t/pbs-pro-installation-with-source-code/206/12 "2017-04-10T05:22:40Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![mkaro](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.openpbs.org/mkaro/32/85_2.png) [@mkaro](https://community.openpbs.org/u/mkaro)\
**Post date:** [April 10, 2017, 4:03pm UTC](https://community.openpbs.org/t/pbs-pro-installation-with-source-code/206/13 "2017-04-10T16:03:04Z")

</div>

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](https://pbspro.atlassian.net/browse/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.

---

<div class="post-metadata">

**Author:** ![sxy](https://avatars.discourse-cdn.com/v4/letter/s/c89c15/32.png) [@sxy](https://community.openpbs.org/u/sxy)\
**Post date:** [May 3, 2017, 12:57am UTC](https://community.openpbs.org/t/pbs-pro-installation-with-source-code/206/14 "2017-05-03T00:57:52Z")

</div>

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](http://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](http://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](http://headnode.physics.usyd.edu.au) - cannot start]  
.continuing in background.  
PBS server

any ideas about what caused the failure of pbs dataservice?

thanks,

Sue

---

<div class="post-metadata">

**Author:** ![mkaro](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.openpbs.org/mkaro/32/85_2.png) [@mkaro](https://community.openpbs.org/u/mkaro)\
**Post date:** [May 3, 2017, 1:23am UTC](https://community.openpbs.org/t/pbs-pro-installation-with-source-code/206/15 "2017-05-03T01:23:25Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![sxy](https://avatars.discourse-cdn.com/v4/letter/s/c89c15/32.png) [@sxy](https://community.openpbs.org/u/sxy)\
**Post date:** [May 3, 2017, 6:34am UTC](https://community.openpbs.org/t/pbs-pro-installation-with-source-code/206/16 "2017-05-03T06:34:45Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![sxy](https://avatars.discourse-cdn.com/v4/letter/s/c89c15/32.png) [@sxy](https://community.openpbs.org/u/sxy)\
**Post date:** [May 3, 2017, 7:07am UTC](https://community.openpbs.org/t/pbs-pro-installation-with-source-code/206/17 "2017-05-03T07:07:27Z")

</div>

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

Sue

---

<div class="post-metadata">

**Author:** ![sxy](https://avatars.discourse-cdn.com/v4/letter/s/c89c15/32.png) [@sxy](https://community.openpbs.org/u/sxy)\
**Post date:** [May 5, 2017, 1:39am UTC](https://community.openpbs.org/t/pbs-pro-installation-with-source-code/206/18 "2017-05-05T01:39:29Z")

</div>

Hi Micheal,

in your previous email, you mentioned,

> [@mkaro](#):
>
> . 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.

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

---

<div class="post-metadata">

**Author:** ![mkaro](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.openpbs.org/mkaro/32/85_2.png) [@mkaro](https://community.openpbs.org/u/mkaro)\
**Post date:** [May 8, 2017, 2:48am UTC](https://community.openpbs.org/t/pbs-pro-installation-with-source-code/206/19 "2017-05-08T02:48:05Z")

</div>

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](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
