0

我已经下载了 WSO2 IOT Server 3.0.0 并按照 wso2 文档中的步骤安装了产品。我使用 Ubuntu 14.04 LTS。

https://docs.wso2.com/display/IoTS300/Installing+on+Linux+or+OS+X

然后,我按照给定的顺序启动了代理、核心和分析服务器。我没有做任何额外的配置来跟随下面的链接:

https://docs.wso2.com/display/IoTS300/Running+the+Product#RunningtheProduct-StartingtheServer

我通过运行 mobile-qsg.sh 脚本创建了示例用户和用户角色。

我使用我的 Android(6.0.1)设备(Samsung SM-G900FQ)成功注册到 wso2 iot 服务器。我使用了具有 iotMobileUser 角色的 alex 帐户。我可以在 devicemgt 控制台上看到我的设备信息。为了添加地理围栏规则,我打开了在 https//localhost:9445/portal/dashboards/geo-dashboard/ 上运行的地理仪表板,使用管理员帐户进行身份验证并能够登录。

当我通过 devicemgt api 向我的设备发送位置请求时,它会抛出 EventConversionException。

[2017-05-28 13:03:46,391] [IoT-Analytics]  INFO {org.wso2.carbon.dashboard.deployment.DashboardDeployer} -  Gadget directory [geo-dashboard] has been copied to path /home/dozc/wso2iot-3.0.0/analytics/repository/deployment/server/jaggeryapps/portal/store/carbon.super/fs/gadget/geo-dashboard
[2017-05-28 13:03:46,427] [IoT-Analytics]  INFO {org.wso2.carbon.dashboard.deployment.DashboardDeployer} -  Dashboard definition [geo-dashboard] has been created.
[2017-05-28 13:03:46,428] [IoT-Analytics] ERROR {org.wso2.carbon.dashboard.deployment.DashboardDeployer} -  A theme already exists with the name geo-dashboard
[2017-05-28 13:03:46,442] [IoT-Analytics]  INFO {org.wso2.carbon.application.deployer.internal.ApplicationManager} -  Successfully Deployed Carbon Application : org.wso2.carbon.iot.geo.dashboard_1.0.0 {super-tenant}
[2017-05-28 13:03:46,751] [IoT-Analytics]  INFO {org.wso2.carbon.ntask.core.impl.AbstractQuartzTaskManager} -  Task scheduled: [-1234][ANALYTICS_SPARK_EVENTING][STORE_EVENT_ROUTER_TASK]
[2017-05-28 13:03:46,877] [IoT-Analytics]  INFO {org.wso2.carbon.core.init.JMXServerManager} -  JMX Service URL  : service:jmx:rmi://localhost:11113/jndi/rmi://localhost:10001/jmxrmi
[2017-05-28 13:03:46,880] [IoT-Analytics]  INFO {org.wso2.carbon.analytics.eventsink.AnalyticsEventStoreDeployer} -  Deploying analytics event store: org_wso2_geo_FusedSpatialEvent.xml
[2017-05-28 13:03:46,918] [IoT-Analytics]  INFO {org.wso2.carbon.core.internal.StartupFinalizerServiceComponent} -  Server           :  WSO2 IoT - Analytics-3.0.0
[2017-05-28 13:03:46,920] [IoT-Analytics]  INFO {org.wso2.carbon.core.internal.StartupFinalizerServiceComponent} -  WSO2 Carbon started in 95 sec
[2017-05-28 13:03:46,990] [IoT-Analytics]  INFO {org.wso2.carbon.event.stream.core.internal.EventJunction} -  WSO2EventConsumer added to the junction. Stream:org.wso2.geo.FusedSpatialEvent:1.0.0
[2017-05-28 13:03:46,992] [IoT-Analytics]  INFO {org.wso2.carbon.analytics.eventsink.AnalyticsEventStoreDeployer} -  Deployed successfully analytics event store: org_wso2_geo_FusedSpatialEvent.xml
[2017-05-28 13:03:47,606] [IoT-Analytics]  INFO {org.wso2.carbon.ui.internal.CarbonUIServiceComponent} -  Mgt Console URL  : https://192.x.x.x:9445/carbon/
[2017-05-28 13:03:47,686] [IoT-Analytics]  INFO {org.wso2.carbon.event.receiver.core.EventReceiverDeployer} -  Event Receiver undeployed successfully: Geo-Receiver-HTTP-LocationStream.xml
[2017-05-28 13:03:47,721] [IoT-Analytics]  INFO {org.wso2.carbon.event.input.adapter.core.internal.InputAdapterRuntime} -  Connecting receiver Geo-Receiver-HTTP-LocationStream
[2017-05-28 13:03:47,725] [IoT-Analytics]  INFO {org.wso2.carbon.event.stream.core.internal.EventJunction} -  Producer added to the junction. Stream:org.wso2.geo.LocationStream:1.0.0
[2017-05-28 13:03:47,725] [IoT-Analytics]  INFO {org.wso2.carbon.event.receiver.core.EventReceiverDeployer} -  Event Receiver configuration successfully deployed and in active state: Geo-Receiver-HTTP-LocationStream
[2017-05-28 13:03:58,761] [IoT-Analytics]  INFO {org.wso2.carbon.event.processor.manager.core.internal.CarbonEventManagementService} -  Starting polling event receivers
[2017-05-28 13:26:31,353] [IoT-Analytics]  INFO {org.wso2.carbon.databridge.core.DataBridge} -  user admin connected
[2017-05-28 13:26:31,468] [IoT-Analytics] 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.android.agent.Stream: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.android.agent.Stream:1.0.0 present in cache 
    at org.wso2.carbon.databridge.receiver.thrift.converter.ThriftEventConverter.createEventList(ThriftEventConverter.java:166)
    ... 7 more
[2017-05-28 13:32:32,042] [IoT-Analytics] 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.android.agent.Stream: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.android.agent.Stream:1.0.0 present in cache 
    at org.wso2.carbon.databridge.receiver.thrift.converter.ThriftEventConverter.createEventList(ThriftEventConverter.java:166)
    ... 7 more

当我尝试在地理仪表板上定义地理围栏查询和形状时,按下保存后,它会引发以下错误:

[2017-05-28 13:47:35,301] [IoT-Analytics] 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.android.agent.Stream: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.android.agent.Stream:1.0.0 present in cache 
    at org.wso2.carbon.databridge.receiver.thrift.converter.ThriftEventConverter.createEventList(ThriftEventConverter.java:166)
    ... 7 more
[2017-05-28 13:48:14,089] [IoT-Analytics]  INFO {JAGGERY.store.carbon.super.fs.gadget.geo-dashboard.controllers.set_alerts:jag} -  /* Enter a unique ExecutionPlan */
@Plan:name('Geo-ExecutionPlan-Within_home---_4e42e50120311aea_alert')

/* Enter a unique description for ExecutionPlan */
-- @Plan:description('ExecutionPlan')

/* define streams/tables and write queries here ... */

@Import('org.wso2.geo.StandardSpatialEvents:1.0.0')
define stream dataIn (id string, latitude double, longitude double, timeStamp long, type string ,speed float, heading float, eventId string);

@Export('org.wso2.geo.ProcessedSpatialEvents:1.0.0')
define stream dataOut (id string, latitude double, longitude double, timeStamp long, type string ,speed float, heading float, eventId string, state string, information string);

from dataIn[geo:within(longitude,latitude,"{'type':'Polygon','coordinates':[[[32.79895305633545,39.98135815980835],[32.799296379089355,39.98124306559073],[32.79925346374511,39.98077857624252],[32.799028158187866,39.98035107883081],[32.79843807220459,39.97984547747823],[32.79794454574585,39.98008800217112],[32.79849708080292,39.980803239473126],[32.79895305633545,39.98135815980835]]]}")==true and id == "4e42e50120311aea"]#geodashboard:subscribe()
select id , latitude, longitude,timeStamp, type, speed, heading ,eventId , "ALERTED" as state, "This device is in home restricted area!!!" as information
insert into dataOut;
from dataIn[geo:within(longitude,latitude,"{'type':'Polygon','coordinates':[[[32.79895305633545,39.98135815980835],[32.799296379089355,39.98124306559073],[32.79925346374511,39.98077857624252],[32.799028158187866,39.98035107883081],[32.79843807220459,39.97984547747823],[32.79794454574585,39.98008800217112],[32.79849708080292,39.980803239473126],[32.79895305633545,39.98135815980835]]]}")!=true and id == "4e42e50120311aea"]
select id , latitude, longitude,timeStamp, type, speed, heading ,eventId , "NORMAL" as state, "" as information
insert into dataOut;

[2017-05-28 13:48:14,139] [IoT-Analytics]  WARN {org.wso2.carbon.server.admin.module.handler.AuthenticationHandler} -  Illegal access attempt at [2017-05-28 13:48:14,0139] from IP address 127.0.0.1 while trying to authenticate access to service EventProcessorAdminService
[2017-05-28 13:48:14,144] [IoT-Analytics] ERROR {org.jaggeryjs.jaggery.core.manager.WebAppManager} -  org.mozilla.javascript.WrappedException: Wrapped org.apache.axis2.AxisFault: Transport error: 401 Error: Unauthorized (/portal/store/carbon.super/fs/gadget/geo-dashboard/controllers/set_alerts.jag#117)
org.jaggeryjs.scriptengine.exceptions.ScriptException: org.mozilla.javascript.WrappedException: Wrapped org.apache.axis2.AxisFault: Transport error: 401 Error: Unauthorized (/portal/store/carbon.super/fs/gadget/geo-dashboard/controllers/set_alerts.jag#117)
    at org.jaggeryjs.scriptengine.engine.RhinoEngine.execScript(RhinoEngine.java:571)
    at org.jaggeryjs.scriptengine.engine.RhinoEngine.exec(RhinoEngine.java:273)
    at org.jaggeryjs.jaggery.core.manager.WebAppManager.exec(WebAppManager.java:588)
    at org.jaggeryjs.jaggery.core.manager.WebAppManager.execute(WebAppManager.java:508)
    at org.jaggeryjs.jaggery.core.JaggeryServlet.doPost(JaggeryServlet.java:29)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:650)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:747)
    at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:485)
    at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:377)
    at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:337)
    at org.jaggeryjs.jaggery.core.JaggeryFilter.doFilter(JaggeryFilter.java:21)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.wso2.carbon.dashboard.store.filter.TenantStoreFilter.doFilter(TenantStoreFilter.java:51)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.apache.catalina.filters.HttpHeaderSecurityFilter.doFilter(HttpHeaderSecurityFilter.java:120)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:218)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
    at org.wso2.carbon.tomcat.ext.valves.CompositeValve.continueInvocation(CompositeValve.java:99)
    at org.wso2.carbon.tomcat.ext.valves.CarbonTomcatValve$1.invoke(CarbonTomcatValve.java:47)
    at org.wso2.carbon.webapp.mgt.TenantLazyLoaderValve.invoke(TenantLazyLoaderValve.java:57)
    at org.wso2.carbon.event.receiver.core.internal.tenantmgt.TenantLazyLoaderValve.invoke(TenantLazyLoaderValve.java:48)
    at org.wso2.carbon.tomcat.ext.valves.TomcatValveContainer.invokeValves(TomcatValveContainer.java:47)
    at org.wso2.carbon.tomcat.ext.valves.CompositeValve.invoke(CompositeValve.java:62)
    at org.wso2.carbon.tomcat.ext.valves.CarbonStuckThreadDetectionValve.invoke(CarbonStuckThreadDetectionValve.java:159)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:958)
    at org.wso2.carbon.tomcat.ext.valves.CarbonContextCreatorValve.invoke(CarbonContextCreatorValve.java:57)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:452)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1087)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:637)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1756)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1715)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    at java.lang.Thread.run(Thread.java:745)
Caused by: org.mozilla.javascript.WrappedException: Wrapped org.apache.axis2.AxisFault: Transport error: 401 Error: Unauthorized (/portal/store/carbon.super/fs/gadget/geo-dashboard/controllers/set_alerts.jag#117)
    at org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Context.java:1754)
    at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:148)
    at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:225)
    at org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:32)
    at org.jaggeryjs.rhino.portal.store.carbon.super.fs.gadget.geo_dashboard.controllers.c6._c_script_0(/portal/store/carbon.super/fs/gadget/geo-dashboard/controllers/set_alerts.jag:117)
    at org.jaggeryjs.rhino.portal.store.carbon.super.fs.gadget.geo_dashboard.controllers.c6.call(/portal/store/carbon.super/fs/gadget/geo-dashboard/controllers/set_alerts.jag)
    at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:394)
    at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3091)
    at org.jaggeryjs.rhino.portal.store.carbon.super.fs.gadget.geo_dashboard.controllers.c6.call(/portal/store/carbon.super/fs/gadget/geo-dashboard/controllers/set_alerts.jag)
    at org.jaggeryjs.rhino.portal.store.carbon.super.fs.gadget.geo_dashboard.controllers.c6.exec(/portal/store/carbon.super/fs/gadget/geo-dashboard/controllers/set_alerts.jag)
    at org.jaggeryjs.scriptengine.engine.RhinoEngine.execScript(RhinoEngine.java:567)
    ... 45 more
Caused by: org.apache.axis2.AxisFault: Transport error: 401 Error: Unauthorized
    at org.apache.axis2.transport.http.HTTPSender.handleResponse(HTTPSender.java:326)
    at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:196)
    at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:77)
    at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:451)
    at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:278)
    at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:442)
    at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:430)
    at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:225)
    at org.apache.axis2.client.OperationClient.execute(OperationClient.java:149)
    at org.wso2.carbon.event.processor.stub.EventProcessorAdminServiceStub.validateExecutionPlan(EventProcessorAdminServiceStub.java:2207)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:126)
    ... 54 more

我搜索了与这些异常相关的所有问题,并进行了旧产品文档中提到的其他配置,但找不到解决方案。有没有我可以错过的其他配置?

提前致谢

4

2 回答 2

1

第一个问题是因为org.wso2.android.agent.Streamvanila 分发包不提供该定义。

您可以从这个链接下载它或构建。提取存档并复制android_agent_analytics-1.0.0.car$IOT_HOME/analytics/repository/deployments/server/carbonapps路径(此问题已在最新版本中修复)。

对于第二个问题;存在身份验证问题。您是否尝试使用私人浏览器窗口登录 /portal?它可能会解决问题。

于 2017-05-30T07:08:36.130 回答
0

WSO2 IoT 3.1.0发布,我们已经修复了这些问题。现在它还包括用于退出和进入的地理围栏警报。

于 2017-08-16T04:26:18.657 回答