- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-19-2025 01:25 AM
Hi ,
I am getting below error while hitting REST API outbound POST method , I am using Basic authentication (Auth Profile UserName and Password will be shared by third party tool ?)
org.mozilla.javascript.JavaScriptException: com.glide.ecc.ECCResponseTimeoutException: No response for ECC message request with sysid=*** after waiting for 300 seconds in ECC Queue
Thanks in advance.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-19-2025 01:30 AM
Hello @naveenreddy0871
I believe you're encountering a timeout issue with your REST API call. The ECCResponseTimeoutException indicates that the system didn't receive a response within the specified time frame.
-> You can increase the timeout for your REST API call. In ServiceNow, you can set the glide.http.outbound.max_timeout property to a higher value. This property controls the maximum timeout for outbound HTTP requests. You can also use the waitForResponse() method to set a custom timeout. Check this LINK
-> Ensure that the Basic authentication credentials (username and password) provided by the third-party tool are correct and properly configured in your authentication profile.
-> Make sure that the MID Server you are using is up and running. Sometimes, issues with the MID Server can cause timeouts.
-> Check if the endpoint you are calling is responding slowly. You can test the endpoint using tools like Postman to see if it responds within the expected time frame.
-> Ensure there are no network issues or firewalls blocking the communication between your instance and the endpoint.
If my response has helped you hit helpful button and if your concern is solved do mark my response as correct.
Thanks & Regards
Viraj Hudlikar.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-19-2025 01:30 AM
Hello @naveenreddy0871
I believe you're encountering a timeout issue with your REST API call. The ECCResponseTimeoutException indicates that the system didn't receive a response within the specified time frame.
-> You can increase the timeout for your REST API call. In ServiceNow, you can set the glide.http.outbound.max_timeout property to a higher value. This property controls the maximum timeout for outbound HTTP requests. You can also use the waitForResponse() method to set a custom timeout. Check this LINK
-> Ensure that the Basic authentication credentials (username and password) provided by the third-party tool are correct and properly configured in your authentication profile.
-> Make sure that the MID Server you are using is up and running. Sometimes, issues with the MID Server can cause timeouts.
-> Check if the endpoint you are calling is responding slowly. You can test the endpoint using tools like Postman to see if it responds within the expected time frame.
-> Ensure there are no network issues or firewalls blocking the communication between your instance and the endpoint.
If my response has helped you hit helpful button and if your concern is solved do mark my response as correct.
Thanks & Regards
Viraj Hudlikar.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-19-2025 03:02 AM
Hi @Viraj Hudlikar ,
Thanks for your quick response ,
I have one scheduled data import associated to Data Source where i am trying to fetch data by using REST API , While running Scheduled data import getting this error :
Error executing script : org.mozilla.javascript.JavaScriptException: java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-19-2025 03:16 AM
Could you share the screenshot of the data source configuration? Please remove if it contains any sensitive information.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-19-2025 03:30 AM
Hello @naveenreddy0871
The IndexOutOfBoundsExceptionerror typically occurs when your script tries to access an index that doesn't exist in an array or list.
Add logging statements to your script to print out the contents of the array or list before accessing it. This can help you understand if the array is empty or if there are any issues with the data being fetched.
Ensure that the data source you are using for the scheduled import is returning the expected data. You can test the REST API call separately using tools like Postman to verify the response.
If my response has helped you hit helpful button and if your concern is solved do mark my response as correct.
Thanks & Regards
Viraj Hudlikar.