当kura在模拟器上运行时,通过MQTT远程部署部署包非常有效,但是当我在覆盆子pi上运行kura时发送相同的MQTT消息时,部署失败。
以下是kura登录pi -
2017-07-06 11:36:37,396 [MQTT Call: test-client] INFO o.e.k.c.c.CloudServiceImpl - Message arrived on topic: $EDC/amir-kura/test-client/DEPLOY-V2/EXEC/download
2017-07-06 11:36:37,458 [MQTT Call: test-client] WARN o.e.k.c.d.DataServiceListenerS - No registered listeners. Ignoring onMessageArrived
将一些日志放入开发人员工作区,然后将其部署在raspberry pi上后,日志如下 -
2017-07-06 11:36:37,391 [MQTT Call: test-client] INFO o.e.k.c.d.DataServiceListenerS - m_listeners -- >>[org.eclipse.kura.core.cloud.CloudServiceImpl@17ee701]
2017-07-06 11:36:37,393 [MQTT Call: test-client] INFO o.e.k.c.d.DataServiceListenerS - in for, listener -- >>[org.eclipse.kura.core.cloud.CloudServiceImpl@17ee701]
2017-07-06 11:36:37,396 [MQTT Call: test-client] INFO o.e.k.c.c.CloudServiceImpl - Message arrived on topic: $EDC/amir-kura/test-client/DEPLOY-V2/EXEC/download
2017-07-06 11:36:37,398 [MQTT Call: test-client] INFO o.e.k.c.c.CloudServiceImpl - payload
2017-07-06 11:36:37,445 [MQTT Call: test-client] INFO o.e.k.c.c.CloudServiceImpl - cloud clients is -------------------->1
2017-07-06 11:36:37,448 [MQTT Call: test-client] INFO o.e.k.c.c.CloudServiceImpl - in for loop cloud client is -------------------->[org.eclipse.kura.core.cloud.CloudClientImpl@12629da]
2017-07-06 11:36:37,451 [MQTT Call: test-client] INFO o.e.k.c.c.CloudServiceImpl - cloudClient.getApplicationId()ASSET-V1
2017-07-06 11:36:37,453 [MQTT Call: test-client] INFO o.e.k.c.c.CloudServiceImpl - kuraTopic.getApplicationId()DEPLOY-V2
2017-07-06 11:36:37,458 [MQTT Call: test-client] WARN o.e.k.c.d.DataServiceListenerS - No registered listeners. Ignoring onMessageArrived
与模拟器日志相比,如下所示 -
16:33:04,172 [MQTT Call: test-client] INFO CloudServiceImpl:436 - Message arrived on topic: $EDC/amir-kura/test-client/DEPLOY-V2/EXEC/download
16:33:04,173 [MQTT Call: test-client] INFO CloudServiceImpl:437 - payload
16:33:04,180 [MQTT Call: test-client] INFO CloudServiceImpl:451 - cloud clients is -------------------->5
16:33:04,181 [MQTT Call: test-client] INFO CloudServiceImpl:454 - in for loop cloud client is -------------------->[org.eclipse.kura.core.cloud.CloudClientImpl@6b00be9, org.eclipse.kura.core.cloud.CloudClientImpl@2e57dfa3, org.eclipse.kura.core.cloud.CloudClientImpl@5d6b70cb, org.eclipse.kura.core.cloud.CloudClientImpl@60a2beb1, org.eclipse.kura.core.cloud.CloudClientImpl@664b1e0f]
16:33:04,181 [MQTT Call: test-client] INFO CloudServiceImpl:455 - cloudClient.getApplicationId()CONF-V1
16:33:04,181 [MQTT Call: test-client] INFO CloudServiceImpl:456 - kuraTopic.getApplicationId()DEPLOY-V2
16:33:04,181 [MQTT Call: test-client] INFO CloudServiceImpl:454 - in for loop cloud client is -------------------->[org.eclipse.kura.core.cloud.CloudClientImpl@6b00be9, org.eclipse.kura.core.cloud.CloudClientImpl@2e57dfa3, org.eclipse.kura.core.cloud.CloudClientImpl@5d6b70cb, org.eclipse.kura.core.cloud.CloudClientImpl@60a2beb1, org.eclipse.kura.core.cloud.CloudClientImpl@664b1e0f]
16:33:04,181 [MQTT Call: test-client] INFO CloudServiceImpl:455 - cloudClient.getApplicationId()DEPLOY-V2
16:33:04,181 [MQTT Call: test-client] INFO CloudServiceImpl:456 - kuraTopic.getApplicationId()DEPLOY-V2
16:33:04,182 [MQTT Call: test-client] INFO CloudServiceImpl:459 - $EDC
16:33:04,182 [MQTT Call: test-client] INFO CloudServiceImpl:460 - $EDC
16:33:04,182 [MQTT Call: test-client] INFO CloudServiceImpl:462 - prefix are equal
16:33:04,182 [MQTT Call: test-client] INFO CloudServiceImpl:476 - validMessagetrue
16:33:04,185 [MQTT Call: test-client] INFO CloudServiceImpl:454 - in for loop cloud client is -------------------->[org.eclipse.kura.core.cloud.CloudClientImpl@6b00be9, org.eclipse.kura.core.cloud.CloudClientImpl@2e57dfa3, org.eclipse.kura.core.cloud.CloudClientImpl@5d6b70cb, org.eclipse.kura.core.cloud.CloudClientImpl@60a2beb1, org.eclipse.kura.core.cloud.CloudClientImpl@664b1e0f]
16:33:04,186 [MQTT Call: test-client] INFO CloudServiceImpl:455 - cloudClient.getApplicationId()CMD-V1
16:33:04,186 [MQTT Call: test-client] INFO CloudServiceImpl:456 - kuraTopic.getApplicationId()DEPLOY-V2
16:33:04,186 [MQTT Call: test-client] INFO CloudServiceImpl:454 - in for loop cloud client is -------------------->[org.eclipse.kura.core.cloud.CloudClientImpl@6b00be9, org.eclipse.kura.core.cloud.CloudClientImpl@2e57dfa3, org.eclipse.kura.core.cloud.CloudClientImpl@5d6b70cb, org.eclipse.kura.core.cloud.CloudClientImpl@60a2beb1, org.eclipse.kura.core.cloud.CloudClientImpl@664b1e0f]
16:33:04,186 [MQTT Call: test-client] INFO CloudServiceImpl:455 - cloudClient.getApplicationId()myapp
16:33:04,186 [MQTT Call: test-client] INFO CloudServiceImpl:456 - kuraTopic.getApplicationId()DEPLOY-V2
16:33:04,186 [MQTT Call: test-client] INFO CloudServiceImpl:454 - in for loop cloud client is -------------------->[org.eclipse.kura.core.cloud.CloudClientImpl@6b00be9, org.eclipse.kura.core.cloud.CloudClientImpl@2e57dfa3, org.eclipse.kura.core.cloud.CloudClientImpl@5d6b70cb, org.eclipse.kura.core.cloud.CloudClientImpl@60a2beb1, org.eclipse.kura.core.cloud.CloudClientImpl@664b1e0f]
16:33:04,186 [MQTT Call: test-client] INFO CloudServiceImpl:455 - cloudClient.getApplicationId()ASSET-V1
16:33:04,186 [MQTT Call: test-client] INFO CloudServiceImpl:456 - kuraTopic.getApplicationId()DEPLOY-V2
16:33:04,191 [pool-1-thread-1] INFO CloudDeploymentHandlerV2:474 - About to download and install package at URL http://172.30.66.77:8081/RemoteDeploymentTest/hello_world.dp
16:33:04,191 [pool-1-thread-1] INFO CloudDeploymentHandlerV2:483 - Downloading package from URL: http://172.30.66.77:8081/RemoteDeploymentTest/hello_world.dp
16:33:04,193 [pool-1-thread-1] INFO DataServiceImpl:441 - Storing message on topic :$EDC/#account-name/CLIENT_12RV8P8UJBOP6IIRNOFC7OJH62/DEPLOY-V2/REPLY/REQUEST_PFLTDP6JEU47S4U876D1356BOE, priority: 1
16:33:04,199 [pool-11-thread-1] INFO DownloadImpl:110 - To download
16:33:04,202 [pool-1-thread-1] INFO DataServiceImpl:444 - Stored message on topic :$EDC/#account-name/CLIENT_12RV8P8UJBOP6IIRNOFC7OJH62/DEPLOY-V2/REPLY/REQUEST_PFLTDP6JEU47S4U876D1356BOE, priority: 1
16:33:04,204 [DataServiceImpl:Submit] INFO MqttDataTransport:516 - Publishing message on topic: $EDC/amir-kura/CLIENT_12RV8P8UJBOP6IIRNOFC7OJH62/DEPLOY-V2/REPLY/REQUEST_PFLTDP6JEU47S4U876D1356BOE with QoS: 0
16:33:04,395 [pool-14-thread-1] INFO HttpDownloadCountingOutputStream:107 - Content-lenght: 1736
16:33:04,396 [pool-14-thread-1] INFO DownloadImpl:82 - 0% downloaded
16:33:04,402 [pool-14-thread-1] INFO DataServiceImpl:441 - Storing message on topic :$EDC/#account-name/CLIENT_12RV8P8UJBOP6IIRNOFC7OJH62/DEPLOY-V2/NOTIFY/test-client/download, priority: 1
16:33:04,405 [pool-14-thread-1] INFO DataServiceImpl:444 - Stored message on topic :$EDC/#account-name/CLIENT_12RV8P8UJBOP6IIRNOFC7OJH62/DEPLOY-V2/NOTIFY/test-client/download, priority: 1
16:33:04,406 [pool-14-thread-1] INFO DownloadImpl:82 - 4% downloaded
然后按预期在模拟器上完成下载和安装。 在树莓派上安装kura有什么问题吗?我该如何解决这个问题? `
ss
命令的输出 -
osgi> ss
"Framework is launched."
id State Bundle
0 ACTIVE org.eclipse.osgi_3.11.1.v20160708-1632
Fragments=4
1 ACTIVE org.json_1.0.0.v201011060100
2 ACTIVE org.eclipse.paho.client.mqttv3_1.1.0
3 ACTIVE org.eclipse.equinox.cm_1.1.200.v20160324-1850
4 RESOLVED org.eclipse.kura.sun.misc_1.0.0
Master=0
5 ACTIVE org.eclipse.equinox.common_3.8.0.v20160509-1230
6 ACTIVE org.eclipse.equinox.registry_3.6.100.v20160223-2218
7 ACTIVE org.eclipse.equinox.http.registry_1.1.400.v20150715-1528
8 ACTIVE org.eclipse.equinox.console_1.1.200.v20150929-1405
9 ACTIVE org.eclipse.equinox.ds_1.4.400.v20160226-2036
10 ACTIVE org.eclipse.equinox.event_1.3.200.v20160324-1850
11 ACTIVE org.eclipse.equinox.io_1.1.100.v20150430-1834
12 ACTIVE org.eclipse.equinox.metatype_1.4.200.v20160324-1850
13 ACTIVE org.eclipse.equinox.util_1.0.500.v20130404-1337
14 ACTIVE org.eclipse.osgi.services_3.5.100.v20160504-1419
15 ACTIVE org.eclipse.osgi.util_3.3.100.v20150423-1351
16 ACTIVE org.apache.felix.gogo.command_0.10.0.v201209301215
17 ACTIVE org.apache.felix.gogo.runtime_0.10.0.v201209301036
18 ACTIVE org.apache.felix.gogo.shell_0.10.0.v201212101605
19 ACTIVE org.knowhowlab.osgi.monitoradmin_1.0.2
20 ACTIVE org.apache.felix.dependencymanager_3.0.0
21 ACTIVE org.apache.felix.deploymentadmin_0.9.5
22 ACTIVE osgi.cmpn_4.3.0.201111022214
23 ACTIVE org.eclipse.equinox.wireadmin_1.0.600.v20150715-1528
24 ACTIVE org.eclipse.equinox.http.jetty_3.3.0.v20160324-1850
25 ACTIVE org.eclipse.equinox.http.servlet_1.3.1.v20160808-1329
26 ACTIVE org.eclipse.jetty.continuation_9.3.9.v20160517
27 ACTIVE org.eclipse.jetty.http_9.3.9.v20160517
28 ACTIVE org.eclipse.jetty.io_9.3.9.v20160517
29 ACTIVE org.eclipse.jetty.security_9.3.9.v20160517
30 ACTIVE org.eclipse.jetty.server_9.3.9.v20160517
31 ACTIVE org.eclipse.jetty.servlet_9.3.9.v20160517
32 ACTIVE org.eclipse.jetty.util_9.3.9.v20160517
33 ACTIVE javax.servlet_3.1.0.v201410161800
34 ACTIVE org.apache.commons.fileupload_1.3.2
35 ACTIVE org.apache.commons.io_2.4.0
36 ACTIVE slf4j.api_1.7.21
Fragments=38
37 ACTIVE jcl.over.slf4j_1.7.21
38 RESOLVED slf4j.log4j12_1.7.21
Master=36
39 RESOLVED log4j_1.2.17
Fragments=40
40 RESOLVED log4j.apache-log4j-extras_1.1.0
Master=39
41 RESOLVED minimal-json_0.9.4
42 ACTIVE org.hsqldb.hsqldb_2.3.0
43 RESOLVED com.codeminders.hidapi.armv6hf_1.1.100
Master=44
44 ACTIVE com.codeminders.hidapi_1.1.100
Fragments=43
45 RESOLVED org.eclipse.soda.dk.comm.armv6hf_1.2.100
Master=46
46 ACTIVE org.eclipse.soda.dk.comm_1.2.100
Fragments=45
47 ACTIVE org.apache.commons.lang3_3.4.0
48 ACTIVE org.usb4java_1.2.100
49 ACTIVE usb4java-javax_1.2.100
50 RESOLVED jdk.dio.armv6hf_1.0.100
Master=51
51 RESOLVED jdk.dio_1.0.100
Fragments=50
52 ACTIVE org.apache.commons.net_3.1.0.v201205071737
53 RESOLVED org.apache.commons.exec_1.3.0
54 ACTIVE org.eclipse.kura.api_1.2.0
55 ACTIVE org.eclipse.kura.core_1.0.100
56 ACTIVE org.eclipse.kura.core.certificates_1.0.100
57 ACTIVE org.eclipse.kura.core.cloud_1.1.0
58 ACTIVE org.eclipse.kura.core.comm_1.0.100
59 ACTIVE org.eclipse.kura.core.configuration_1.1.0
60 ACTIVE org.eclipse.kura.core.crypto_1.0.100
61 ACTIVE org.eclipse.kura.core.deployment_1.1.100
62 ACTIVE org.eclipse.kura.core.log_1.0.100
63 ACTIVE org.eclipse.kura.core.net_1.0.100
64 ACTIVE org.eclipse.kura.core.status_1.0.100
65 ACTIVE org.eclipse.kura.deployment.agent_1.0.100
66 ACTIVE org.eclipse.kura.linux.clock_1.0.100
67 STARTING org.eclipse.kura.linux.command_1.0.5
68 ACTIVE org.eclipse.kura.linux.position_1.0.100
69 RESOLVED org.eclipse.kura.linux.usb.armv6hf_1.0.100
Master=70
70 ACTIVE org.eclipse.kura.linux.usb_1.0.100
Fragments=69
71 ACTIVE org.eclipse.kura.linux.bluetooth_1.0.100
72 ACTIVE org.eclipse.kura.linux.watchdog_1.0.100
73 RESOLVED org.eclipse.kura.camel.sun.misc_1.0.0
Master=74
74 ACTIVE org.apache.camel.camel-core_2.17.2
Fragments=73
75 ACTIVE org.apache.camel.camel-core-osgi_2.17.2
76 ACTIVE org.apache.camel.camel-kura_2.17.2
77 ACTIVE org.apache.camel.camel-stream_2.17.2
78 ACTIVE org.eclipse.kura.camel_1.2.0
79 ACTIVE org.eclipse.kura.camel.cloud.factory_1.1.0
80 ACTIVE org.eclipse.kura.camel.xml_1.0.100
81 ACTIVE org.eclipse.kura.asset.provider_1.0.0
82 ACTIVE org.eclipse.kura.asset.cloudlet.provider_1.0.0
83 ACTIVE org.eclipse.kura.asset.helper.provider_1.0.0
84 ACTIVE org.eclipse.kura.driver.helper.provider_1.0.0
85 ACTIVE org.eclipse.kura.localization_1.0.0
Fragments=86
86 RESOLVED org.eclipse.kura.localization.resources_1.0.0
Master=85
87 ACTIVE org.eclipse.kura.util_1.0.0
88 ACTIVE org.eclipse.kura.wire.component.provider_1.0.0
89 ACTIVE org.eclipse.kura.wire.helper.provider_1.0.0
90 ACTIVE org.eclipse.kura.wire.provider_1.0.0
91 RESOLVED com.gwt.user_1.0.100
92 ACTIVE org.eclipse.kura.web2_2.0.100
93 ACTIVE org.eclipse.kura.linux.gpio_1.0.100
94 ACTIVE org.eclipse.kura.linux.net_1.0.100
95 ACTIVE org.eclipse.kura.net.admin_1.0.100
96 ACTIVE org.tigris.mtoolkit.iagent.rpc_3.0.0.20110411-0918
97 ACTIVE TemperatureSensor_1.0.0.201706291356
98 ACTIVE onvif_plugin_1.0.0.201706301358
99 ACTIVE Lwm2mDeviceDiscovery_1.0.0.201706231445
ls
命令的输出 -
osgi> ls
All Components:
ID State Component Name Located in bundle
1 Active org.eclipse.equinox.event org.eclipse.equinox.event(bid=10)
2 Active org.eclipse.kura.data.DataService org.eclipse.kura.core(bid=55)
3 Active org.eclipse.kura.db.DbService org.eclipse.kura.core(bid=55)
4 Active org.eclipse.kura.core.data.transport.mqtt.MqttDataTransport org.eclipse.kura.core(bid=55)
5 Active org.eclipse.kura.ssl.SslManagerService org.eclipse.kura.core(bid=55)
6 Active org.eclipse.kura.system.SystemService org.eclipse.kura.core(bid=55)
7 Active org.eclipse.kura.system.SystemAdminService org.eclipse.kura.core(bid=55)
8 Active org.eclipse.kura.certificate.CertificatesService org.eclipse.kura.core.certificates(bid=56)
9 Active org.eclipse.kura.cloud.CloudService org.eclipse.kura.core.cloud(bid=57)
10 Registered org.eclipse.kura.cloud.CloudCallService org.eclipse.kura.core.cloud(bid=57)
11 Active org.eclipse.kura.core.cloud.factory.DefaultCloudServiceFactory org.eclipse.kura.core.cloud(bid=57)
12 Unsatisfied org.eclipse.kura.cloud.app.command.CommandCloudApp org.eclipse.kura.core.cloud(bid=57)
13 Active org.eclipse.kura.core.comm.CommConnectionFactory org.eclipse.kura.core.comm(bid=58)
14 Active org.eclipse.kura.core.configuration.CloudConfigurationHandler org.eclipse.kura.core.configuration(bid=59)
15 Active org.eclipse.kura.configuration.ConfigurationService org.eclipse.kura.core.configuration(bid=59)
16 Active org.eclipse.kura.crypto.CryptoService org.eclipse.kura.core.crypto(bid=60)
17 Unsatisfied org.eclipse.kura.core.deployment.CloudDeploymentHandlerV2 org.eclipse.kura.core.deployment(bid=61)
18 Active org.eclipse.kura.log.LoggerService org.eclipse.kura.core.log(bid=62)
19 Active org.eclipse.kura.status.CloudConnectionStatusService org.eclipse.kura.core.status(bid=64)
20 Active org.eclipse.kura.deployment.agent org.eclipse.kura.deployment.agent(bid=65)
21 Active org.eclipse.kura.clock.ClockService org.eclipse.kura.linux.clock(bid=66)
22 Registered org.eclipse.kura.command.CommandService org.eclipse.kura.linux.command(bid=67)
23 Active org.eclipse.kura.position.PositionService org.eclipse.kura.linux.position(bid=68)
24 Active org.eclipse.kura.usb.UsbService org.eclipse.kura.linux.usb(bid=70)
25 Active org.eclipse.kura.bluetooth.BluetoothService org.eclipse.kura.linux.bluetooth(bid=71)
26 Active org.eclipse.kura.watchdog.WatchdogService org.eclipse.kura.linux.watchdog(bid=72)
27 Active org.eclipse.kura.camel.KuraCloudComponentResolver org.eclipse.kura.camel(bid=78)
28 Unsatisfied org.eclipse.kura.camel.cloud.factory.CamelFactory org.eclipse.kura.camel.cloud.factory(bid=79)
29 Active org.eclipse.kura.camel.cloud.factory.CamelCloudServiceFactory org.eclipse.kura.camel.cloud.factory(bid=79)
30 Active org.eclipse.kura.camel.xml.XmlRouterComponent org.eclipse.kura.camel.xml(bid=80)
31 Unsatisfied org.eclipse.kura.asset org.eclipse.kura.asset.provider(bid=81)
32 Active org.eclipse.kura.asset.cloudlet org.eclipse.kura.asset.cloudlet.provider(bid=82)
33 Active org.eclipse.kura.asset.AssetService org.eclipse.kura.asset.helper.provider(bid=83)
34 Active org.eclipse.kura.driver.DriverService org.eclipse.kura.driver.helper.provider(bid=84)
35 Unsatisfied org.eclipse.kura.wire.CloudPublisher org.eclipse.kura.wire.component.provider(bid=88)
36 Unsatisfied org.eclipse.kura.wire.CloudSubscriber org.eclipse.kura.wire.component.provider(bid=88)
37 Unsatisfied org.eclipse.kura.wire.DbWireRecordFilter org.eclipse.kura.wire.component.provider(bid=88)
38 Unsatisfied org.eclipse.kura.wire.DbWireRecordStore org.eclipse.kura.wire.component.provider(bid=88)
39 Unsatisfied org.eclipse.kura.wire.Fifo org.eclipse.kura.wire.component.provider(bid=88)
40 Unsatisfied org.eclipse.kura.wire.Logger org.eclipse.kura.wire.component.provider(bid=88)
41 Unsatisfied org.eclipse.kura.wire.RegexFilter org.eclipse.kura.wire.component.provider(bid=88)
42 Unsatisfied org.eclipse.kura.wire.Timer org.eclipse.kura.wire.component.provider(bid=88)
43 Unsatisfied org.eclipse.kura.wire.WireAsset org.eclipse.kura.wire.component.provider(bid=88)
44 Active org.eclipse.kura.wire.WireHelperService org.eclipse.kura.wire.helper.provider(bid=89)
45 Registered org.eclipse.kura.wire.WireServiceCommand org.eclipse.kura.wire.provider(bid=90)
46 Active org.eclipse.kura.wire.WireService org.eclipse.kura.wire.provider(bid=90)
47 Active org.eclipse.kura.web.Console org.eclipse.kura.web2(bid=92)
48 Active org.eclipse.kura.gpio.GPIOService org.eclipse.kura.linux.gpio(bid=93)
49 Active org.eclipse.kura.net.NetworkService org.eclipse.kura.linux.net(bid=94)
50 Active org.eclipse.kura.net.dns.DnsMonitorService org.eclipse.kura.net.admin(bid=95)
51 Active org.eclipse.kura.net.EthernetMonitorService org.eclipse.kura.net.admin(bid=95)
52 Active org.eclipse.kura.net.admin.FirewallConfigurationServiceorg.eclipse.kura.net.admin(bid=95)
53 Active org.eclipse.kura.net.CellularMonitorService org.eclipse.kura.net.admin(bid=95)
54 Active org.eclipse.kura.net.admin.NetworkAdminService org.eclipse.kura.net.admin(bid=95)
55 Active org.eclipse.kura.net.admin.NetworkConfigurationService org.eclipse.kura.net.admin(bid=95)
56 Active org.eclipse.kura.net.WifiMonitorService org.eclipse.kura.net.admin(bid=95)
57 Active TemperatureSensor TemperatureSensor(bid=97)
58 Active onvif_plugin onvif_plugin(bid=98)
59 Active Lwm2mDeviceDiscovery Lwm2mDeviceDiscovery(bid=99)