cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Unexpected error occurred on server when saving service

Pearl

Unexpected error occurred on server when saving service

Hi ,

 

I often get the error "Unexpected error occured on server" when saving service.  I cannot save service anymore as long as the error occurs ,  I have to exit the Edit mode and edit the service again. Even though, the 2nd editing won't assure the save can be successful.  

 

I don't see any related logs when the error occurs, including Thingworx platform logs and tomcat logs.  It's very boring especially when it happens more than 10 times in one hour sometimes.   

 

Any suggestion ? 

error.png

 

 

 

 

13 REPLIES 13

Re: Unexpected error occured on server when saving service

What if you put the log level to Trace level and then reproduce the issue, you may get more detailed information

Re: Unexpected error occured on server when saving service

Same issue here but no chance to reproduce, it seems to occur randomly.

Re: Unexpected error occured on server when saving service

Hello,

 

Just my 2 cents. We used to experience somewhat similar behavior (although I do not recall the exact error message) that was caused by ThingWorx enabling/disabling things. For example, if there were two developers concurrently working on the same instance, and one was modifying a ThingShape, then the second couldn't save his modifications to the ThingTemplate inheriting this ThingShape until the system (re-)enabled/disabled all corresponding Things. The server was full of test data, so those "downtimes" were taking seconds and were quite noticeable. It clearly wasn't the smartest idea to work on a heavily loaded system concurrently, so we solved this issue by changing our development process.

 

I would suggest enabling TRACE logs for the ApplicationLog, it might give you a better idea of what happens inside the platform when you click Save.

 

Regards,
Constantine

Re: Unexpected error occured on server when saving service

@Constantine  ,

 

Thank you for share the experience,  but I'm the only person who use the Thingworx server . 

 

I've enabled the Stacking tracking and script stack tracking in the LoggingSubSystem, but still got nothing in the log when the error occurs.  Any more suggestion ? 

 

Regards,

Sean

Re: Unexpected error occured on server when saving service

@seanccc 

 

 

1. Can you confirm the version of ThingWorx?
2. Is this a fresh install or upgrade?
3. Does this error appear for a specific entity or for every entity that you are saving?
4. If you restart Tomcat do you still experience the same error message?

5. Could you please try clearing the cache and closing and reopening the browser if that works?

 

Thanks,
Vibhuti

Re: Unexpected error occured on server when saving service

@vangne 

 

@vangne ,

 

Please check my reply below: 

 

1. Can you confirm the version of ThingWorx?

---ThingWorx 8.4.2 + Postgresql 10.x + Tomcat 9.x + Windows Server 2016(VM)
2. Is this a fresh install or upgrade?

--- It's a fresh install
3. Does this error appear for a specific entity or for every entity that you are saving?

--It appears for any entity randomly 
4. If you restart Tomcat do you still experience the same error message?

--I shut down VM every day but sometimes this problem occurs within 5 minutes of turning on the VM.  If click Cancel then try the 2nd time, there is a 10~30% chance that it will happen again.   If press F5 to refresh the page,  it won't occur the 2nd time, but the error may occur in several minutes . 

5. Could you please try clearing the cache and closing and reopening the browser if that works?
--clearing the cache only won't work, reopening the browser works as refresh the page already made it working.

 

Re: Unexpected error occured on server when saving service

Hi @seanccc

 

If you were able to resolve your issue, please post it here and mark it as the Accepted Solution for the benefit of others on the community.  If you are still experiencing issues, please do let us know your questions or concerns.

 

I came across an issue where a similar issue was observed but it involved a load balancer. Please let me know if this is applicable to you. Please take a look at this article for more information.

Also, Can you paste the stack trace logs here, please ?

 

Thanks,

Vibhuti

Re: Unexpected error occured on server when saving service

@Constantine 

 

Did you have multiple browser windows open which were editing objects?

 

I have seen the error. It seemed to be when I had multiple windows open/edit.

Re: Unexpected error occured on server when saving service

@PEHOWE ,

 

yes, I usually open multiple tabs in Chrome when developing services.