12

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

Rob
  • 14,746
  • 28
  • 47
  • 65
Janier
  • 3,982
  • 9
  • 43
  • 96
  • if you are not using stats , disable it in /repository/conf/api-manager.xml. https://docs.wso2.com/display/AM200/Configuring+APIM+Analytics – Jenananthan Dec 29 '16 at 03:33
  • 1
    its already disabled...I have not enabled it... – Janier Dec 29 '16 at 04:21
  • @Jenananthan I am using a downloaded version of API Manager..No much configurations changed – Janier Dec 29 '16 at 04:22
  • is this a single node or distributed setup ? are you starting the server in any profile mode ? – Jenananthan Dec 29 '16 at 05:17
  • @Jenananthan 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. – Janier Dec 29 '16 at 05:36
  • @Jenananthan will it be something with the URL i am configuring in API Manager? Or any particular set up with my local machine? – Janier Dec 29 '16 at 06:44
  • See https://stackoverflow.com/questions/58821026/unable-to-make-change-in-api-manager-xml-in-wso2-am-3-0/65841969#65841969 – Reddy SK Jan 22 '21 at 09:00

3 Answers3

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> 
Bee
  • 12,251
  • 11
  • 46
  • 73
  • I changed this to . tcp://192.168.1.36:${receiver.url.port} ssl://192.168.1.36:${auth.url.port} 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.endp – Janier Dec 29 '16 at 16:37
  • 1
    `192.168.1.36` is the wrong IP. You should use the correct one instead. – Bee Dec 29 '16 at 17:01
  • 1
    you can use `ifconfig` to see available network interfaces. – Bee Dec 29 '16 at 17:01
  • See https://stackoverflow.com/questions/58821026/unable-to-make-change-in-api-manager-xml-in-wso2-am-3-0/65841969#65841969 – Reddy SK Jan 22 '21 at 09:00
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

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