We are facing an issue in our ThingWorx environment with primary and secondary servers.
The application log is throwing EntityNotFound errors.
To resolve it temporarily, we added the missing Thing entity, which suppressed the error.
However, this is not a viable long-term solution as we intentionally deleted that entity and do not want it to exist.
Problem Details:
We are unable to delete the Thing again — neither via the Composer nor programmatically.
On attempting to delete, the application log shows an error: Unable to delete from DB.
It seems the Thing is still being pinged or referenced, but we are not able to trace from where this is happening.
We are unsure whether it’s an external system or internal service making calls to the deleted Thing.
Is there a way to not to dig at the service/mashup/subscription level and still fix the application logging issue?
Solved! Go to Solution.
Hi,
In fact the service is not even called. Per Design ThingWorx will raise an error if the Thing called (just after /Thing/) does not exist or user does not have permission to read it. I don't recommend to remove this specific error message from logs because in some cases it can be usefull for monitoring. However, here is some way to avoid this problem :
Best regards,
Guillaume
To try to delete again the thing, I would recomment to restart the server and then try again to delete them.
Hi,
I guess that the best way to remove the application logs is to find who is calling this thing. As a security point of view, it could be a good option as well.
Did you try to check the 'access-log' file ? It can give the IP of the URL caller.
Best regards,
Guillaume
Hi @GuillaumeL ,
Thank you for the response. I was able to identify which devices are calling the Things. There are several devices making requests to the following endpoint:
Thingworx/Thing/DeviceID(Things)/Services/XYZ
I cannot modify the configuration on the device side, so these calls will continue. The devices first check for the DeviceId, and if it is not found, ThingWorx throws an "Entity Not Found" error.
Currently, there are 76 such Things. I do not want to add them back to ThingWorx. Instead, I would like to ignore these errors silently.
Thank you
Hi,
In fact the service is not even called. Per Design ThingWorx will raise an error if the Thing called (just after /Thing/) does not exist or user does not have permission to read it. I don't recommend to remove this specific error message from logs because in some cases it can be usefull for monitoring. However, here is some way to avoid this problem :
Best regards,
Guillaume
To try to delete again the thing, I would recomment to restart the server and then try again to delete them.