I am trying to connect to the service
which is a web service hosted by Lexis Nexis.
Following exception is encountered.
staging.identitymanagement.lexisnexis.com (java.net.UnknownHostException)
java.net.PlainSocketImpl:177 (null)
Initialisation Failure: staging.identitymanagement.lexisnexis.com
java.net.UnknownHostException: staging.identitymanagement.lexisnexis.com
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:177)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:529)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:550)
at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.
connect (BaseSSLSocketImpl.java:141)
at sun.net.NetworkClient.doConnect(NetworkClient.java:163)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:394)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:529)
at sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:272)
at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:329)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.
getNewHttpClient(AbstractDelegateHttpsURLConnection.java:172)
I am trying to call the same using mule integration services.However, we are still getting this issue for Unknown Host Exception. I have also correctly added the proxy details for the same.
Please guide me the way ahead.
Seems like a network proxy issue to me. http://download.oracle.com/javase/6/docs/technotes/guides/net/proxies.html
Have you added proxy into your vm arguments(JAVA_OPTIONS) in the server startup script? It should look something like this.
JAVA_FLAGS=-Dhttp.proxyHost=hostname.example.com -Dhttp.proxyPort=8080
java ${JAVA_FLAGS} ...
I also recommend setting the proxies programmatically,
public void setProxy() {
if (isUseHTTPProxy()) {
// HTTP/HTTPS Proxy
System.setProperty("http.proxyHost", getHTTPHost());
System.setProperty("http.proxyPort", getHTTPPort());
System.setProperty("https.proxyHost", getHTTPHost());
System.setProperty("https.proxyPort", getHTTPPort());
if (isUseHTTPAuth()) {
String encoded = new String(Base64.encodeBase64((getHTTPUsername() + ":" + getHTTPPassword()).getBytes()));
con.setRequestProperty("Proxy-Authorization", "Basic " + encoded);
Authenticator.setDefault(new ProxyAuth(getHTTPUsername(), getHTTPPassword()));
}
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.