cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to execute thingworxPostgresDBSetup.sh

Highlighted
Level 1

Unable to execute thingworxPostgresDBSetup.sh

Hi Team,

Executing_DBSetup_As_Sudo_User.pngExecuting_DBSetup_As_Postgres_User_Errors.JPG

We have tried to install postgres version of thingworx. While setting up, we got to execute the thingworxPostgresDBSetup.sh as mentioned in Thingworx installation document, Page No: 42, Step number 14, we have the following command.

sudo sh thingworxPostgresDBSetup.sh -a postgres -u twadmin -l /ThingworxPostgresqlStorage

But we are getting errors while executing the same in two ways,

  1. 1.       Running the step as sudo user

We are getting like “error while loading shared libraries :libpq.so.rh-postgresql” as attached in the screen shot.

  1. 2.       Running the step as postgres user

We are getting error like “/ThingworxPostgresqlStorage” : Permission Denied

Please let me know if anybody has faced this issue before and fixed the same.

5 REPLIES 5

Re: Unable to execute thingworxPostgresDBSetup.sh

Harshpreet, could you confirm the following

1. Version for ThingWorx, PostgreSQL?

2. Check if sufficient access rights are available on that folder

Here's the blog you want to check for more help on running script for postgre sql Troubleshooting Syntax Error when running postgresql set up scripts

Re: Unable to execute thingworxPostgresDBSetup.sh

Please also do share the OS type and version details

Re: Unable to execute thingworxPostgresDBSetup.sh

Are all the scripts/downloads in the same partition as your installed postgresql db, tomcat, the ThingworxPlatform , and ThingworxPostgresqlStorage folders? They have to be in the same partition. Also grant all of the permissions on all folders.

Do you have access to pgadminIII? I would check to see if a tablespace thingworx got created, and if so - remove it; then check the ThingworxPostgresqlStorage folder and clean up the insides too before re-running the script.

You may also take a look at this Installation Script for Thingworx platform on Redhat/CentOS/Ubuntu

Re: Unable to execute thingworxPostgresDBSetup.sh

Hi Harshpreet Kaur​,

This seems some generic error and I can find similar errors on Google.

Can you try to locate the libpq.so.rh-postgresql library file and see if it has required file permission and is on the same partition where scripts are available.

Re: Unable to execute thingworxPostgresDBSetup.sh

Hi,

Thank you for help, i tried to figure out given answers but at last found the correct answer

While executing the bash file, some grant permissions were set by SELinux,

Resolution- 1) Go to path where bash file is placed thingworxPostgresDBSetup.sh i.e till install folder

2) Run command-> getenforce

3) If output is 'Enforcing' it means some permissions were set which needs to be unset

4) Run command-> setenforce 0

5) Now execute the bash file by login to the postgres user.