将WSO2 APIM1.10.0群集与WSO2 DAS 3.0.1群集集成时,不会记录API使用情况

时间:2017-02-07 13:35:49

标签: wso2 wso2-am wso2-das

我正在使用WSO2 Kubernetes Artifacts构建WSO2 APIM 1.10.0群集。

这是我的配置:

通过上述配置,APIM群集在我的kubernetes环境中正常工作。然后我想从WSO2 DAS 3.0.1获取统计数据。这是我的步骤。

  1. 打开管理信息中心页面。
  2. 填写DAS信息。
  3. 保存配置。
  4. 发布示例API并订阅它。
  5. 调用创建的API。
  6. 虽然API返回正确的结果,但我看不到DAS页面的任何统计信息。表ORG_WSO2_APIMGT_STATISTICS_REQUEST也是空的。此外,网关容器中有一些例外情况如下:

    2017-02-02T10:17:05.119378825Z [2017-02-02 10:17:05,118] ERROR - APIMgtUsageHandler Cannot publish event. null
    2017-02-02T10:17:05.119410635Z java.lang.NullPointerException
    2017-02-02T10:17:05.119416221Z at org.wso2.carbon.apimgt.usage.publisher.APIMgtUsageDataBridgeDataPublisher.publishEvent(APIMgtUsageDataBridgeDataPublisher.java:124)
    2017-02-02T10:17:05.119421345Z at org.wso2.carbon.apimgt.usage.publisher.APIMgtUsageHandler.handleRequest(APIMgtUsageHandler.java:169)
    2017-02-02T10:17:05.119425422Z at org.apache.synapse.rest.API.process(API.java:322)
    2017-02-02T10:17:05.119429269Z at org.apache.synapse.rest.RESTRequestHandler.dispatchToAPI(RESTRequestHandler.java:86)
    2017-02-02T10:17:05.119432713Z at org.apache.synapse.rest.RESTRequestHandler.process(RESTRequestHandler.java:65)
    2017-02-02T10:17:05.119444539Z at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:295)
    2017-02-02T10:17:05.119448051Z at org.apache.synapse.core.axis2.SynapseMessageReceiver.receive(SynapseMessageReceiver.java:83)
    2017-02-02T10:17:05.119451190Z at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
    2017-02-02T10:17:05.119454693Z at org.apache.synapse.transport.passthru.ServerWorker.processNonEntityEnclosingRESTHandler(ServerWorker.java:317)
    2017-02-02T10:17:05.119457708Z at org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.java:149)
    2017-02-02T10:17:05.119460675Z at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
    2017-02-02T10:17:05.119463755Z at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    2017-02-02T10:17:05.119466748Z at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    2017-02-02T10:17:05.119470008Z at java.lang.Thread.run(Thread.java:745)
    2017-02-02T10:17:05.292159023Z [2017-02-02 10:17:05,291] ERROR - APIMgtResponseHandler Cannot publish response event. null
    2017-02-02T10:17:05.292186860Z java.lang.NullPointerException
    2017-02-02T10:17:05.292191607Z at org.wso2.carbon.apimgt.usage.publisher.APIMgtUsageDataBridgeDataPublisher.publishEvent(APIMgtUsageDataBridgeDataPublisher.java:140)
    2017-02-02T10:17:05.292196079Z at org.wso2.carbon.apimgt.usage.publisher.APIMgtResponseHandler.mediate(APIMgtResponseHandler.java:211)
    2017-02-02T10:17:05.292199487Z at org.apache.synapse.mediators.ext.ClassMediator.mediate(ClassMediator.java:84)
    2017-02-02T10:17:05.292202823Z at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:81)
    2017-02-02T10:17:05.292206246Z at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:48)
    2017-02-02T10:17:05.292210195Z at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:155)
    2017-02-02T10:17:05.292213976Z at org.apache.synapse.rest.Resource.process(Resource.java:297)
    2017-02-02T10:17:05.292216990Z at org.apache.synapse.rest.API.process(API.java:335)
    2017-02-02T10:17:05.292220203Z at org.apache.synapse.rest.RESTRequestHandler.dispatchToAPI(RESTRequestHandler.java:86)
    2017-02-02T10:17:05.292223430Z at org.apache.synapse.rest.RESTRequestHandler.process(RESTRequestHandler.java:52)
    2017-02-02T10:17:05.292226576Z at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:295)
    2017-02-02T10:17:05.292229762Z at org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:529)
    2017-02-02T10:17:05.292232861Z at org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:172)
    2017-02-02T10:17:05.292236007Z at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
    2017-02-02T10:17:05.292238952Z at org.apache.synapse.transport.passthru.ClientWorker.run(ClientWorker.java:251)
    2017-02-02T10:17:05.292252632Z at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
    2017-02-02T10:17:05.292256191Z at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    2017-02-02T10:17:05.292259335Z at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    2017-02-02T10:17:05.292262507Z at java.lang.Thread.run(Thread.java:745)
    

    问题可能与this issue相同,但我没有看到解决方案。

    修改1

    我也进行了2次实验如下。

    首先:

    1. 创建一个ubuntu pod。
    2. 在ubuntu pod容器上安装WSO2 APIM 1.10.0。
    3. 打开admin-dashboard页面并填写DAS信息。
    4. 发布示例API并订阅它。
    5. 调用创建的API。
    6. 哪个工作正常。我可以从DAS页面看到统计信息。

      第二:

      1. 跳转到APIM容器。
      2. 使用telnet验证DAS集群的thrift端口。
      3. APIM群集可以访问thrift端口。

        根据例外情况,我认为这可能是由于网关容器中缺少配置造成的?

0 个答案:

没有答案