'Error while trying to connect to the endpoint. Cannot borrow client for ssl
This error is being printed in the WSO2 API Manager wso2carbon.log..
sun.security.ssl.SSLSocketFactoryImpl.createSocket(SSLSocketFactoryImpl.java:88)
at org.wso2.carbon.databridge.agent.endpoint.binary.BinarySecureClientPoolFactory.createClient(BinarySecureClientPoolFactory.java:53)
... 9 more
TID: [-1] [] [2016-12-28 22:16:04,043] ERROR {org.wso2.carbon.databridge.agent.endpoint.DataEndpointConnectionWorker} - Error while trying to connect to the endpoint. Cannot borrow client for ssl://192.168.1.36:9711 {org.wso2.carbon.databridge.agent.endpoint.DataEndpointConnectionWorker}
org.wso2.carbon.databridge.agent.exception.DataEndpointAuthenticationException: Cannot borrow client for ssl://192.168.1.36:9711
at org.wso2.carbon.databridge.agent.endpoint.DataEndpointConnectionWorker.connect(DataEndpointConnectionWorker.java:100)
at org.wso2.carbon.databridge.agent.endpoint.DataEndpointConnectionWorker.run(DataEndpointConnectionWorker.java:43)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.wso2.carbon.databridge.agent.exception.DataEndpointException: Error while opening socket to 192.168.1.36:9711. Connection refused: connect
at org.wso2.carbon.databridge.agent.endpoint.binary.BinarySecureClientPoolFactory.createClient(BinarySecureClientPoolFactory.java:58)
at org.wso2.carbon.databridge.agent.client.AbstractClientPoolFactory.makeObject(AbstractClientPoolFactory.java:39)
at org.apache.commons.pool.impl.GenericKeyedObjectPool.borrowObject(GenericKeyedObjectPool.java:1212)
at org.wso2.carbon.databridge.agent.endpoint.DataEndpointConnectionWorker.connect(DataEndpointConnectionWorker.java:92)
... 6 more
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.DualStackPlainSocketImpl.connect0(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:79)
Can any one help me to fix this?I am just using WSO2 API Manager alone
Solution 1:[1]
This exceptions shows that connection made to APIM-Publisher URL is not from authenticated client.
To resolve this issue you have to import your created < new-keystore-name >.jks's public certificate to $Server_Home/repository/resources/security/client-truststore.jks file. client-truststore.jks contains the certificate entries, so that client side can use it to talk with the back end.
Follow the below steps.
Export the public certificate to a .pem file keytool -export -alias wso2carbon -keystore wso2carbon.jks -file publickey.pem
The above command, go through the wso2carbon.jks keystore and check for entry with ‘wso2carbon’. When find it, copy the public certificate in that entry to publickey.pem file.
Import the .pem file to client-truststore.jks. keytool -import -alias wso2 -file publickey.pem -keystore client-truststore.jks -storepass wso2carbon
Solution 2:[2]
Possibly you have changed the password of the "admin" user from the console and you have not changed it in the deployment.toml associated with the superadmin.
Doing this I solve it
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | hardik sompura |
| Solution 2 | user18046243 |
