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

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

Install and Configure Single DB Postgres SQL

pcheah
10-Marble

Install and Configure Single DB Postgres SQL

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.

ACCEPTED SOLUTION

Accepted Solutions
pcheah
10-Marble
(To: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.

View solution in original post

8 REPLIES 8
pcheah
10-Marble
(To: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.

qn
12-Amethyst
12-Amethyst
(To:pcheah)

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

pcheah
10-Marble
(To:pcheah)

Hi QD N,

ThingworxStorage is created instead.

qn
12-Amethyst
12-Amethyst
(To:pcheah)

Hi,

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

spelzer
1-Visitor
(To:qn)

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

yigu
7-Bedrock
(To:spelzer)

Hi Sven,

I got the same error.

Then I found in batch file it set "SET tablespace_location=/ThingworxPostgresqlStorage", which I suppose is for Linux or alike.

This error disappeared after I changed the location to the path of ↑folder on my drive.

If you don't mind you could give it a go.

Many thanks

spatel-21
1-Visitor
(To:yigu)

Hi Yifu,

what does your folder structure look like?

- Siddharth

yigu
7-Bedrock
(To:spatel-21)

Hi Siddharth,

My memory is a little bit vague, I suppose the folder path was "D:\ThingworxStorage", and I think I also wrote it in the batch.

Many thanks

Yifu

Announcements


Top Tags