skip to Main Content

I’m using WSO2 , Centos 7.8 , with mysql . I renew my certificate and trying to use it replace for my old one. This is what I did

openssl pkcs12 -export -in newcert.crt -inkey mydomain.key -name "mydomain-2022" -out mydomain-2022.pfx
keytool -importkeystore -srckeystore mydomain-2022.pfx -srcstoretype pkcs12 -destkeystore 2022.jks -deststoretype JKS
keytool -export -alias "mydomain-2022" -keystore 2022.jks -file 2022.pem
keytool -import -alias mydomain-2022 -file 2022.pem -keystore client-truststore.jks -storepass wso2carbon
find and replace all "2021.jks" with "2022.jks" on below files
vim /usr/lib64/wso2/wso2ei/6.6.0/conf/axis2/axis2.xml
vim /usr/lib64/wso2/wso2ei/6.6.0/conf/tomcat/catalina-server.xml
vim /usr/lib64/wso2/wso2ei/6.6.0/wso2/analytics/conf/dashboard/deployment-mysql.yaml
vim /usr/lib64/wso2/wso2ei/6.6.0/wso2/analytics/conf/dashboard/deployment.yaml
vim /usr/lib64/wso2/wso2ei/6.6.0/wso2/analytics/conf/manager/deployment.yaml
vim /usr/lib64/wso2/wso2ei/6.6.0/wso2/analytics/conf/worker/deployment.yaml
restart service

I can confirm that new certificate working – service is running – I can login to "https://esb.mydomain.com:9443/carbon/admin/login.jsp" but my wso2carbon.log keep spawning these warning/error every minute

TID: [-1] [] [2022-10-12 21:03:12,351]  WARN {org.wso2.carbon.databridge.agent.endpoint.DataEndpointGroup} - No receiver is reachable at reconnection, will try to reconnect every 30 sec
TID: [-1] [] [2022-10-12 21:03:12,354] ERROR {org.wso2.carbon.databridge.agent.endpoint.DataEndpointConnectionWorker} - Error while trying to connect to the endpoint. Cannot borrow client for ssl://localhost:7712 org.wso2.carbon.databridge.agent.exception.DataEndpointAuthenticationException: Cannot borrow client for ssl://localhost:7712
        at org.wso2.carbon.databridge.agent.endpoint.DataEndpointConnectionWorker.connect(DataEndpointConnectionWorker.java:147)
        at org.wso2.carbon.databridge.agent.endpoint.DataEndpointConnectionWorker.run(DataEndpointConnectionWorker.java:59)
        at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: org.wso2.carbon.databridge.agent.exception.DataEndpointSecurityException: Error while trying to connect to ssl://localhost:7712
        at org.wso2.carbon.databridge.agent.endpoint.thrift.ThriftSecureClientPoolFactory.createClient(ThriftSecureClientPoolFactory.java:81)
        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:137)
        ... 6 more
Caused by: org.apache.thrift.transport.TTransportException: Could not connect to localhost on port 7712
        at org.apache.thrift.transport.TSSLTransportFactory.createClient(TSSLTransportFactory.java:237)
        at org.apache.thrift.transport.TSSLTransportFactory.getClientSocket(TSSLTransportFactory.java:169)
        at org.wso2.carbon.databridge.agent.endpoint.thrift.ThriftSecureClientPoolFactory.createClient(ThriftSecureClientPoolFactory.java:64)
        ... 9 more
Caused by: java.net.ConnectException: Connection refused (Connection refused)
        at java.base/java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.base/java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:399)
        at java.base/java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:242)
        at java.base/java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:224)
        at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:403)
        at java.base/java.net.Socket.connect(Socket.java:609)
        at java.base/sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:285)
        at java.base/sun.security.ssl.SSLSocketImpl.<init>(SSLSocketImpl.java:144)
        at java.base/sun.security.ssl.SSLSocketFactoryImpl.createSocket(SSLSocketFactoryImpl.java:88)
        at org.apache.thrift.transport.TSSLTransportFactory.createClient(TSSLTransportFactory.java:233)
        ... 11 more

Please give me some advice, thank you very much.

2

Answers


  1. You are getting a connection refused error java.net.ConnectException: Connection refused when EI is trying to connect to the Analytics server. Hence I believe your Analytics server is not up and running. If you have started the Analytics server and it’s not starting check the logs of the analytics server.

    Login or Signup to reply.
  2. Considering the above error and the comments, It seems you have enabled analytics on your WSO2-EI server.

    If you don’t want to use analytics in your environment,

    • Set the property mediation.flow.statistics.enable to ‘false’ in the <EI_PRODUCT_PATH>/conf/synapse.properties file
    • Restart the server.

    If you want to use analytics in your environment,

    • Set the property mediation.flow.statistics.enable to ‘true’ in the <EI_PRODUCT_PATH>/conf/synapse.properties file.

    • Add the correct configurations of the analytics server to the <EI_PRODUCT_PATH>/conf/carbon.xml under the element.

    • Import the public key certificate of the Analytics server into the <EI_PRODUCT_PATH>/repository/resources/security/client-truststore.jks file of the EI Server.

    • Restart the server.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search