Error while trying to connect to the endpoint. Cannot borrow client for ssl
Asked Answered
S

3

13

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

Spout answered 28/12, 2016 at 18:10 Comment(7)
if you are not using stats , disable it in <APIM_HOME>/repository/conf/api-manager.xml. docs.wso2.com/display/AM200/Configuring+APIM+AnalyticsCompose
its already disabled...I have not enabled it...Spout
@Compose I am using a downloaded version of API Manager..No much configurations changedSpout
is this a single node or distributed setup ? are you starting the server in any profile mode ?Compose
@Compose I downloaded an APIM installation from WSO2 site to my laptop and configured it... How to check if server is in profile mode?| I have not done anything special to make it single node or Distributed set up.So defaults should apply.Spout
@Compose will it be something with the URL i am configuring in API Manager? Or any particular set up with my local machine?Spout
See #58821526Cortege
C
6

Here what is failing is throttling data publishing. Possible cause is thrift port (9711) is opened on a different network interface than 192.168.1.36.

You can configure correct IP in <ThrottlingConfigurations> section of api-manager.xml. (Replace ${carbon.local.ip})

<ThrottlingConfigurations>
    <EnableAdvanceThrottling>true</EnableAdvanceThrottling>
    <DataPublisher>
        <Enabled>true</Enabled>
        <Type>Binary</Type>
        <ReceiverUrlGroup>tcp://${carbon.local.ip}:${receiver.url.port}</ReceiverUrlGroup>
        <AuthUrlGroup>ssl://${carbon.local.ip}:${auth.url.port}</AuthUrlGroup>
        <Username>${admin.username}</Username>
        <Password>${admin.password}</Password> 
Cardiogram answered 29/12, 2016 at 13:32 Comment(4)
I changed this to <ThrottlingConfigurations> . <ReceiverUrlGroup>tcp://192.168.1.36:${receiver.url.port}</ReceiverUrlGroup> <AuthUrlGroup>ssl://192.168.1.36:${auth.url.port}</AuthUrlGroup> But i still have this ERROR - DataEndpointConnectionWorker Error while trying to connect to the endpoint. Cannot borrow client for ssl://192.168.1.36:9711 org.wso2.carbon.databridge.agent.exception.DataEndpointAuthenticationException: Cannot borrow client for ssl://192.168.1.36:9711 at org.wso2.carbon.databridge.agent.endpSpout
192.168.1.36 is the wrong IP. You should use the correct one instead.Cardiogram
you can use ifconfig to see available network interfaces.Cardiogram
See #58821526Cortege
T
1

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

Tamp answered 27/1, 2022 at 9:40 Comment(0)
P
0

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

Palatal answered 10/3, 2021 at 15:26 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.