Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Kapua » Cannot get data from kapua
Cannot get data from kapua [message #1778208] Tue, 12 December 2017 01:19 Go to next message
lin yanghuan is currently offline lin yanghuanFriend
Messages: 17
Registered: August 2017
Junior Member
I use the kapua as cloudservice and connect kura. Then install the org.eclipse.kura.demo.heater to the kura. Erverything is OK, the kura log show the publish message is confirmed .But in the kapua console i cannot see the publish data .I am sure the kapua can receive data .What's the problem?Where is the publish data?
I can see my device in the Connections tab,but i cannot see it in the Devices tab and have not data in the Data tab.(the disconnect device is simulator-kura and example1 topic is simulator-kura generate)
index.php/fa/31537/0/
index.php/fa/31538/0/
index.php/fa/31539/0/
Re: Cannot get data from kapua [message #1778240 is a reply to message #1778208] Tue, 12 December 2017 08:57 Go to previous messageGo to next message
Riccardo Modanese is currently offline Riccardo ModaneseFriend
Messages: 4
Registered: August 2017
Junior Member
Hi, can you provide the Kapua broker and console logs?
Re: Cannot get data from kapua [message #1778257 is a reply to message #1778208] Tue, 12 December 2017 11:35 Go to previous messageGo to next message
Milan Ggg is currently offline Milan GggFriend
Messages: 28
Registered: March 2017
Junior Member
Can you show us your Kura CloudService setup?
Re: Cannot get data from kapua [message #1778309 is a reply to message #1778240] Wed, 13 December 2017 00:39 Go to previous messageGo to next message
lin yanghuan is currently offline lin yanghuanFriend
Messages: 17
Registered: August 2017
Junior Member
Riccardo Modanese wrote on Tue, 12 December 2017 08:57
Hi, can you provide the Kapua broker and console logs?

how can get the log? I use docker install. by the way, the kapua's doc is too simpal it like as a black box.
Re: Cannot get data from kapua [message #1778311 is a reply to message #1778257] Wed, 13 December 2017 00:55 Go to previous messageGo to next message
lin yanghuan is currently offline lin yanghuanFriend
Messages: 17
Registered: August 2017
Junior Member
Milan Ggg wrote on Tue, 12 December 2017 11:35
Can you show us your Kura CloudService setup?

index.php/fa/31583/0/
index.php/fa/31584/0/
this is the kura log
2017-12-13 08:49:41,017 [mToolkit Worker #1] INFO  o.e.k.c.c.ConfigurationServiceImpl - Registering metatype pid: org.eclipse.kura.demo.heater.Heater ...
2017-12-13 08:49:41,084 [mToolkit Worker #1] INFO  o.e.k.c.c.ConfigurationServiceImpl - Seeding updated configuration for pid: org.eclipse.kura.demo.heater.Heater
2017-12-13 08:49:42,414 [Component Resolve Thread (Bundle 7)] INFO  o.e.k.d.h.Heater - Activating Heater...
2017-12-13 08:49:42,417 [Component Resolve Thread (Bundle 7)] INFO  o.e.k.d.h.Heater - Activate - component.name: org.eclipse.kura.demo.heater.Heater
2017-12-13 08:49:42,420 [Component Resolve Thread (Bundle 7)] INFO  o.e.k.d.h.Heater - Activate - temperature.initial: 10.0
2017-12-13 08:49:42,421 [Component Resolve Thread (Bundle 7)] INFO  o.e.k.d.h.Heater - Activate - program.stopTime: 22:00
2017-12-13 08:49:42,424 [Component Resolve Thread (Bundle 7)] INFO  o.e.k.d.h.Heater - Activate - objectClass: [Ljava.lang.String;@1661023
2017-12-13 08:49:42,426 [Component Resolve Thread (Bundle 7)] INFO  o.e.k.d.h.Heater - Activate - manual.setPoint: 15.0
2017-12-13 08:49:42,428 [Component Resolve Thread (Bundle 7)] INFO  o.e.k.d.h.Heater - Activate - publish.semanticTopic: data
2017-12-13 08:49:42,429 [Component Resolve Thread (Bundle 7)] INFO  o.e.k.d.h.Heater - Activate - program.setPoint: 20.5
2017-12-13 08:49:42,431 [Component Resolve Thread (Bundle 7)] INFO  o.e.k.d.h.Heater - Activate - mode: Manual
2017-12-13 08:49:42,433 [Component Resolve Thread (Bundle 7)] INFO  o.e.k.d.h.Heater - Activate - kura.service.pid: org.eclipse.kura.demo.heater.Heater
2017-12-13 08:49:42,435 [Component Resolve Thread (Bundle 7)] INFO  o.e.k.d.h.Heater - Activate - CloudService.target: (kura.service.pid=org.eclipse.kura.cloud.CloudService-1)
2017-12-13 08:49:42,437 [Component Resolve Thread (Bundle 7)] INFO  o.e.k.d.h.Heater - Activate - publish.rate: 2
2017-12-13 08:49:42,439 [Component Resolve Thread (Bundle 7)] INFO  o.e.k.d.h.Heater - Activate - service.pid: org.eclipse.kura.demo.heater.Heater
2017-12-13 08:49:42,441 [Component Resolve Thread (Bundle 7)] INFO  o.e.k.d.h.Heater - Activate - temperature.increment: 0.25
2017-12-13 08:49:42,443 [Component Resolve Thread (Bundle 7)] INFO  o.e.k.d.h.Heater - Activate - component.id: 131
2017-12-13 08:49:42,445 [Component Resolve Thread (Bundle 7)] INFO  o.e.k.d.h.Heater - Activate - publish.retain: false
2017-12-13 08:49:42,447 [Component Resolve Thread (Bundle 7)] INFO  o.e.k.d.h.Heater - Activate - publish.qos: 2
2017-12-13 08:49:42,449 [Component Resolve Thread (Bundle 7)] INFO  o.e.k.d.h.Heater - Activate - program.startTime: 06:00
2017-12-13 08:49:42,451 [Component Resolve Thread (Bundle 7)] INFO  o.e.k.d.h.Heater - Getting CloudClient for heater...
2017-12-13 08:49:42,852 [Component Resolve Thread (Bundle 7)] INFO  o.e.k.c.d.DataServiceImpl - Storing message on topic :$EDC/#account-name/#client-id/MQTT/APPS, priority: 0
2017-12-13 08:49:42,876 [Component Resolve Thread (Bundle 7)] INFO  o.e.k.c.d.DataServiceImpl - Stored message on topic :$EDC/#account-name/#client-id/MQTT/APPS, priority: 0
2017-12-13 08:49:42,891 [DataServiceImpl:Submit] INFO  o.e.k.c.d.t.m.MqttDataTransport - Publishing message on topic: $EDC/kura/kura1/MQTT/APPS with QoS: 0
2017-12-13 08:49:42,919 [Component Resolve Thread (Bundle 7)] INFO  o.e.k.d.h.Heater - Activating Heater... Done.
2017-12-13 08:49:42,924 [] INFO  o.e.k.c.d.DataServiceImpl - Storing message on topic :#account-name/#client-id/heater/data, priority: 5
2017-12-13 08:49:42,934 [Component Resolve Thread (Bundle 7)] INFO  o.e.k.c.c.ConfigurationServiceImpl - Registering ConfigurableComponent - org.eclipse.kura.demo.heater.Heater....
2017-12-13 08:49:42,936 [Component Resolve Thread (Bundle 7)] INFO  o.e.k.c.c.ConfigurationServiceImpl - Registering ConfigurableComponent - org.eclipse.kura.demo.heater.Heater....Done
2017-12-13 08:49:42,953 [] INFO  o.e.k.c.d.DataServiceImpl - Stored message on topic :#account-name/#client-id/heater/data, priority: 5
2017-12-13 08:49:42,962 [] INFO  o.e.k.d.h.Heater - Published to data message: org.eclipse.kura.message.KuraPayload@437998
2017-12-13 08:49:42,968 [DataServiceImpl:Submit] INFO  o.e.k.c.d.t.m.MqttDataTransport - Publishing message on topic: kura/kura1/heater/data with QoS: 2
2017-12-13 08:49:42,994 [MQTT Call: kura1] INFO  o.e.k.c.d.DataServiceImpl - Confirmed message ID: 9797 to store
2017-12-13 08:49:44,921 [] INFO  o.e.k.c.d.DataServiceImpl - Storing message on topic :#account-name/#client-id/heater/data, priority: 5
2017-12-13 08:49:44,951 [] INFO  o.e.k.c.d.DataServiceImpl - Stored message on topic :#account-name/#client-id/heater/data, priority: 5
2017-12-13 08:49:44,954 [] INFO  o.e.k.d.h.Heater - Published to data message: org.eclipse.kura.message.KuraPayload@848b60
2017-12-13 08:49:44,966 [DataServiceImpl:Submit] INFO  o.e.k.c.d.t.m.MqttDataTransport - Publishing message on topic: kura/kura1/heater/data with QoS: 2
2017-12-13 08:49:44,988 [MQTT Call: kura1] INFO  o.e.k.c.d.DataServiceImpl - Confirmed message ID: 9798 to store
2017-12-13 08:49:46,921 [] INFO  o.e.k.c.d.DataServiceImpl - Storing message on topic :#account-name/#client-id/heater/data, priority: 5
2017-12-13 08:49:46,949 [] INFO  o.e.k.c.d.DataServiceImpl - Stored message on topic :#account-name/#client-id/heater/data, priority: 5
2017-12-13 08:49:46,951 [] INFO  o.e.k.d.h.Heater - Published to data message: org.eclipse.kura.message.KuraPayload@bb12e8
2017-12-13 08:49:46,964 [DataServiceImpl:Submit] INFO  o.e.k.c.d.t.m.MqttDataTransport - Publishing message on topic: kura/kura1/heater/data with QoS: 2
2017-12-13 08:49:46,985 [MQTT Call: kura1] INFO  o.e.k.c.d.DataServiceImpl - Confirmed message ID: 9799 to store
2017-12-13 08:49:48,921 [] INFO  o.e.k.c.d.DataServiceImpl - Storing message on topic :#account-name/#client-id/heater/data, priority: 5
2017-12-13 08:49:48,948 [] INFO  o.e.k.c.d.DataServiceImpl - Stored message on topic :#account-name/#client-id/heater/data, priority: 5
2017-12-13 08:49:48,951 [] INFO  o.e.k.d.h.Heater - Published to data message: org.eclipse.kura.message.KuraPayload@1b9815b
  • Attachment: 1.png
    (Size: 63.93KB, Downloaded 274 times)
  • Attachment: 2.png
    (Size: 21.26KB, Downloaded 270 times)

[Updated on: Wed, 13 December 2017 00:56]

Report message to a moderator

Re: Cannot get data from kapua [message #1778335 is a reply to message #1778311] Wed, 13 December 2017 09:00 Go to previous messageGo to next message
Riccardo Modanese is currently offline Riccardo ModaneseFriend
Messages: 4
Registered: August 2017
Junior Member
@lin
You can get the containers log through:
> docker ps -a
to have the list of the containers then

> docker logs -f CONTAINER_ID
shows the log for the specific container.

Can you check the console and broker console?
Re: Cannot get data from kapua [message #1778349 is a reply to message #1778335] Wed, 13 December 2017 10:29 Go to previous messageGo to next message
lin yanghuan is currently offline lin yanghuanFriend
Messages: 17
Registered: August 2017
Junior Member
Thank you.
The kapua-console's log have not generate new message when the heater bundle running. This is the kapua-broker's log.
10:20:27.572 [ActiveMQ NIO Worker 5] WARN  o.a.a.b.TransportConnection.Service - Security Error occurred on connection to: tcp://192.168.199.111:49806, User 1:User123 (kura2 - tcp://192.168.199.111:49806 - conn id 8225215170882109175) is not authorized to write to: topic://VirtualTopic.Account123.kura2.heater.data
10:20:27.572 [ActiveMQ NIO Worker 5] WARN  o.a.a.t.mqtt.MQTTProtocolConverter - Failed to send MQTT Publish: 
10:20:29.595 [ActiveMQ NIO Worker 6] WARN  o.e.k.b.c.p.KapuaSecurityBrokerFilter - User 1:User123 (kura2 - tcp://192.168.199.111:49806 - conn id 8225215170882109175) is not authorized to write to: topic://VirtualTopic.Account123.kura2.heater.data
10:20:29.595 [ActiveMQ NIO Worker 6] WARN  o.a.a.b.TransportConnection.Service - Security Error occurred on connection to: tcp://192.168.199.111:49806, User 1:User123 (kura2 - tcp://192.168.199.111:49806 - conn id 8225215170882109175) is not authorized to write to: topic://VirtualTopic.Account123.kura2.heater.data
10:20:29.595 [ActiveMQ NIO Worker 6] WARN  o.a.a.t.mqtt.MQTTProtocolConverter - Failed to send MQTT Publish: 
10:20:31.037 [ActiveMQ NIO Worker 9] WARN  o.e.k.b.c.p.KapuaSecurityBrokerFilter - User 1:User123 (kura2 - tcp://192.168.199.111:49806 - conn id 8225215170882109175) is not authorized to write to: topic://VirtualTopic.$EDC.Account123.kura2.MQTT.APPS
10:20:31.037 [ActiveMQ NIO Worker 9] WARN  o.a.a.b.TransportConnection.Service - Security Error occurred on connection to: tcp://192.168.199.111:49806, User 1:User123 (kura2 - tcp://192.168.199.111:49806 - conn id 8225215170882109175) is not authorized to write to: topic://VirtualTopic.$EDC.Account123.kura2.MQTT.APPS
10:20:31.037 [ActiveMQ NIO Worker 9] WARN  o.a.a.t.mqtt.MQTTProtocolConverter - Failed to send MQTT Publish: 

Re: Cannot get data from kapua [message #1778369 is a reply to message #1778349] Wed, 13 December 2017 14:17 Go to previous messageGo to next message
Riccardo Modanese is currently offline Riccardo ModaneseFriend
Messages: 4
Registered: August 2017
Junior Member
It sounds like a configuration error.
From the broker log your device seems to be configured to connect to Kapua with 'kura2' as client id logged with a user that belongs to the account 'Account123'. (Account123.kura2.heater.data)
But from the device log your client id seems 'kura1' and the account name is 'kura'. (Publishing message on topic: kura/kura1/heater/data)
Can you provide more information about the username, account name and client id you are using to connect to Kapua?
Re: Cannot get data from kapua [message #1778418 is a reply to message #1778369] Thu, 14 December 2017 06:14 Go to previous message
lin yanghuan is currently offline lin yanghuanFriend
Messages: 17
Registered: August 2017
Junior Member
Riccardo Modanese wrote on Wed, 13 December 2017 14:17
It sounds like a configuration error.
From the broker log your device seems to be configured to connect to Kapua with 'kura2' as client id logged with a user that belongs to the account 'Account123'. (Account123.kura2.heater.data)
But from the device log your client id seems 'kura1' and the account name is 'kura'. (Publishing message on topic: kura/kura1/heater/data)
Can you provide more information about the username, account name and client id you are using to connect to Kapua?

Thank you very much.
I delecte all old CloudService from kura and create a new one , then follow the Kura - Kapua connection set again, finally it work! I think my problem is : in start i delecte the default CloudService in kura ,then i create now one use factory org.eclipse.camel.cloud.CamelFactory
Previous Topic:User manuals/documentation
Next Topic:Message persistence in kapua - Subscriber connection lost
Goto Forum:
  


Current Time: Tue Sep 18 17:43:26 GMT 2018

Powered by FUDForum. Page generated in 0.01570 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top