2016-10-18 102 views
0
  1. 我的APIM版本是1.10.0,DAS是3.0.1。WSO2 DAS +使用mysql集羣APIM

  2. 起初,我沒有使用mysql部署集羣APIM + DAS。統計數據顯示良好。

  3. 然後,我聚類APIM到出版商,存儲的KeyManager和gateway.Configured APIM和DAS訂購this article,當調用的API,網關節點則顯示錯誤

[2016-10-13 11:13:54,775] ERROR - APIMgtUsageHandler Cannot publish event. null 
java.lang.NullPointerException 
     at org.wso2.carbon.apimgt.usage.publisher.APIMgtUsageDataBridgeDataPublisher.publishEvent(APIMgtUsageDataBridgeDataPublisher.java:124) 
     at org.wso2.carbon.apimgt.usage.publisher.APIMgtUsageHandler.handleRequest(APIMgtUsageHandler.java:169) 
     at org.apache.synapse.rest.API.process(API.java:322) 
     at org.apache.synapse.rest.RESTRequestHandler.dispatchToAPI(RESTRequestHandler.java:86) 
     at org.apache.synapse.rest.RESTRequestHandler.process(RESTRequestHandler.java:65) 
     at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:295) 
     at org.apache.synapse.core.axis2.SynapseMessageReceiver.receive(SynapseMessageReceiver.java:83) 
     at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180) 
     at org.apache.synapse.transport.passthru.ServerWorker.processNonEntityEnclosingRESTHandler(ServerWorker.java:317) 
     at org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.java:149) 
     at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172) 
     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) 
     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) 
     at java.lang.Thread.run(Thread.java:745) 
[2016-10-13 11:13:54,807] ERROR - APIMgtResponseHandler Cannot publish response event. null 
java.lang.NullPointerException 
     at org.wso2.carbon.apimgt.usage.publisher.APIMgtUsageDataBridgeDataPublisher.publishEvent(APIMgtUsageDataBridgeDataPublisher.java:140) 
     at org.wso2.carbon.apimgt.usage.publisher.APIMgtResponseHandler.mediate(APIMgtResponseHandler.java:211) 
     at org.apache.synapse.mediators.ext.ClassMediator.mediate(ClassMediator.java:84) 
     at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:81) 
     at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:48) 
     at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:155) 
     at org.apache.synapse.rest.Resource.process(Resource.java:297) 
     at org.apache.synapse.rest.API.process(API.java:335) 
     at org.apache.synapse.rest.RESTRequestHandler.dispatchToAPI(RESTRequestHandler.java:86) 
     at org.apache.synapse.rest.RESTRequestHandler.process(RESTRequestHandler.java:52) 
     at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:295) 
     at org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:529) 
     at org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:172) 
     at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180) 
     at org.apache.synapse.transport.passthru.ClientWorker.run(ClientWorker.java:251) 
     at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172) 
     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) 
     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) 
     at java.lang.Thread.run(Thread.java:745) 
  1. 然後我改變了DAS配置的方式。以下this blog,我配置的所有API-manager.xml,沒有錯誤,並且沒有stats.And存儲節點節目信息:
[2016-10-18 11:31:39,131] INFO - ReceiverGroup Resending the failed published data... 
[2016-10-18 11:31:44,134] WARN - AccessConfiguration Error loading properties from file: access-log.properties 
[2016-10-18 11:31:44,207] INFO - TimeoutHandler This engine will expire all callbacks after : 120 seconds, irrespective of the timeout 
  • 我谷歌的原因,在wso2 jira,他們說這不是一個錯誤。
  • 但我不能等待我的統計數小時。我配置錯了什麼?

    調節器。

    +1

    您可以通過登錄到DAS管理控制檯來瀏覽DAS表。您可以瀏覽Data Explorer菜單中的org.wso2.apimgt.statistics.request表。還要確保你已經在/repository/deployment/server/carbonapps/dir – ruks

    +0

    上部署了Capp,在Data explorer菜單下的表org.wso2.apimgt.statistics.request中沒有數據,ORG_WSO2_APIMGT_STATISTICS_WORKFLOW表獲得一些數據。在/repository/deployment/server/carbonapps /下是API_Manager_Analytics_RDBMS.car。沒有分佈式APIM,我可以從發佈商和商店獲取統計信息。發佈時,沒有統計信息 –

    回答

    0

    似乎在商店節點,數據正在發佈啓用和工作。但是網關節點數據沒有發佈。請嘗試驗證網關節點配置。同時檢查網關節點是否可以訪問DAS節點。

    +0

    謝謝,垃圾。商店和網關節點的api-manager.xml配置是相同的。是否有其他配置?如何檢查網關節點是否可以訪問DAS節點?在步驟2中,我可以證明DAS可用嗎?或者DAS接收器沒有收到消息? –

    +0

    我使用沒有分佈式APIM與DAS,在調用api後,有統計信息。然後我將APIM更改爲DISTRIBUTED,然後我調用另一個API,統計信息顯示SubscriberCount但沒有命中。 –

    +0

    但在數據瀏覽器菜單中的DAS管理控制檯,我找不到新的調用API數據。網關無法發送或DAS無法接收?以及如何解決? –