Solved: Mid server cannot conect the instance. - ServiceNow Community

Mid server cannot conect the instance.

Tomoki4
Kilo Contributor

I tried to install a MID Server on Linux in reference to https://docs.servicenow.com/bundle/newyork-servicenow-platform/page/product/mid-server/task/t_InstallAMIDServerOnLinux.html.

I confirmed that the installation was completed correctly, but no record was created on MID Server list.

I checked the log(agent/logs/agent0.log.0) and confirmed the following error.
--------------------------------------------------

10/19/19 02:24:22 (029) StartupSequencer WARNING *** WARNING *** java.net.SocketTimeoutException: connect timed out when posting to https://dev*****.service-now.com/InstanceInfo.do?SOAP
10/19/19 02:24:22 (041) StartupSequencer SEVERE *** ERROR *** SOAP Request: <SOAP-ENV:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="http://www.service-now.com/GetMIDInfo" xmlns:m="http://www.service-now.com" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"  SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><m:execute></m:execute></SOAP-ENV:Body></SOAP-ENV:Envelope>
10/19/19 02:24:22 (042) StartupSequencer SEVERE *** ERROR *** SOAP Response: Status code=0, Response body=null
10/19/19 02:24:22 (042) StartupSequencer SEVERE *** ERROR *** Problem invoking InstanceInfo on https://dev*****.service-now.com/: Please check that the InstanceInfo page exists in the sys_public table and active="true".
10/19/19 02:24:22 (045) StartupSequencer SEVERE *** ERROR *** java.net.SocketTimeoutException: connect timed out when posting to https://dev*****.service-now.com/InstanceInfo.do?SOAP
(Network Configuration issue) Please check that the MID server can ping the instance: https://dev*****.service-now.com/
You may also need to configure the network that the MID server uses to allow traffic over TCP port 443.
10/19/19 02:24:22 (046) StartupSequencer SEVERE *** ERROR *** test failure
java.lang.IllegalStateException: Unable to connect to instance.
        at com.service_now.mid.services.StartupSequencer.runTests(StartupSequencer.java:455)
        at com.service_now.mid.services.StartupSequencer$Starter.run(StartupSequencer.java:416)

--------------------------------------------------

I focused on  "Please check that the MID server can ping the instance: https://dev*****.service-now.com/".

I use proxy in my environment. It's causing that no ping response to https://*****.service-now.com is returned.
But I think it's no probrem because connection successed at "https://*****.service-now.com" in browser on mid server.(I think it shows 80/443 port connection is no probrem)
 
I'd like to know whether or not mid server cannot conect the instance if no ping response is returned.
1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

Few things you need to check

1) did you create an user in instance which has mid_server role

2) did you configure the config.xml file properly and update the instance name, mid server username and password

3) is the mid server installed behind a firewall i.e. in private network

4) check the proxy server settings; whether it is not allowing to connect to the instance from the windows mid server service

It might be possible that you can reach a site through browser but may be not through the service which is running for the mid server. I am not 100% sure on this part; but you need to debug further

Mark Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur

 

Regards
Ankur

View solution in original post

5 REPLIES 5

adilrathore
ServiceNow Employee
ServiceNow Employee

Hi Tomoki,

 

Ping is not necessary to connect to the instance. It is just a general troubleshooting guideline to check if the instance is available from the MID Server.

 

As you are able to reach the instance URL from the MID, so it seems that the traffic is dropping through the proxy. I would recommend to check with the proxy team as to why the MID is not able to connect to the instance as they can check the proxy logs and review.

Hi adilrathore

Thanks for let me know.

I rechecked the proxy settings and fixed the error.
 
Thank you!!
 

I am in similar situation with linux installation of mid server,

Servicenow instance is reachable via curl using proxy IP in option like "curl -x Proxyserver:port Instanceurl"

 

the same proxy server mentioned in config.xml , and getting below errors in agent log file

 

2023-10-16T08:18:09.061+1300 INFO (WrapperStartStopAppMain) [Instance:1384] Setting basic authentication with user mid.itom
2023-10-16T08:18:09.069+1300 INFO (WrapperStartStopAppMain) [KeyStoreProvider:245] Keystore file security/agent_keystore not found. Creating new keystore file.
2023-10-16T08:18:11.062+1300 INFO (WrapperStartStopAppMain) [Bootstrapper:41] Welcome to the ServiceNow MID Server
2023-10-16T08:18:12.191+1300 INFO (WrapperStartStopAppMain) [ExtensionContainer:98] ExtensionContainer ThreadPool started with corePoolSize: 25, maximumPoolSize: 25, maximumQueueSize
: 500
2023-10-16T08:18:13.405+1300 INFO (WrapperStartStopAppMain) [SenderFilesInfoService:46] Service started.
2023-10-16T08:18:13.406+1300 INFO (WrapperStartStopAppMain) [DrainingStateTransitionHandler:125] Drain timeout set (900 seconds).
2023-10-16T08:18:13.422+1300 INFO (MIDServer) [MIDCredentialsConfigProvider:36] MIDCredentialsConfigProvider initialized with com.service_now.mid.creds.provider.standard.StandardCred
entialsProvider
2023-10-16T08:18:13.428+1300 INFO (MIDServer) [PriorityThreadPoolProvider:274] Drain timeout set (900 seconds).
2023-10-16T08:18:15.142+1300 INFO (MIDServer) [BootConfigProvider:36] Attempting to load boot config file at location: /opt/servicenow/devmid/agent/boot-config.yaml
2023-10-16T08:18:15.143+1300 INFO (MIDServer) [BootConfigProvider:44] Boot configuration file not found at default location: /opt/servicenow/devmid/agent/boot-config.yaml, providing
empty configuration
2023-10-16T08:18:15.399+1300 INFO (MIDServer) [Main:266] Initializing MID Server
2023-10-16T08:18:15.399+1300 INFO (MIDServer) [Main:281] Running under Java version: 11.0.16.1-sncmid1, java PID: 64080, args: start
2023-10-16T08:18:16.659+1300 INFO (MIDServer) [Main:289] JVM default socket factory: class com.service_now.mid.security.policy.PolicyBasedSSLSocketFactory
2023-10-16T08:18:17.880+1300 WARN (MIDServer) [HTTPClient:830] Socket error
2023-10-16T08:18:17.885+1300 ERROR (MIDServer) [RemoteGlideRecord:918] getRecords failed (Socket error)
2023-10-16T08:18:17.891+1300 WARN (MIDServer) [RetryExecutor:104] MIDRemoteGlideRecord.query failed, retrying in 10 seconds
2023-10-16T08:18:27.895+1300 WARN (MIDServer) [HTTPClient:830] Socket error
2023-10-16T08:18:27.896+1300 ERROR (MIDServer) [RemoteGlideRecord:918] getRecords failed (Socket error)
2023-10-16T08:18:27.896+1300 WARN (MIDServer) [RetryExecutor:104] MIDRemoteGlideRecord.query failed, retrying in 15 seconds
2023-10-16T08:18:42.901+1300 WARN (MIDServer) [HTTPClient:830] Socket error
2023-10-16T08:18:42.901+1300 ERROR (MIDServer) [RemoteGlideRecord:918] getRecords failed (Socket error)
2023-10-16T08:18:42.901+1300 WARN (MIDServer) [RetryExecutor:104] MIDRemoteGlideRecord.query failed, retrying in 22 seconds
2023-10-16T08:19:05.407+1300 WARN (MIDServer) [HTTPClient:830] Socket error

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

Few things you need to check

1) did you create an user in instance which has mid_server role

2) did you configure the config.xml file properly and update the instance name, mid server username and password

3) is the mid server installed behind a firewall i.e. in private network

4) check the proxy server settings; whether it is not allowing to connect to the instance from the windows mid server service

It might be possible that you can reach a site through browser but may be not through the service which is running for the mid server. I am not 100% sure on this part; but you need to debug further

Mark Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur

 

Regards
Ankur