Skip to main content
10-Marble
November 29, 2015
Solved

Install and Configure Single DB Postgres SQL

  • November 29, 2015
  • 2 replies
  • 6130 views

I am having a problem making the Postgres SQL works with Thingworx. I want to install a fresh Thingworx server with PostgresSQL. I followed the instructions from https://support.ptc.com/appserver/cs/doc/refdoc.jsp?p=browse_results&Product=ThingWorx&Release=&DocType=&Role= to create the database in ThingworxPostgresqlStorage folder and create another folder-ThingworxPlatform to put the modelproviderconfig.Json file. I can see that the database is created in pgAdmin III.

I deployed the Thingworx.war for Postgres but could not connect to Thingworx server. I got the error page as shown below. It seems like the database is not connected.

Can somebody help?

Thank you.

Best answer by pcheah

I know where is the problem, the problem is with the directory created to store the database.

In the manual, it is written "thingworxpostgresDBSetup –a postgres –u thingworx –l C:\ThingworxPostgresqlStorage", but by default, Thingworx is link to C:\ThingworxStorage. To solve this, I just changed the cmd script to "thingworxPostgresDBSetup –d thingworx –LC:\ThingworxStorage", it works!

note: Remember to set permission to modify this folder (C:\ThingworxStorage) or you will encounter Permission Denied error.

2 replies

pcheah10-MarbleAuthorAnswer
10-Marble
December 1, 2015

I know where is the problem, the problem is with the directory created to store the database.

In the manual, it is written "thingworxpostgresDBSetup –a postgres –u thingworx –l C:\ThingworxPostgresqlStorage", but by default, Thingworx is link to C:\ThingworxStorage. To solve this, I just changed the cmd script to "thingworxPostgresDBSetup –d thingworx –LC:\ThingworxStorage", it works!

note: Remember to set permission to modify this folder (C:\ThingworxStorage) or you will encounter Permission Denied error.

1-Visitor
December 1, 2015

In your case, can you please tell me if the database were created in the directory "ThingworxPostgresqlStorage" or in "ThingworxStorage".

pcheah10-MarbleAuthor
10-Marble
December 4, 2015

Hi QD N,

ThingworxStorage is created instead.

1-Visitor
December 5, 2015

Hi,

Is there a file PG_9.4_20... in your ThingworxStorage folder ?

1-Visitor
January 8, 2016

Hi,

I habe the same problem.

A folder with the name PG_9.4_20... exist in the folder ThingworxStorage.


If I use the SQL create statement from the file thingworx-database-setup.sql.

I get from PostgreSQL this error "FEHLER: konnte Verzeichnis „pg_tblspc/27596/PG_9.4_201409291/28056“ nicht erzeugen: No such file or directory"

If I remove the tablespace thingworx and use the standard tablespace I get no error.

Have you any ideas why the problem is the own tablespace?

Thanxs.

Sven