Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X
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:
type Status report
message /Thingworx/Home
description The requested resource is not available.
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
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?
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.
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.
I don't think I have any port forwarding; at list that I know but this computer is brand new and I didn't install anything that does that.
Same thing for proxy server. I chacked on my browser option and there is no check on proxy connection so I'm not having it.
Does going to /Thingworx/Composer/index.html directly work?
Yes it does. It's where I actually am. Also if I go on /Thingworx/Home, it redirect me on index.html
Yes, it should redirect you. I'm just wondering if your session timesout (default is 30 minutes, and can be set/ changed in the UserManagementSubsystem) and it fails to give you the login prompt again. The next time this occurs, can you try opening an incognito window and then navigating to ThingWorx again?
Ok, I will and I'll write here the esit but I had a kind of same clue so last time it happened I tried to open ThingWorx on Firefox (I usually use Chrome) but nothing changed.
It may sound totally crazy, but when you have this situation the next time could you please check if the Thingworx is still deployed/Started on the Tomcat,
Yes, it is still deployed and started. I also tried to stop it, undeploy and re-deploy
Maybe one thing I should mention:
despite what the guide says, I didn't change the port 8080 to 80 during the Tomcat Installation because my 80 port was in use by another program.
Last time it happened, I uninstalled tomcat and I also uninstalled the program which used port 80, so I could put Tomcat on port 80 just like the manual says.
We see if it makes any difference.
Just appened again.
I had to delete this folder C:\PTC\Tomcat\webapps\Thingworx and deploy it again.
To me doesn't sound really great.
I changed the "Expired session with idle > 300 minutes" instead of 30
Fabio, can you post your entire catalina.log file? And the application log from your /ThingworxStorage folder as well?
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.
Actually I'm using Tomcat 8.0.20
Fabio, please do post your logs. And on a side note, what version of Java are you using?
A the moment it's not happening; that's why I didn't post the log.
And I'm using version 8 of Java.
Fabio, when this issue occurs for you have you tried to start a new session of web browser and login with Administrator account? If you have what is the result of it? I kind of experienced the similar behaviour yesterday except that for me login with Administrator works but not when using any other user. Unfortunately i can't determine the steps to reproduce it except that it happened after the inactivity of over 30mins (which is the default session timeout)
Actually I only have the Administrator account.
I haven't done yet any others.
I tried to start a new session of web browser; I also used a different browser; deleted the history and cache and used the incognito mode.
Now, I've installed ThingWorx on my Virtual Machine (I was working on local), and it's not happening at the moment.
Maybe the problem happens when you work on your machine in local.
I'll let you know in a while
Just a clue:
May it depends on the fact I'm working on my local computer and not on the Virtual Machine?
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.
Can you tel me is I am missing something?
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.
Can you post any errors/warning in ThingWorx Application log? (i.e., /ThingworxStorage/logs/ApplicationLog.log file.
-Giri
Shreya, apart from the Application log from the ThingworxStorage folder, please do post your catalina log file from Tomcat_install_path/logs folder as well.
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.
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?
Hi Sushant, I checked and reinstalled postgresql again.I verify db connection too and it looks good.
But now i am getting
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)
How did you deploy thingworx.war? The proper way is to copy the thingworx.war file inside tomcat/webapps folder while the tomcat service is stopped, then start it and have it unpackage the thingworx app automatically.
Could you please provide the versions of the Thingworx platform and postgresql you are using?
What are your Thingworx platform version and the postgresql version? I also see you have Apache Tomcat/8.0.27 -- while this would not be the cause for this particular issue, our system requirements guide recommends a minimum of 8.0.33 for Tomcat.