我正在使用 WSO2 API Manager 2.0.0 和 WSO2 DataAnalyticsServer 3.1.0。
我做了以下配置:

  • 在 api-manger.xml 中启用分析
  • 将其定向到我的 DAS 服务器端口
  • 将 DAS_AGENT 添加到 log4j 属性

  • 服务器正常启动
    在 DAS 的管理控制台中,我上传了 APIM_Realtime_Analytics.car
    所有这一切都符合:
    https://docs.wso2.com/display/AM200/Running+the+Product#RunningtheProduct-AccessingtheManagementConsole
    https://docs.wso2.com/display/AM200/Configuring+APIM+Analytics
    docs.wso2.com/display/DAS310/Quick+Start+Guide

    但我收到以下错误:
    org.wso2.carbon.databridge.core.exception.EventConversionException: Error when converting org.wso2.apimgt.statistics.request:1.1.0 of event bundle with events 1
        at org.wso2.carbon.databridge.receiver.thrift.converter.ThriftEventConverter.createEventList(ThriftEventConverter.java:181)
        at org.wso2.carbon.databridge.receiver.thrift.converter.ThriftEventConverter.toEventList(ThriftEventConverter.java:90)
        at org.wso2.carbon.databridge.core.internal.queue.QueueWorker.run(QueueWorker.java:73)
        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:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
    Caused by: org.wso2.carbon.databridge.core.exception.EventConversionException: No StreamDefinition for streamId org.wso2.apimgt.statistics.request:1.1.0 present in cache
        at org.wso2.carbon.databridge.receiver.thrift.converter.ThriftEventConverter.createEventList(ThriftEventConverter.java:166)
        ... 7 more
    [2016-10-08 16:05:49,621] ERROR  {org.wso2.carbon.databridge.core.internal.queue.QueueWorker} -  Dropping wrongly formatted event sent for -1234
    org.wso2.carbon.databridge.core.exception.EventConversionException: Error when converting org.wso2.apimgt.statistics.execution.time:1.0.0 of event bundle with events 1
        at org.wso2.carbon.databridge.receiver.thrift.converter.ThriftEventConverter.createEventList(ThriftEventConverter.java:181)
        at org.wso2.carbon.databridge.receiver.thrift.converter.ThriftEventConverter.toEventList(ThriftEventConverter.java:90)
        at org.wso2.carbon.databridge.core.internal.queue.QueueWorker.run(QueueWorker.java:73)
        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:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
    Caused by: org.wso2.carbon.databridge.core.exception.EventConversionException: No StreamDefinition for streamId org.wso2.apimgt.statistics.execution.time:1.0.0 present in cache
        at org.wso2.carbon.databridge.receiver.thrift.converter.ThriftEventConverter.createEventList(ThriftEventConverter.java:166)
        ... 7 more
    [2016-10-08 16:05:49,625] ERROR {org.wso2.carbon.databridge.core.internal.queue.QueueWorker} -  Dropping wrongly formatted event sent for -1234
    org.wso2.carbon.databridge.core.exception.EventConversionException: Error when converting org.wso2.apimgt.statistics.response:1.1.0 of event bundle with events 1
        at org.wso2.carbon.databridge.receiver.thrift.converter.ThriftEventConverter.createEventList(ThriftEventConverter.java:181)
        at org.wso2.carbon.databridge.receiver.thrift.converter.ThriftEventConverter.toEventList(ThriftEventConverter.java:90)
        at org.wso2.carbon.databridge.core.internal.queue.QueueWorker.run(QueueWorker.java:73)
        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:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
    Caused by: org.wso2.carbon.databridge.core.exception.EventConversionException: No StreamDefinition for streamId org.wso2.apimgt.statistics.response:1.1.0 present in cache
        at org.wso2.carbon.databridge.receiver.thrift.converter.ThriftEventConverter.createEventList(ThriftEventConverter.java:166)
    

    由于服务器没有获得某些流定义,
    我还尝试部署 APIM_Realtime_Analytics_REST.car(来自以前版本的 DAS)但无济于事。我得到了类似的异常(exception)

    我该如何纠正?
    提前致谢!

    最佳答案

    正如在the document you are referring to 中提到的,现在APIM 有了自己的Analytics Server,这是一个定制的DAS。所以现在你需要做很少的配置来查看 API 统计信息。该发行版也已经安装了 CApps。所以你不需要手动安装它们。

    但是,据我所知,您使用的是 vanilla DAS Server 而不是 APIM Analytics Server。如果可能,请尝试这样做。如果由于某种原因不能,请从该发行版中获取汽车文件并将其安装在 DAS 中。那应该可以解决您的问题。

    关于exception - 数据分析服务器 3.1.0 抛出异常,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/39931794/

    10-13 03:28