- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-12-2020 03:07 AM
Hi All,
When i am running the Rest API its getting below error, but its working fine in the Postman.
Please help me how to avoid this error
Error: -
org.apache.commons.httpclient.ConnectTimeoutException: The host did not accept the connection within timeout of 10000 ms when posting to http://199.16.197.107:808/service/features
Thanks
Ramesh R
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-12-2020 03:13 AM
Hi Ramesh,
you can try increasing the timeout for Outbound REST.
- Property:
glide.http.outbound.max_timeout - Description: Specifies the number of seconds that RESTMessageV2 and SOAPMessageV2 APIs wait for a response from a synchronous call. The maximum value is 30 seconds.
How to increase the timeout for a REST response? (ECCResponseTimeoutException)
https://hi.service-now.com/kb_view.do?sysparm_article=KB0694711
Another method is while you are consuming the Rest message using script you can use this method
setHttpTimeout(Number timeoutMs)
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-12-2020 03:13 AM
Hi Ramesh,
you can try increasing the timeout for Outbound REST.
- Property:
glide.http.outbound.max_timeout - Description: Specifies the number of seconds that RESTMessageV2 and SOAPMessageV2 APIs wait for a response from a synchronous call. The maximum value is 30 seconds.
How to increase the timeout for a REST response? (ECCResponseTimeoutException)
https://hi.service-now.com/kb_view.do?sysparm_article=KB0694711
Another method is while you are consuming the Rest message using script you can use this method
setHttpTimeout(Number timeoutMs)
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-12-2020 04:26 AM
I have used MID server then i created this property
- Property:
glide.http.outbound.max_timeout - Description: Specifies the number of seconds that RESTMessageV2 and SOAPMessageV2 APIs wait for a response from a synchronous call. The maximum value is 30 seconds.
Now its working as expected
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-05-2022 02:02 PM
So documentation says if its set to a higher value it will default to 30 secs, so in order to achieve this first step would be to set the property to false glide.http.outbound.max_timeout and add glide.rest.outbound.ecc_response.timeout to a higher value than 300 secs which is default
Also how to set sm.setHttpTimeout(6000) if REST API call is being made via flow action
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago
This property is used for asynchronous (or executeAsync()) calls. What property is used for synchronous (execute()) calls?
