Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X
Solved! Go to Solution.
Hey,
for error 1: From the error messages it looks like the REST request you are sending to TWX cannot be interpreted by TWX, as the body does not contain valid json. The service is not called so adding logging to them won't help. To find the issue:
- First, the one who sends the request will get a 500 Internal server error as a response. So it should not be to hard to notice the call which fails I assume.
- Second option is to check tomcats access log and see which call creates 500 error. So you can pinpoint the service and hopefully find the one who calls it - with invalid parameters
Error 2: That may be the case. The browser will make requests with a "old" session - creating the error in TWX. I would say you can ignore the error, as sessions expire here and there and should not cause issues. Only for the user who uses the old session - he won't get new data until relogin.
Error 3: May be related to error 2. See https://www.ptc.com/en/support/article/CS364697
Please specify which version of the program are you using?
I am using Thingworx 9.1.5-b698.
The question is in which scenario does this error happen?
From the errors we know:
- A user 'dummyuser' tries to send some data to TWX, which is not valid json
- A twx-session has expired
To help we need more insights. What is "dummyuser" doing when the error is logged?
Thank you for help.
I am trying to solve error 'Error executing API request message, sending error response to caller!' in application log. While going through error logs I found above errors which might me cause this error.
For Error 1: - We use Rest API calls which would return output in JSON format (or different format) and ThingWorx service might not be able to parse that. 'dummyuser' would be calling that service. Is there any quick way to find out that service ? or should I put loggers on all services used by 'dummy user' ?
For Error 2: Is it possible that Mashup is open on Screen for long time and session got expired due to which this error is coming? I tried terminating all sessions to give fresh start but still this error is present. How to stop this error logs ? browser closing and reopening is not an option for me.
I am seeing below error logging every second in security Log. Not sure what's causing this.
Rejecting NonceKey [224602d1-b498-4a2e-8a56-abcd4b78ae9g] since it was not found in cache
Hey,
for error 1: From the error messages it looks like the REST request you are sending to TWX cannot be interpreted by TWX, as the body does not contain valid json. The service is not called so adding logging to them won't help. To find the issue:
- First, the one who sends the request will get a 500 Internal server error as a response. So it should not be to hard to notice the call which fails I assume.
- Second option is to check tomcats access log and see which call creates 500 error. So you can pinpoint the service and hopefully find the one who calls it - with invalid parameters
Error 2: That may be the case. The browser will make requests with a "old" session - creating the error in TWX. I would say you can ignore the error, as sessions expire here and there and should not cause issues. Only for the user who uses the old session - he won't get new data until relogin.
Error 3: May be related to error 2. See https://www.ptc.com/en/support/article/CS364697
Thank you @nmutter That was very helpful.
One final error I have now is below. It comes randomly and both together. I am feeling its when a Mashup is setup to use GetProperties service with Automatically update values when able a websocket is created between client browser and platform. If I use autorefresh instead of AutoUpdate it seems to work. But I wish to double confirm with you if you have any alternate approch.
2022-12-12 01:38:20.630+0000 [L: ERROR] [O: c.t.s.s.e.QueuedEvents] [I: ] [U: SuperUser] [S: ] [P: ] [T: WebSocket background processing] Failed to dispatch event. Invalid Thing In Event Type.Thing:Entity.PersistentSessionf33e9b56-8ea8-4f0b-bc68-19505cb05aa2:Event.DataChange:Property.isConnected:PersistentSessionf33e9b56-8ea8-4f0b-bc68-19505cb05aa2
2022-12-12 01:38:20.630+0000 [L: ERROR] [O: c.t.s.s.e.QueuedEvents] [I: ] [U: SuperUser] [S: ] [P: ] [T: WebSocket background processing] Failed to dispatch event. Invalid Thing In Event Type.Thing:Entity.PersistentSessionf33e9b56-8ea8-4f0b-bc68-19505cb05aa2:Event.AnyDataChange:PersistentSessionf33e9b56-8ea8-4f0b-bc68-19505cb05aa2
Hi @twxadmin.
Is it possible ThingWorx is failing for some reason and you're failing to restart the display? That would cause the issue with the session. If so, have you investigated why ThingWorx is failing?
Can you provide more details around what is happening to result in this issue?
Regards.
--Sharon
It most likely is caused by the "Automatic update" like you mentioned. But I am not sure nor have I an idea how to prevent it.
Maybe it is also related to the "known issues": "Mashups using GetProperties with "Automatically update values when able" uses an invalid Session ID after an auto Reconnect is attempted via WebSocket. This result in the flooding of Application, Error, and Communication logs." - https://support.ptc.com/help/thingworx/platform/r9/en/index.html#page/ThingWorx/Help/Release_Notes/FixedIssues/Known_Issues_in_ThingWorx_Platform_9.3.6.html# (also is mentioned in other platform versions.)
But hard to find the cause for such errors - if everything is working like expected I would ignore them. Our logs are (unfortunately) full of errors which are not relevant and hide actual errors...