Skip to main content
1-Visitor
May 2, 2016
Question

HTTP Status 404 - /Thingworx/Home

  • May 2, 2016
  • 6 replies
  • 14204 views

I have this issue:
If I'm working on ThingWorx, and I'm start doing something else for a while (like half an hour) when I go back on ThingWorx and I refresh the page I have apache problem:

HTTP Status 404 - /Thingworx/Home

type Status report

message /Thingworx/Home

description The requested resource is not available.


Apache Tomcat/8.0.20

It doesn't happens ALL the times but like 50% of the times so I don't understand on what it depends.

So far I can only solve the problem by uninstalling and re-installing Apache Tomcat

6 replies

5-Regular Member
May 2, 2016

Have you had a look at the Apache error log - is there any reference to this? Does the Apache service continue run while you get this error?

fmanniti1-VisitorAuthor
1-Visitor
May 2, 2016

Yes, I've seen in the folder C:\PTC\Tomcat\logs end I don't have any error file.

I've also seen in C:\ThingWorxStorage\logs and the ErrorLog file is empty.

The only message I got I have in C:\PTC\Tomcat\logs\catalina.2016-05-02.log which gives me this message

02-May-2016 12:12:18.909 SEVERE [http-nio-8080-exec-4] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [Thingworx] created a ThreadLocal with key of type [org.owasp.esapi.reference.AbstractAuthenticator.ThreadLocalUser] (value [org.owasp.esapi.reference.AbstractAuthenticator$ThreadLocalUser@416f5241]) and a value of type [org.owasp.esapi.User$1] (value [org.owasp.esapi.User$1@173bc25e]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.

5-Regular Member
May 2, 2016

Fabio, do you have a proxy server or any form of re-director or port forwarding involved? /Thingworx/Home will usually resolve to /Thingworx/Composer/index.html.

5-Regular Member
May 2, 2016

Fabio,

Just an fyi, make sure you are not using Tomcat 8.0.30 or above. I had this HTTP 404 problem with 8.0.30 and 8.0.33 (though it is intermittent).

Deploying Thingworx instance in 8.0.24/26 fixed my issue. Not exactly sure about the root cause.

fmanniti1-VisitorAuthor
1-Visitor
May 3, 2016

Actually I'm using Tomcat 8.0.20

5-Regular Member
May 3, 2016

Fabio, please do post your logs. And on a side note, what version of Java are you using?

fmanniti1-VisitorAuthor
1-Visitor
May 3, 2016

Just a clue:
May it depends on the fact I'm working on my local computer and not on the Virtual Machine?

1-Visitor
September 3, 2016

Hi All,

Even I am facing the same issue. the error I get is in attached screen shot. I feel it is not getting deployed successfully.

The error occurs for version 6.5 and above. Version 6 is getting deployed successfully.

My system configurations are:

Java version 8

and Apache tomcat version 8.0.36.

Screenshot from 2016-09-03 11:10:24.png

Screenshot from 2016-09-03 11:10:11.png

Can you tel me is I am missing something?

fmanniti1-VisitorAuthor
1-Visitor
September 5, 2016

I just solved my problem working on my Virtual Machine instead of local.

I don't know how this affects the problem itself but it works.

1-Visitor
February 6, 2017

404 error.PNG

Application.log files:

[L: ERROR] [O: c.t.s.ThingWorxServer] [I: ] [U: SuperUser] [S: ] [T: http-nio-8080-exec-5]

2017-02-06 16:03:41.982+0530 [L: INFO] [O: c.t.p.p.PersistenceProvider] [I: ] [U: SuperUser] [S: ] [T: http-nio-8080-exec-5] Connection ThingworxPersistenceProvider, type PostgresPersistenceProviderPackage stopped

2017-02-06 16:03:41.982+0530 [L: WARN] [O: c.t.p.p.PersistenceProvider] [I: ] [U: SuperUser] [S: ] [T: http-nio-8080-exec-5] Could not find persistenceProviderPackage PostgresPersistenceProviderPackage and thus could not stop data processing

2017-02-06 16:03:41.985+0530 [L: ERROR] [O: c.t.s.ThingWorxBootstrapper] [I: ] [U: SuperUser] [S: ] [T: http-nio-8080-exec-5] [message: Unable to initialize and start system: null]

2017-02-06 16:03:41.985+0530 [L: ERROR] [O: c.t.s.ThingWorxBootstrapper] [I: ] [U: SuperUser] [S: ] [T: http-nio-8080-exec-5] *** Web Application STATE is being set to ERROR! ***

2017-02-06 16:03:45.255+0530 [L: ERROR] [O: c.t.s.a.AuthenticationFilter] [I: ] [U: ] [S: ] [T: http-nio-8080-exec-8] Could not handle request

2017-02-06 16:03:49.471+0530 [L: ERROR] [O: c.t.s.a.AuthenticationFilter] [I: ] [U: ] [S: ] [T: http-nio-8080-exec-10] Could not handle request

2017-02-06 16:03:55.444+0530 [L: ERROR] [O: c.t.s.a.AuthenticationFilter] [I: ] [U: ] [S: ] [T: http-nio-8080-exec-4] Could not handle request

2017-02-06 16:08:31.911+0530 [L: ERROR] [O: c.t.s.a.AuthenticationFilter] [I: ] [U: ] [S: ] [T: http-nio-8080-exec-12] Could not handle request

2017-02-06 16:10:25.836+0530 [L: ERROR] [O: c.t.s.a.AuthenticationFilter] [I: ] [U: SuperUser] [S: ] [T: http-nio-8080-exec-13] Could not handle request

2017-02-06 16:10:26.426+0530 [L: ERROR] [O: c.t.s.a.AuthenticationFilter] [I: ] [U: ] [S: ] [T: http-nio-8080-exec-15] Could not handle request

2017-02-06 16:10:29.407+0530 [L: ERROR] [O: c.t.s.a.AuthenticationFilter] [I: ] [U: ] [S: ] [T: http-nio-8080-exec-17] Could not handle request

2017-02-06 16:11:26.570+0530 [L: INFO] [O: c.t.s.ThingWorxBootstrapper] [I: ] [U: SuperUser] [S: ] [T: http-nio-8080-exec-16] WebApp stopping:

2017-02-06 16:11:26.570+0530 [L: ERROR] [O: c.t.s.ThingWorxBootstrapper] [I: ] [U: SuperUser] [S: ] [T: http-nio-8080-exec-16] ThingWorx Web Application STATE is in ERROR, so normal shutdown logic may fail!

2017-02-06 16:11:26.570+0530 [L: INFO] [O: c.t.s.ThingWorxBootstrapper] [I: ] [U: SuperUser] [S: ] [T: http-nio-8080-exec-16] ========================================

2017-02-06 16:11:26.575+0530 [L: ERROR] [O: c.t.s.ThingWorxServer] [I: ] [U: SuperUser] [S: ] [T: http-nio-8080-exec-16] Error Attempting To Stop Scheduler: null

2017-02-06 16:11:26.575+0530 [L: INFO] [O: c.t.s.ThingWorxServer] [I: ] [U: SuperUser] [S: ] [T: http-nio-8080-exec-16] ========================================

2017-02-06 16:11:26.575+0530 [L: INFO] [O: c.t.s.ThingWorxServer] [I: ] [U: SuperUser] [S: ] [T: http-nio-8080-exec-16] Stopping Platform Subsystems

2017-02-06 16:11:26.575+0530 [L: INFO] [O: c.t.s.ThingWorxServer] [I: ] [U: SuperUser] [S: ] [T: http-nio-8080-exec-16] ========================================

2017-02-06 16:11:26.575+0530 [L: INFO] [O: c.t.s.ThingWorxBootstrapper] [I: ] [U: SuperUser] [S: ] [T: http-nio-8080-exec-16] Thingworx Server Application...OFF

2017-02-06 16:11:26.575+0530 [L: INFO] [O: c.t.s.ThingWorxBootstrapper] [I: ] [U: SuperUser] [S: ] [T: http-nio-8080-exec-16] Thingworx Server Application...Cleaned up

2017-02-06 16:11:26.575+0530 [L: INFO] [O: c.t.s.ThingWorxBootstrapper] [I: ] [U: SuperUser] [S: ] [T: http-nio-8080-exec-16] WebApp OFF [server = Apache Tomcat/8.0.27]

2017-02-06 16:11:26.576+0530 [L: ERROR] [O: c.t.s.ThingWorxBootstrapper] [I: ] [U: SuperUser] [S: ] [T: http-nio-8080-exec-16] Error getting ApplicationContext: {}null

Please help to fix this error. I have also attached tomcat log file.

5-Regular Member
February 6, 2017

Hi Guru, it appear as though the Postgresql isn't reachable or correctly configured. Have you check the postgresql installation? Could you connect to it? does it contain ThingWorx schema along with its tables?

Is this a fresh installation or was this setup working before?

1-Visitor
February 7, 2017

Hi Sushant, I checked and reinstalled postgresql again.I verify db connection too and it looks good.

But now i am getting

HTTP Status 401 - Could not handle request

In Tomcat log file:

Caused by: java.security.InvalidParameterException: id cannot be null or empty.

  at com.thingworx.persistence.common.EntityIdHelper.getTypeFromId(EntityIdHelper.java:12)

  at com.thingworx.persistence.postgres.dao.PostgresModelDaoFactory.create(PostgresModelDaoFactory.java:22)

  at com.thingworx.persistence.postgres.PostgresDocumentModelDriver.fromStorage(PostgresDocumentModelDriver.java:154)

  ... 46 more

java.lang.Exception: Unable to initialize and start system: null

  at com.thingworx.system.ThingWorxServer.loadModel(ThingWorxServer.java:448)

  at com.thingworx.system.ThingWorxServer.doHA(ThingWorxServer.java:181)

  at com.thingworx.system.ThingWorxBootstrapper.contextInitialized(ThingWorxBootstrapper.java:124)

  at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4738)

  at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5181)

  at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)

  at org.apache.catalina.manager.ManagerServlet.start(ManagerServlet.java:1293)

  at org.apache.catalina.manager.HTMLManagerServlet.start(HTMLManagerServlet.java:673)

1-Visitor
June 16, 2017

We experienced the same problem and we could solve it just changing the java version from 1.8_121 to 1.8_92, that it was the recommended version in the installation guide.

I don't know if this can help you Fabio Manniti​.

fmanniti1-VisitorAuthor
1-Visitor
June 16, 2017

I don't have anymore this problem.
I just solved it working on my virtual machine instead of local.