Skip to main content
3-Newcomer
May 26, 2023
Question

TWX platform installation problem (TWX 9.4.0/ Ubuntu/ MSSQL) => Tomcat fails to start after setup

  • May 26, 2023
  • 1 reply
  • 1284 views

Hi,

for a test system we are trying a setup of the ThingWorx platform with a MSSQL database:

 

 

 TWX: 9.4.0 on Ubuntu 22.04, 5.15.0 kernel, Tomcat 9.0.58, installed from
 MED-61212-CD-094_F000_ThingWorx-Platform-Mssql-9-4-0.zip
 MSSQL: 15.0.4298 (development licence) on Arch Linux, 6.3.3 kernel

 

 

 

While starting tomcat an exception is thrown and thus TWX does not start:

 

 

Mai 26 11:25:13 ubuntu-22-04 tomcat9[104372]: Deploying web application archive [/var/lib/tomcat9/webapps/Thingworx.war]
Mai 26 11:25:20 ubuntu-22-04 tomcat9[104372]: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
Mai 26 11:25:20 ubuntu-22-04 tomcat9[104372]: 11:25:20,473 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback-test.xml]
Mai 26 11:25:20 ubuntu-22-04 tomcat9[104372]: 11:25:20,473 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback.xml] at [jar:file:/var/lib/tomcat9/webapps/Thingworx/WEB-INF/lib/thingworx-platform-common-9.4.0-b49.jar!/logback.xml]
Mai 26 11:25:20 ubuntu-22-04 tomcat9[104372]: 11:25:20,488 |-INFO in ch.qos.logback.core.joran.spi.ConfigurationWatchList@7a8f22d6 - URL [jar:file:/var/lib/tomcat9/webapps/Thingworx/WEB-INF/lib/thingworx-platform-common-9.4.0-b49.jar!/logback.xml] is not of type file
Mai 26 11:25:20 ubuntu-22-04 tomcat9[104372]: 11:25:20,522 |-INFO in ch.qos.logback.classic.joran.action.LoggerContextListenerAction - Adding LoggerContextListener of type [com.thingworx.logging.LogbackCustomLoggerContextListener] to the object stack
Mai 26 11:25:20 ubuntu-22-04 tomcat9[104372]: 11:25:20,473 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback-test.xml]
Mai 26 11:25:20 ubuntu-22-04 tomcat9[104372]: 11:25:20,473 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback.xml] at [jar:file:/var/lib/tomcat9/webapps/Thingworx/WEB-INF/lib/thingworx-platform-common-9.4.0-b49.jar!/logback.xml]
Mai 26 11:25:20 ubuntu-22-04 tomcat9[104372]: 11:25:20,488 |-INFO in ch.qos.logback.core.joran.spi.ConfigurationWatchList@7a8f22d6 - URL [jar:file:/var/lib/tomcat9/webapps/Thingworx/WEB-INF/lib/thingworx-platform-common-9.4.0-b49.jar!/logback.xml] is not of type file
Mai 26 11:25:20 ubuntu-22-04 tomcat9[104372]: 11:25:20,522 |-INFO in ch.qos.logback.classic.joran.action.LoggerContextListenerAction - Adding LoggerContextListener of type [com.thingworx.logging.LogbackCustomLoggerContextListener] to the object stack
Mai 26 11:25:20 ubuntu-22-04 tomcat9[104372]: 11:25:20,976 |-ERROR in ch.qos.logback.core.joran.spi.Interpreter@3:88 - RuntimeException in Action for tag [contextListener] com.thingworx.exceptions.ConfigurationException: java.io.IOException: error trying to initialize Platform storage [setting: /ThingworxStorage/database]
Mai 26 11:25:20 ubuntu-22-04 tomcat9[104372]: at com.thingworx.exceptions.ConfigurationException: java.io.IOException: error trying to initialize Platform storage [setting: /ThingworxStorage/database]
Mai 26 11:25:20 ubuntu-22-04 tomcat9[104372]: at at com.thingworx.system.configuration.PlatformSettings.getInstance(PlatformSettings.java:3640)
Mai 26 11:25:20 ubuntu-22-04 tomcat9[104372]: at at com.thingworx.logging.LogbackUtilities.loadLogbackConfiguration(LogbackUtilities.java:54)
Mai 26 11:25:20 ubuntu-22-04 tomcat9[104372]: at at com.thingworx.logging.LogUtilities.initializeLoggerContext(LogUtilities.java:440)
Mai 26 11:25:20 ubuntu-22-04 tomcat9[104372]: at at com.thingworx.logging.LogbackCustomLoggerContextListener.start(LogbackCustomLoggerContextListener.java:23)
Mai 26 11:25:20 ubuntu-22-04 tomcat9[104372]: at at ch.qos.logback.classic.joran.action.LoggerContextListenerAction.end(LoggerContextListenerAction.java:70)
Mai 26 11:25:20 ubuntu-22-04 tomcat9[104372]: at at ch.qos.logback.core.joran.spi.Interpreter.callEndAction(Interpreter.java:309)
Mai 26 11:25:20 ubuntu-22-04 tomcat9[104372]: at at ch.qos.logback.core.joran.spi.Interpreter.endElement(Interpreter.java:193)
Mai 26 11:25:20 ubuntu-22-04 tomcat9[104372]: at at ch.qos.logback.core.joran.spi.Interpreter.endElement(Interpreter.java:179)
Mai 26 11:25:20 ubuntu-22-04 tomcat9[104372]: at at ch.qos.logback.core.joran.spi.EventPlayer.play(EventPlayer.java:62)
Mai 26 11:25:20 ubuntu-22-04 tomcat9[104372]: at at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:165)
Mai 26 11:25:20 ubuntu-22-04 tomcat9[104372]: at at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:152)
Mai 26 11:25:20 ubuntu-22-04 tomcat9[104372]: at at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:110)
Mai 26 11:25:20 ubuntu-22-04 tomcat9[104372]: at at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:53)
Mai 26 11:25:20 ubuntu-22-04 tomcat9[104372]: at at ch.qos.logback.classic.util.ContextInitializer.configureByResource(ContextInitializer.java:64)
Mai 26 11:25:20 ubuntu-22-04 tomcat9[104372]: at at ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:134)
Mai 26 11:25:20 ubuntu-22-04 tomcat9[104372]: at at org.slf4j.impl.StaticLoggerBinder.init(StaticLoggerBinder.java:84)

 

 

 

 The /ThingworxStorage directory exists and has tomcat:tomcat permissions:

 

 

drwxrwxr-x 2 tomcat tomcat 4096 Mai 23 16:25 ThingworxBackupStorage
drwxrwxr-x 2 tomcat tomcat 4096 Mai 23 16:43 ThingworxPlatform
drwxrwxr-x 2 tomcat tomcat 4096 Mai 25 13:38 ThingworxStorage

 

 

 

 On the ThingWorx server the platform settings were done and tomcat did run before TWX was added. The TWX installation itself was undergone up to topic #14 (https://support.ptc.com/help/thingworx/platform/r9/en/index.html#page/ThingWorx/Help/Installation/Installation/install_java_and_apache_tomcat__ubuntu_.html#wwID0EIWQR), which fails (as described above).

 

The MSSQL-database is running and can be accessed locally and remotely with Linux- and Windows-clients. The database-structures were initialized and do exist now:

 

 

./thingworxMssqlDBSetup.sh -h mssql.kuraray.vm -r '<vdlv>'
./thingworxMssqlSchemaSetup.sh -h mssql.kuraray.vm -r '<vdlv>'

 

 

 

Any hints what to fix to get TWX up and running?

 

Kind regards
Arndt

 

 

 

1 reply

5-Regular Member
May 28, 2023

Hello @AK_10557584 

 

You can refer the following articles to resolve your issue here

https://www.ptc.com/en/support/article/CS321777

 

Please feel free to revert in case it doesn't resolve the issue.

 

Thanks

3-Newcomer
May 30, 2023

Hi, thanks for the reply. The suggested article is solving another effect, but unfortunately not mine. In my installation I get no log complaints about erroneous configuration files. My installation does not use customized locations for <ThingworxPlatform>, <ThingworxStorage> or <ThingworxBackupStorage>. All configuration files do have the correct line endings (<LF> in this case). The platform-settings.json content is as follows:

 

administrator@ubuntu-22-04:~$ cat /ThingworxPlatform/platform-settings.json 
{
 "PlatformSettingsConfig": {
 "AdministratorUserSettings": {
 "InitialPassword": "<GEHEIM>"
 },
 "ContentTypeSettings": {
 "supportedMediaEntityContentTypes": [
 "image/svg+xml",
 "image/png",
 "image/gif",
 "image/bmp",
 "image/jpeg",
 "application/pdf",
 "image/vnd.microsoft.icon"
 ]
 },
 "LicensingConnectionSettings": {
 "username":"<XXXX>@<XXXX>.com",
 "password":"<GEHEIM>"
 }
 },
 "PersistenceProviderPackageConfigs": {
 "MssqlPersistenceProviderPackage": {
 "ConnectionInformation": {
 "driverClass": "com.microsoft.sqlserver.jdbc.SQLServerDriver",
 "jdbcUrl": "jdbc:sqlserver://mssql.kuraray.vm:1433;databaseName=thingworx;applicationName=Thingworx;",
 "password": "<GEHEIM>",
 "username": "twadmin"
 }
 }
 },
 "ExtensionPackageImportPolicy": {
 "importEnabled": true,
 "allowJarResources": true,
 "allowJavascriptResources": true,
 "allowCSSResources": true,
 "allowJSONResources": true,
 "allowWebAppResources": true,
 "allowEntities": true,
 "allowExtensibleEntities": true
 }
}

 

The startup messages from tomcat are:

Mai 30 08:45:51 ubuntu-22-04 systemd[1]: Starting Apache Tomcat 9 Web Application Server... 
Mai 30 08:45:51 ubuntu-22-04 systemd[1]: Started Apache Tomcat 9 Web Application Server.
Mai 30 08:45:51 ubuntu-22-04 tomcat9[136906]: NOTE: Picked up JDK_JAVA_OPTIONS:  --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/java.util=AL
L-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED
Mai 30 08:45:52 ubuntu-22-04 tomcat9[136906]: Server Version:        Apache Tomcat/9.0.58 (Ubuntu)
Mai 30 08:45:52 ubuntu-22-04 tomcat9[136906]: Server built:          Jan 6 1970 15:09:28 UTC
Mai 30 08:45:52 ubuntu-22-04 tomcat9[136906]: Server version number: 9.0.58.0
Mai 30 08:45:52 ubuntu-22-04 tomcat9[136906]: OS Name:               Linux
Mai 30 08:45:52 ubuntu-22-04 tomcat9[136906]: OS Version:            5.15.0-72-generic
Mai 30 08:45:52 ubuntu-22-04 tomcat9[136906]: Architektur:           amd64
Mai 30 08:45:52 ubuntu-22-04 tomcat9[136906]: Java Home:             /usr/lib/jvm/java-11-openjdk-amd64
Mai 30 08:45:52 ubuntu-22-04 tomcat9[136906]: JVM Version:           11.0.19+7-post-Ubuntu-0ubuntu122.04.1
Mai 30 08:45:52 ubuntu-22-04 tomcat9[136906]: JVM Hersteller:        Ubuntu
Mai 30 08:45:52 ubuntu-22-04 tomcat9[136906]: CATALINA_BASE:         /var/lib/tomcat9
Mai 30 08:45:52 ubuntu-22-04 tomcat9[136906]: CATALINA_HOME:         /usr/share/tomcat9
Mai 30 08:45:52 ubuntu-22-04 tomcat9[136906]: Command line argument: --add-opens=java.base/java.lang=ALL-UNNAMED
Mai 30 08:45:52 ubuntu-22-04 tomcat9[136906]: Command line argument: --add-opens=java.base/java.io=ALL-UNNAMED
Mai 30 08:45:52 ubuntu-22-04 tomcat9[136906]: Command line argument: --add-opens=java.base/java.util=ALL-UNNAMED
Mai 30 08:45:52 ubuntu-22-04 tomcat9[136906]: Command line argument: --add-opens=java.base/java.util.concurrent=ALL-UNNAMED
Mai 30 08:45:52 ubuntu-22-04 tomcat9[136906]: Command line argument: --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED
Mai 30 08:45:52 ubuntu-22-04 tomcat9[136906]: Command line argument: -Djava.util.logging.config.file=/var/lib/tomcat9/conf/logging.properties
Mai 30 08:45:52 ubuntu-22-04 tomcat9[136906]: Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
Mai 30 08:45:52 ubuntu-22-04 tomcat9[136906]: Command line argument: -Djava.awt.headless=true
Mai 30 08:45:52 ubuntu-22-04 tomcat9[136906]: Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
Mai 30 08:45:52 ubuntu-22-04 tomcat9[136906]: Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
Mai 30 08:45:52 ubuntu-22-04 tomcat9[136906]: Command line argument: -Dorg.apache.catalina.security.SecurityListener.UMASK=0027
Mai 30 08:45:52 ubuntu-22-04 tomcat9[136906]: Command line argument: -Dignore.endorsed.dirs=
Mai 30 08:45:52 ubuntu-22-04 tomcat9[136906]: Command line argument: -Dcatalina.base=/var/lib/tomcat9
Mai 30 08:45:52 ubuntu-22-04 tomcat9[136906]: Command line argument: -Dcatalina.home=/usr/share/tomcat9
Mai 30 08:45:52 ubuntu-22-04 tomcat9[136906]: Command line argument: -Djava.io.tmpdir=/tmp
Mai 30 08:45:52 ubuntu-22-04 tomcat9[136906]: Loaded Apache Tomcat Native library [1.2.31] using APR version [1.7.0].

 Kind regards
Arndt