Use the MID Server to Run Basic Network TroubleshootingDescriptionIn situations where a remote system on the customer's internal network is not accessible via the MID server, you can use the ECC queue and MID Server to do some basic network troubleshooting. This will help determine if the issue is a network issue, or something else (e.g. authentication). For example when trying to import data from an SQL Server database via the MID server and you get this error: com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host database-server.internal.company.com, port 1433 has failed. Error: "connect timed out. Verify the connection properties. Make sure that an instance of SQL Server is running on the host and accepting TCP/IP connections at the port. Make sure that TCP connections to the port are not blocked by a firewall.".Release or EnvironmentAll current ServiceNow releasesInstructionsUsing a Command ECC Queue Entry Created with SNCProbe If the MID server host is running Linux you can use this to run just about any command, such as ping, telnet, and so on. If the MID server host is running Windows this only lets you run what you can run through a 'Command Prompt' window. This includes ping, but many Windows installs won't have much more than that available - not even telnet, so the Powershell option below is often a better option. var probe = SncProbe.get("Command"); probe.setName("<COMMAND TO RUN>); probe.create("<MID SERVER NAME>"); Example: var probe = SncProbe.get("Command"); probe.setName("ping /n 4 database-server.internal.company.com"); probe.create("SNCMID01"); You can then check for ECC queue input entries (/ecc_queue_list.do) which have Name equal to what you set in probe.setName() (it can take a minute or 2 for command results to be returned). The result will be in the XML in the payload field and will look like similar to this (Windows ping example): Pinging database-server.internal.company.com [10.1.1.10] with 32 bytes of data:Reply from 10.1.1.10: bytes=32 time=1ms TTL=127Reply from 10.1.1.10: bytes=32 time=1ms TTL=127Reply from 10.1.1.10: bytes=32 time<1ms TTL=127Reply from 10.1.1.10: bytes=32 time<1ms TTL=127Ping statistics for 10.1.1.10:Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),Approximate round trip times in milli-seconds:Minimum = 0ms, Maximum = 1ms, Average = 0ms Using a Powershell ECC Queue Entry Created with GlideRecord For Windows MID hosts there is a lot more detailed network troubleshooting available using Powershell. Replace mid.server.<MID SERVER NAME GOES HERE> with mid.server.NAME_of_MID_Server (copy from another ECC queue output record if in doubt) and <COMMAND TO RUN> with the Powershell command to run (not inside '< >'): // based on https://community.servicenow.com/community?id=community_question&sys_id=19c8336adbe323c0f21f5583ca96198bvar payload = '<parameters>' + '<parameter name="probe_name" value="Windows - Powershell"/>' + '<parameter name="script.ps1" value="<COMMAND TO RUN>"/>' + '<parameter name="skip_sensor" value="true"/>' + '</parameters>';var sysid = '';var grECC = new GlideRecord('ecc_queue');grECC.initialize();grECC.agent = 'mid.server.<MID SERVER NAME GOES HERE>';grECC.topic = 'Powershell';grECC.name = 'Windows - PowerShell';grECC.source = '127.0.0.1';grECC.queue = 'output';grECC.payload = payload;sysid = grECC.insert();// Outputvar instanceURL = gs.getProperty('glide.servlet.uri');gs.print(instanceURL + "/ecc_queue.do?sys_id=" + sysid); For example: // based on https://community.servicenow.com/community?id=community_question&sys_id=19c8336adbe323c0f21f5583ca96198bvar payload = '<parameters>' + '<parameter name="probe_name" value="Windows - Powershell"/>' + '<parameter name="script.ps1" value="Test-NetConnection database-server.internal.company.com -Port 1433 -InformationLevel Detailed"/>' + '<parameter name="skip_sensor" value="true"/>' + '</parameters>';var sysid = '';var grECC = new GlideRecord('ecc_queue');grECC.initialize();grECC.agent = 'mid.server.SNCMID01';grECC.topic = 'Powershell';grECC.name = 'Windows - PowerShell';grECC.source = '127.0.0.1';grECC.queue = 'output';grECC.payload = payload;sysid = grECC.insert();// Outputvar instanceURL = gs.getProperty('glide.servlet.uri');gs.print(instanceURL + "/ecc_queue.do?sys_id=" + sysid); Example output (from the payload XML on the ECC queue input record): WARNING: TCP connect to database-server.internal.company.com:1433 failedComputerName : database-server.internal.company.comRemoteAddress : 10.1.1.10RemotePort : 1433AllNameResolutionResults : 10.1.1.10MatchingIPsecRules :NetworkIsolationContext : InternetInterfaceAlias : Ethernet 2SourceAddress : 10.1.1.25NetRoute (NextHop) : 10.1.1.1PingSucceeded : TruePingReplyDetails (RTT) : 0 msTcpTestSucceeded : False