集群环境:无法为 ssl 借用客户端

Clustered Environment: Cannot borrow client for ssl

我遵循了文档中的集群拓扑:https://docs.wso2.com/display/EI640/Clustering+the+ESB+Profile and the Toplogy was done and the ESB Nodes are running correctly. Suppose that my nodes are n1.ei.com for Node1 and n2.ei.com for Node2 and lb.ei.com for LoadBalancing. I want to start the Analytic Dashboard on Node1, as a service it started running on https://n1.ei.com:9643/portal 但我没有得到任何数据或 API 来监控。我按照wso2carbon.log,发现如下错误:

Error while trying to connect to the endpoint. Cannot borrow client for ssl://${Node1_IP_ADDR}:7712

注意到我的端口 Offset 是 0,在类似的问题上,我发现有人提到了 api-manager.xml 文件,但我没有这些文件。我只有 MessageFlowStatisticsPublisher.xmlMessageFlowConfigurationPublisher.xml 并且我将它们编辑如下:

<?xml version="1.0" encoding="UTF-8"?>
<eventPublisher name="MessageFlowConfigurationPublisher/StatisticsPublisher"
  statistics="disable" trace="disable" xmlns="http://wso2.org/carbon/eventpublisher">
  <from streamName="org.wso2.esb.analytics.stream.ConfigEntry" version="1.0.0"/>
  <mapping customMapping="disable" type="wso2event"/>
  <to eventAdapterType="wso2event">
    <property name="username">adminuser</property>
    <property encrypted="true" name="password">CIPHERED_TEXT</property>
    <property name="protocol">thrift</property>
    <property name="publishingMode">blocking</property>
    <property name="publishTimeout">0</property>
    <property name="receiverURL">tcp://${Node1_IP_ADDR:7612}</property>
    <property encrypted="true" name="password">CIPHERED_TEXT</property>
  </to>
</eventPublisher>

考虑到我的集群环境,我在哪里可以解决上述错误。

编辑您的 /conf/log4j.properties 并检查 LOGEVENT 块中的信息是否正确:

log4j.appender.LOGEVENT=org.wso2.carbon.logging.service.appender.LogEventAppender log4j.appender.LOGEVENT.url=tcp://localhost:7611 log4j.appender.LOGEVENT.layout=org.wso2.carbon.utils.logging.TenantAwarePatternLayout log4j.appender.LOGEVENT.columnList=%T,%S,%A,%d,%c,%p,%m,%I,%Stacktrace log4j.appender.LOGEVENT.userName=admin

log4j.appender.LOGEVENT.password=admin

log4j.appender.LOGEVENT.processingLimit=1000 log4j.appender.LOGEVENT.maxTolerableConsecutiveFailure=20

感谢您的回复,我明白了: 如您所见,这里有一个名为 statistics 的值,它在上面的问题中被禁用,所以我更改了它,现在 Analytic Dashboard 可以读取数据。

<?xml version="1.0" encoding="UTF-8"?>
<eventPublisher name="MessageFlowConfigurationPublisher/StatisticsPublisher"
  statistics="enable" trace="disable" xmlns="http://wso2.org/carbon/eventpublisher">
  <from streamName="org.wso2.esb.analytics.stream.ConfigEntry" version="1.0.0"/>
  <mapping customMapping="disable" type="wso2event"/>
  <to eventAdapterType="wso2event">
    <property name="username">adminuser</property>
    <property encrypted="true" name="password">CIPHERED_TEXT</property>
    <property name="protocol">thrift</property>
    <property name="publishingMode">blocking</property>
    <property name="publishTimeout">0</property>
    <property name="receiverURL">tcp://${Node1_IP_ADDR:7612}</property>
    <property encrypted="true" name="password">CIPHERED_TEXT</property>
  </to>
</eventPublisher>