java.net.SocketTimeoutException: connect timed out: connect timed out error
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-03-2022 10:06 AM
Hi,
Using rest Api explorer,POSTMAN i am able to execute api for POST/PATCH
If i tried the same via script provided by servicenow , i get java.net.SocketTimeoutException: connect timed out: connect timed out error
I am using correct credentials even with admin role, but same error but not with postman or rest api explorer.
This instance is on-prem
Anshu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-03-2022 10:39 AM
Hi
sorry, but your screenshot is worthless as you did not explained what excactly you want to request.
An API within ServiceNow? Or any public APIs outside of ServiceNow?
Please explain better your issue.
Maik
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-03-2022 10:46 AM
Hi Anshu,
Your java socket is timing out means that it takes too long to get responses from your onprem instance server and your request expires before getting a response. This exception is occurring on the following condition.
- The server is slow and the default timeout is less, so just put the timeout value according to you.
- The server is working fine but the timeout value is for less time. so change the timeout value.
Check for properties that define the outbound response time, the details are available on the link -
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0694711
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0547347
Let me know if these do not help.
Thanks
-Harneet Sital (ServiceNow Certified Technical Architect)
Request you to please mark my answer as helpful or correct based on the impact
Find all my ServiceNow articles here