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

Community Tip - You can change your system assigned username to something more personal in your community settings. X

Problem running thingworxPostgresDBSetup.bat for setting up PostgreSQL for Thingworx.

sbt
13-Aquamarine
13-Aquamarine

Problem running thingworxPostgresDBSetup.bat for setting up PostgreSQL for Thingworx.

Hello Team,

I have installed Thingworx 8.0 version. After the thingworx installation i am trying to configure PostgreSQL 9.5.

Downloaded the batch files required to configure thingworx DB.

Created folders in the root directory as per the document and provided necessary privileges.

Configured the batch file and running it, i am getting the below error.

Thanks

Sunay

1 ACCEPTED SOLUTION

Accepted Solutions
supandey
19-Tanzanite
(To:sbt)

Hi Sunay, PostgreSQL 9.5 is currently not supported, please see system requirements guide for ThingWorx 8.0 You will need 9.4


Plus it appears you might not have created the twadmin role for the PostgreSQL server prior to running this batch file.

View solution in original post

15 REPLIES 15
supandey
19-Tanzanite
(To:sbt)

Hi Sunay, PostgreSQL 9.5 is currently not supported, please see system requirements guide for ThingWorx 8.0 You will need 9.4


Plus it appears you might not have created the twadmin role for the PostgreSQL server prior to running this batch file.

sbt
13-Aquamarine
13-Aquamarine
(To:supandey)

Alright sushant,

Do i need to installed postgresql and run all the batch files before installing thingworx 8.0 in my system..?

supandey
19-Tanzanite
(To:sbt)

Yes, as also highlighted in the setup guide for ThingWorx, you will need to have user role read + the ThingWorx DB and it's schema setup prior to deploying and starting ThingWorx's war file in Tomcat.

sbt
13-Aquamarine
13-Aquamarine
(To:supandey)

Sushant,

I have installed Postgre9.4

added the user role "twadmin"

executed the batch file

thingworxpostgresDBSetup –a postgres –u twadmin –l C:\ThingworxPostgresqlStorage

executed the batch file

  1. thingworxPostgresSchemaSetup.bat

added <postgres-installation>/bin folder to your system path variable.

Added THINGWORX_PLATFORM_SETTINGS variable

added platformsetting.json file with the modifications in password.

Now i think i am good to go ahead and install thingworx..?

supandey
19-Tanzanite
(To:sbt)

Sure looks like you have everything covered

sbt
13-Aquamarine
13-Aquamarine
(To:supandey)

And 1 last thing is that

I ll be configuring only the persistent provider for postgreSQL settings in the platform-setting.json file, though the document has all the providers.

And even if i need to use any other database , then i ll use connectors for respective database.

I hope i am right.

supandey
19-Tanzanite
(To:sbt)

Yes. It depends which database you plan to use, you'll have to find the JDBC connector for it from the ThingWorx Marketplace. So does your setup works now?

sbt
13-Aquamarine
13-Aquamarine
(To:supandey)

Finally

Thanks for your help.

supandey
19-Tanzanite
(To:sbt)

I'm glad it worked out

sbt
13-Aquamarine
13-Aquamarine
(To:supandey)

sushant,

sorry seems like something went wrong

I see the persistent provider has H2PersistantProviderpackage

Not sure what i have missed.

below is the platform-settings.json used.

{

"PersistenceProviderPackageConfigs": {

"PostgresPersistenceProviderPackage": {

"ConnectionInformation": {

"acquireIncrement": 5,

"acquireRetryAttempts": 3,

"acquireRetryDelay": 10000,

"checkoutTimeout": 1000000,

"driverClass": "org.postgresql.Driver",

"fetchSize": 5000,

"idleConnectionTestPeriod": 60,

"initialPoolSize": 5,

"jdbcUrl": "jdbc:postgresql://localhost:5432/thingworx",

"maxConnectionAge": 0,

"maxIdleTime": 0,

"maxIdleTimeExcessConnections": 300,

"maxPoolSize": 100,

"maxStatements": 100,

"minPoolSize": 5,

"numHelperThreads": 8,

"testConnectionOnCheckout": false,

"unreturnedConnectionTimeout": 0,

"password": "password123#",

"username": "twadmin"

}

}

}

}

And also my thingworx and the postgresql are on the same server.

ytella
17-Peridot
(To:sbt)

Hi Sunay, While deploying ThingWorx.war file in tomcat webapps folder, have you deleted the existing Thingworx, ThingWorxStorage and ThingWorxBackupStorage folders?

supandey
19-Tanzanite
(To:sbt)

Sunay, you should check the package that you have deployed. If you had any old ThingWorx.war file deployed then make sure you have removed it and that it's undeployed from Tomcat. As Yamini already noted do not use any existing folders and also be sure to download and use the PostgreSQL package from PTC Software Download page.

sbt
13-Aquamarine
13-Aquamarine
(To:supandey)

I have to paste the .war file which has come as part of ThingWorx-Platform-Postgres-8-0-3??

and delete backupstorage and thingworx storage folders created in the root.

I ll retain the platform and postgresqlstorage as i have run the batch files .

supandey
19-Tanzanite
(To:sbt)

Right, make sure you maintain copy of old folders until you are sure your new setup is up and running as expected. Just in case if you need old data to revert to.

sbt
13-Aquamarine
13-Aquamarine
(To:supandey)

Perfect, got the persistent provider as postgresql

Top Tags