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

Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X

Error occurred running Thingworx in Docker

skawamoto
1-Newbie

Error occurred running Thingworx in Docker

I am trying to run Thingworx with Docker.

There is not one container, but Tomcat and Postgres.

■Enviroment

 ●Version

  ・Tomcat :8.0.41

  ・JDK :1.8.0_121

  ・Postgres :9.4

■Error

 ●Error occurrence procedure

  1.Execute initdb in the container of Postgres.

  2.Execute the following in the container of Postgres.

   ・thingworxPostgresDBSetup.sh

   ・thingworxPostgresSchemaSetup.sh

  3.Excute tomcat in the container of tomcat.

  4.Error occured.

 

 ●Error message

 

~~~

com.thingworx.common.exceptions.ModelAccessException: ERROR: null value in column "is_property_provider_supported" violates not-null constraint

Detail: Failing row contains (1, Server, 0, t, t, null, 809, 1, null, 6, 6, 0, b476, 2017-03-10 04:13:15.107).

~~~

Caused by: org.postgresql.util.PSQLException: ERROR: null value in column "is_property_provider_supported" violates not-null constraint

  Detail: Failing row contains (1, Server, 0, t, t, null, 809, 1, null, 6, 6, 0, b476, 2017-03-10 04:13:15.107).

~~~

java.lang.Exception: Unable to initialize and start system: ERROR: null value in column "is_property_provider_supported" violates not-null constraint

~~~

-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

■Postscript

  From the error message, it seems that the column "is_property_provider_supported" seems to be probleming, so I commented   out the line that adds this column from the thingworx-model-schema.sql file.

  Then, the following error message occurred.

  "Null value in column "property_schema_version" violates not-null constraint"

  So I also commented out the column "property_schema_version".

  As a result, I confirmed that Thingworx works normally.

 

 ●The actual thingworx-model-schema.sql file.

 

CREATE TABLE IF NOT EXISTS system_version (

    pid serial primary key,

    server_name character varying(255) NOT NULL,

    server_code integer NOT NULL,

    is_data_provider_supported boolean NOT NULL,

    is_model_provider_supported boolean NOT NULL,

--    is_property_provider_supported boolean NOT NULL,

    model_schema_version integer NOT NULL,

    data_schema_version integer NOT NULL,

--    property_schema_version integer NOT NULL,

    major_version character varying(10) NOT NULL,

    minor_version character varying(10),

    revision character varying(45) NOT NULL,

    build character varying(45) NOT NULL,

    creationDate timestamp without time zone DEFAULT now()

);

 ●Concerns

 

  If you modify this SQL file distributed from PTC like this,

  Will not an error occur at other times?

1 ACCEPTED SOLUTION

Accepted Solutions

Hi Lily,

I confirmed that Version 7.X works properly with the following Docker-compose.

Https://github.com/Foxoncz/docker-thingworx

I tried it with version 7.3.2 and 7.3.3 and confirmed that it worked normally.

However, regarding version 7.40,

I confirmed that it works by adding the following two lines to Dockerfile.tomcat.

-------------------------------------------------------------------------------------------

COPY /tw/license.bin/ThingworxPlatform/license.bin

ENV LD_LIBRARY_PATH $ LD_LIBRARY_PATH: $ CATALINA_HOME / webapps / Thingworx / WEB-INF / extensions

-------------------------------------------------------------------------------------------

Conversely, we confirmed that 6.6 series (confirmed in 6.6.0 and 6.6.11) will be reproduced (does not work properly) even with the above docker-compose.

Because we have not done it in 7.X series,

I will build it in this version.

However, if you do not know the root cause, there is no guarantee that it will not happen in 7.X series,

For commercial use it is necessary to turn on a sufficient evaluation test.

Since I think that the operation in the docker container will be further increased as the needs of the development and management side,

It will be greatly appreciated if you will be able to support the official operation.

View solution in original post

9 REPLIES 9

Hi Suguru,

From you error log, it definitely be Postgresql issue.

1. Did you install Postgresql successfully?

    Open pgAdimnIII to check if you can connect with you Postgresql.

2 Did you connect Postgresql with ThingWorx properly?

    a. Add the <postgres-installation>/bin folder to your system path variable.

    b. Run commend in CMD thingworxpostgresDBSetup –a postgres –u twadmin –l C:\ThingworxPostgresqlStorage

    c. Run commend in CMD thingworxPostgresSchemaSetup.bat

    d. Check you ThingWorx_Platform folder and platform-settings.json file. Are the on the right place? Did you set the right username and password?

Lily

Hi Lily,

Thank you for your reply!

> 1. Did you install Postgresql successfully?

I confirmed that I can connect to postgresql using pgadminⅢ.

Therefore, the postgresql is installed correctly.

> 2 Did you connect Postgresql with ThingWorx properly?

>  a. Add the <postgres-installation>/bin folder to your system path variable.

>  b. Run commend in CMD thingworxpostgresDBSetup –a postgres –u twadmin –l C:\ThingworxPostgresqlStorage

I executed a command, but no error occurred.

>  c. Run commend in CMD thingworxPostgresSchemaSetup.bat

I executed a command, but no error occurred.

>  d. Check you ThingWorx_Platform folder and platform-settings.json file. Are the on the right place? Did you set the right username and password?

I put modelproviderconfig.json in the ThingWorx_Platform folder instead of platform-settings.json.

User names and passwords have correct values written in JSON files.

I tried to place platform-settings.json in the ThingWorx_Platform folder instead of modelproviderconfig.json.

However, the same error message below occurred.

~~~

java.lang.Exception: Unable to initialize and start system: ERROR: null value in column "is_property_provider_support

ed" violates not-null constraint

~~~

Suguru

Hi Suguru,

Please check the ThingWorx version you are installed right now.

After ThingWorx 6.5, we don't use modelproviderconfig.json any more. Instead, we use platform-settings.json

Lily

liliu
8-Gravel
(To:liliu)

Hi Suguru,

The content of platform-settings.json file should be

{

"PersistenceProviderPackageConfigs": {

  "PostgresPersistenceProviderPackage": {

   "ConnectionInformation": {

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

    "password": "password",

    "username": "twadmin"

   }

  }

}

}

Hi Lily,

I replaced from modelproviderconfig.json to file platform-settings.json.

I checked the contents of the file and put the file as you said.

However, the same error occurred.

ankigupta
5-Regular Member
(To:skawamoto)

Hi suguru kawamoto​,

I addition to what Li said; could you please confirm the ThingWorx version you are on?

.Hi Ankit,

I am using version 6.6.0-b476 Thingworx.

Hi Suguru,

Is this the first time you install ThingWorx? May I know why do you want to use ThingWorx 6.6? This version is really old and we have many great updates in on ThingWorx 7.3. I suggest to install the newest version.

BR,

Lily

Hi Lily,

I confirmed that Version 7.X works properly with the following Docker-compose.

Https://github.com/Foxoncz/docker-thingworx

I tried it with version 7.3.2 and 7.3.3 and confirmed that it worked normally.

However, regarding version 7.40,

I confirmed that it works by adding the following two lines to Dockerfile.tomcat.

-------------------------------------------------------------------------------------------

COPY /tw/license.bin/ThingworxPlatform/license.bin

ENV LD_LIBRARY_PATH $ LD_LIBRARY_PATH: $ CATALINA_HOME / webapps / Thingworx / WEB-INF / extensions

-------------------------------------------------------------------------------------------

Conversely, we confirmed that 6.6 series (confirmed in 6.6.0 and 6.6.11) will be reproduced (does not work properly) even with the above docker-compose.

Because we have not done it in 7.X series,

I will build it in this version.

However, if you do not know the root cause, there is no guarantee that it will not happen in 7.X series,

For commercial use it is necessary to turn on a sufficient evaluation test.

Since I think that the operation in the docker container will be further increased as the needs of the development and management side,

It will be greatly appreciated if you will be able to support the official operation.

Top Tags