wso2 APIM和APIM-Analytics之间的“读取超时”

时间:2019-04-25 20:38:38

标签: wso2 analytics wso2-am

加拿大: 同一本地主机上的APIM和APIM-Analytics(均在2.6.0中)。 其他计算机上的身份服务器 使用该文档在APIM和Google Analytics(分析)之间进行配置。 设置外部Oracle数据库实例的数据源: IS策略正常,Analytics Worker正常,Analytics Dashboard正常,Analytics Manager正常

默认配置后,Apim开始出现连接问题:

...

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.endpoint.DataEndpointConnectionWorker}
          org.wso2.carbon.databridge.agent.exception.DataEndpointLoginException: 
          Cannot borrow client for ssl://localhost:7712.
                at 
        org.wso2.carbon.databridge.agent.endpoint.DataEndpointConnectionWorker.connect(DataEndpointConnectionWorker.java:134)
                at org.wso2.carbon.databridge.agent.endpoint.DataEndpointConnectionWorker.run(DataEndpointConnectionWorker.java:59)
                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:1149)
                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
                at java.lang.Thread.run(Thread.java:748)
        Caused by: org.wso2.carbon.databridge.agent.exception.DataEndpointLoginException: Error while trying to login to the data receiver.
                at org.wso2.carbon.databridge.agent.endpoint.thrift.ThriftDataEndpoint.login(ThriftDataEndpoint.java:54)
                at org.wso2.carbon.databridge.agent.endpoint.DataEndpointConnectionWorker.connect(DataEndpointConnectionWorker.java:128)
                ... 6 more
        Caused by: org.apache.thrift.transport.TTransportException: java.net.SocketTimeoutException: Read timed out
                at org.apache.thrift.transport.TIOStreamTransport.flush(TIOStreamTransport.java:161)
                at org.apache.thrift.TServiceClient.sendBase(TServiceClient.java:65)
                at org.wso2.carbon.databridge.commons.thrift.service.secure.ThriftSecureEventTransmissionService$Client.send_connect(ThriftSecureEventTransmissionService.java:104)
                at org.wso2.carbon.databridge.commons.thrift.service.secure.ThriftSecureEventTransmissionService$Client.connect(ThriftSecureEventTransmissionService.java:95)
                at org.wso2.carbon.databridge.agent.endpoint.thrift.ThriftDataEndpoint.login(ThriftDataEndpoint.java:47)
                ... 7 more
        Caused by: java.net.SocketTimeoutException: Read timed out
                at java.net.SocketInputStream.socketRead0(Native Method)
                at java.net.SocketInputStream.socketRead(SocketInputStream.java:116)
                at java.net.SocketInputStream.read(SocketInputStream.java:171)
                at java.net.SocketInputStream.read(SocketInputStream.java:141)
                at sun.security.ssl.InputRecord.readFully(InputRecord.java:465)
                at sun.security.ssl.InputRecord.read(InputRecord.java:503)
                at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:975)
                at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1367)
                at sun.security.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:750)
                at sun.security.ssl.AppOutputStream.write(AppOutputStream.java:123)
                at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
                at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)
                at org.apache.thrift.transport.TIOStreamTransport.flush(TIOStreamTransport.java:159)
                ... 11 more
    ...

当我访问Analytics(分析)控制台(PUBLISHER,STORE或ADMIN)时,API使用情况分析界面被卡住了。

我尝试在api-manager.xml中进行一些更改。现在,“分析”部分如下所示:

    <!-- Enable Analytics for API Manager -->
    <Enabled>true</Enabled>

    <StreamProcessorServerURL>{tcp://localhost:7612}</StreamProcessorServerURL>
    <!--StreamProcessorAuthServerURL>{ssl://localhost:7712}</StreamProcessorAuthServerURL-->
    <!-- Administrator username to login to the remote StreamProcessor server. -->
    <StreamProcessorUsername>admin</StreamProcessorUsername>
    <!-- Administrator password to login to the remote StreamProcessor server. -->
    <StreamProcessorPassword>admin</StreamProcessorPassword>

    <!-- For APIM implemented Statistic client for RDBMS -->
    <StatsProviderImpl>org.wso2.carbon.apimgt.usage.client.impl.APIUsageStatisticsRestClientImpl</StatsProviderImpl>

   <!-- StreamProcessor REST API configuration -->
    <StreamProcessorRestApiURL>https://localhost:9444</StreamProcessorRestApiURL>
    <StreamProcessorRestApiUsername>admin</StreamProcessorRestApiUsername>
    <StreamProcessorRestApiPassword>admin</StreamProcessorRestApiPassword>

如果我遵循默认文档(https://docs.wso2.com/display/AM260/Configuring+APIM+Analytics),我希望发现发生这种情况的原因。 谢谢

1 个答案:

答案 0 :(得分:0)

此问题已通过将Analytics(分析)证书导入到wso2carbon.jks和client-truststore.jks解决。              首先,我只是导入到client-truststore.jks,而错过了wso2carbon.jks。              使用完整的合格名称创建新的证书和密钥库,并使用api-manager.xml中的工具之间的正确链接非常重要。             请记住在主机文件中添加完整的限定名称。

谢谢