com.snc.glide.amb.AMBClient$ProxyBuilderException: java.net.URISyntaxException: Expected closing bracket for IPv6 address at index 13


Description

MID Server agent log throws the following error where proxyaddress.com.local is the proxy server host name:

01/29/21 18:31:17 (330) AMBClientProvider Connecting AMB client to instance...
01/29/21 18:31:17 (330) AMBClientProvider SEVERE *** ERROR *** AMBClient exception when instantiating a AMBClient. Connection is not successful

com.snc.glide.amb.AMBClient$ProxyBuilderException: java.net.URISyntaxException: Expected closing bracket for IPv6 address at index 13: http://[http://proxyaddress.com.local]:8080
at com.snc.glide.amb.AMBClient$Builder.buildProxyURI(AMBClient.java:314)
at com.snc.glide.amb.AMBClient$Builder.setProxy(AMBClient.java:305)
at com.service_now.mid.Instance.getAMBClient(Instance.java:775)
at com.service_now.mid.amb.AMBClientProvider.connect(AMBClientProvider.java:116)
at com.service_now.mid.amb.AMBClientProvider.executeInLock(AMBClientProvider.java:191)
at com.service_now.mid.amb.AMBClientProvider.lambda$initialize$0(AMBClientProvider.java:54)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.net.URISyntaxException: Expected closing bracket for IPv6 address at index 13: http://[http://proxyaddress.com.local]:8080
at java.net.URI$Parser.fail(URI.java:2848)
at java.net.URI$Parser.failExpecting(URI.java:2854)
at java.net.URI$Parser.parseServer(URI.java:3231)
at java.net.URI$Parser.parseAuthority(URI.java:3155)
at java.net.URI$Parser.parseHierarchical(URI.java:3097)
at java.net.URI$Parser.parse(URI.java:3053)
at java.net.URI.<init>(URI.java:673)
at com.snc.glide.amb.AMBClient$Builder.buildProxyURI(AMBClient.java:312)

Release or Environment

All

Cause

MID Server mid.proxy.host parameter is set as URL or the proxy instead of its hostname

Resolution

Replace proxyaddress.com.local with the actual proxy hostname:

1. Stop the MID server Service first
2. Update the "config.xml" file by searching for the line below:

Current:

<parameter name="mid.proxy.host" value="http://proxyaddress.com.local"/>

To:

<parameter name="mid.proxy.host" value="proxyaddress.com.local"/>

3. Restart the MID Server.

Additional Information

https://docs.servicenow.com/bundle/london-servicenow-platform/page/product/mid-server/reference/mid-server-parameters.html#mid-server-parameters