Error Reference

REST message connection refused: target host unreachable

REST message connection refused: target host unreachable

Where this appears

This error appears in the ServiceNow System Log under System Diagnostics > Log > Application Log when outbound REST integrations fail. It commonly occurs during scheduled integrations, manual REST message testing, or when using the REST Message form test functionality.

Sourdough
Chrome Extension

Debugging this in a real instance?

Sourdough lets you trace "REST message connection refused: target host unreachable" through system logs, script errors, and API health in the ServiceNow tab you are already using.

Add to Chrome

Free to install. Pro $5/month after a 14-day no-card trial.
Pro requires the ServiceNow admin role. Upgrade inside the extension.

Overview
Tasks
CMDB
API
Metrics
Monitor
Internals
Instance:sourdoughdev·Version:Yokohama
Instance StateONLINE
System StatusFully Operational
Session Timeout90 minutes
Logged-In Sessions2 (20 active)
Build Nameyokohama-12-18-2024_p1
IP Address10.159.128.43
Instance HealthHealth Score: 90%
🔥 5dSourdough (Chrome Plugin)Dark Mode

Cause

Network firewall rules are blocking outbound HTTP/HTTPS traffic from ServiceNow instance to the target host on the required ports. (high likelihood)

MID Server is offline, misconfigured, or not properly routing traffic when the REST message is configured to use a MID Server for connectivity. (high likelihood)

Target hostname or IP address is incorrect, misspelled, or the target service is down or moved to a different endpoint. (medium likelihood)

Proxy configuration issues preventing the ServiceNow instance from reaching external hosts through corporate proxy servers. (medium likelihood)

DNS resolution failure where the hostname cannot be resolved to an IP address from the ServiceNow instance or MID Server. (low likelihood)

Fix

Step 1: Navigate to System Web Services > Outbound > REST Message and locate the failing REST message to verify the endpoint URL is correct and accessible.

Step 2: Check System Diagnostics > Log > Application Log for detailed error messages and verify the exact timestamp and context of the connection failure.

Step 3: If using a MID Server, navigate to MID Server > Servers and confirm the MID Server status is Up and verify it can reach the target host from its network location.

Step 4: Test network connectivity by using the built-in REST Message test functionality or create a simple test script to isolate the connection issue from business logic.

Step 5: Review proxy settings under System Properties > Web Service and ensure outbound proxy configuration matches your network requirements if using a corporate proxy.

Step 6: Contact your network administrator to verify firewall rules allow outbound traffic on the required ports (typically 80/443) from your ServiceNow instance or MID Server IP addresses.

Step 7: Verify DNS resolution by checking if the hostname resolves correctly from the ServiceNow instance or MID Server using network diagnostic tools.

Step 8: If the target service requires specific network routing, configure the REST message to use an appropriate MID Server located in the correct network segment.

Test Your Knowledge

Quick 3-question quiz. See how your ServiceNow skills stack up.

Question 1 of 3Performance

A list view on a table with millions of records is slow. Best fix?

Select an answer to continue