Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Kura » DataPublisherService not connected(I couldn't solve the "DataPublisherService not connected")
DataPublisherService not connected [message #1783663] Thu, 15 March 2018 10:21 Go to next message
Ahmed Gharssellaoui is currently offline Ahmed GharssellaouiFriend
Messages: 31
Registered: February 2018
Member
Hi, I am trying to run an application based on the Heater example of kura, but I couldn't receive any data on the client side.

On the log I found that the "DataPublisherService not connected", and I used this configuration:
mqtt://broker.mqtt-dashboard.com:1883/

Can anyone help me please

06:15:39,837 [pool-15-thread-1] INFO Heater:295 - Published to sacem12 message: org.eclipse.kura.message.KuraPayload@1d4f432
06:15:41,839 [pool-15-thread-1] INFO DataServiceImpl:531 - Storing message on topic :#account-name/#client-id/heater/sacem12, priority: 5
06:15:41,845 [pool-15-thread-1] INFO DataServiceImpl:534 - Stored message on topic :#account-name/#client-id/heater/sacem12, priority: 5
06:15:41,851 [DataServiceImpl:Submit] INFO DataServiceImpl:821 - DataPublisherService not connected
06:15:41,851 [pool-15-thread-1] INFO Heater:295 - Published to sacem12 message: org.eclipse.kura.message.KuraPayload@17b3a90
06:15:43,853 [pool-15-thread-1] INFO DataServiceImpl:531 - Storing message on topic :#account-name/#client-id/heater/sacem12, priority: 5
06:15:43,862 [pool-15-thread-1] INFO DataServiceImpl:534 - Stored message on topic :#account-name/#client-id/heater/sacem12, priority: 5
06:15:43,863 [DataServiceImpl:Submit] INFO DataServiceImpl:821 - DataPublisherService not connected
06:15:43,864 [pool-15-thread-1] INFO Heater:295 - Published to sacem12 message: org.eclipse.kura.message.KuraPayload@778438
Re: DataPublisherService not connected [message #1783664 is a reply to message #1783663] Thu, 15 March 2018 10:25 Go to previous messageGo to next message
Matteo Maiero is currently offline Matteo MaieroFriend
Messages: 423
Registered: July 2015
Location: Italy
Senior Member
Hi,
that message means that the Kura gateway is currently not connected to the desired mqtt endpoint so, no message can be published.
I would ask you to review the connection parameters and verify if they are correct. Furthermore, please verify that the gateway can connect to the mqtt endpoint.

Best regards,
Matteo
Re: DataPublisherService not connected [message #1784189 is a reply to message #1783664] Fri, 23 March 2018 10:27 Go to previous messageGo to next message
Ahmed Gharssellaoui is currently offline Ahmed GharssellaouiFriend
Messages: 31
Registered: February 2018
Member
Dear Matteo,

Thank you for your support and help.
I solved the problem and it works now.
However I have another question please.

I build a bundle to communication with a Modbus device, where Kura play the role of modbus client and it work fine.
I want this bundle to be used by another bundle (I want the new package to start, stop, set params of the modbus package ).
Any suggestions or examples manifesting this approach ?

Kindest regards
Re: DataPublisherService not connected [message #1784193 is a reply to message #1784189] Fri, 23 March 2018 11:24 Go to previous messageGo to next message
Matteo Maiero is currently offline Matteo MaieroFriend
Messages: 423
Registered: July 2015
Location: Italy
Senior Member
It depends on what you want to achieve.
If you simply want to use the first bundle, you can have it exporting an api as a service and use osgi in order to find the bundle and use it as a service provider.
I believe that this is the usual behaviour in OSGi and most of the framework is built in this way.
You can have a look at the way the can example (https://github.com/eclipse/kura/tree/develop/kura/examples/org.eclipse.kura.example.can) uses the can protocol provider bundle (https://github.com/eclipse/kura/tree/develop/kura/org.eclipse.kura.protocol.can).

Best regards,
Matteo
Re: DataPublisherService not connected [message #1784294 is a reply to message #1783664] Mon, 26 March 2018 10:51 Go to previous messageGo to next message
Ahmed Gharssellaoui is currently offline Ahmed GharssellaouiFriend
Messages: 31
Registered: February 2018
Member
Thank you dear Matteo,

I tried an example with your advice, however I have always this error when I try to import the bundle :
org.osgi.framework.BundleException: Could not resolve module: com.sacem.iiotgatway.main [76]
Unresolved requirement: Import-Package: com.sacem.iiotgateway.modbus


even it's declared in MANIFEST.MF file:

Import-Package: com.sacem.iiotgateway.modbus,
org.eclipse.kura.configuration;version="1.1.2",
org.osgi.service.component;version="1.2.2",
org.slf4j;version="1.7.21
Re: DataPublisherService not connected [message #1784306 is a reply to message #1784294] Mon, 26 March 2018 13:23 Go to previous message
Matteo Maiero is currently offline Matteo MaieroFriend
Messages: 423
Registered: July 2015
Location: Italy
Senior Member
Hi, it seems that you are not able to import that package.

Is that exported?
Have you had a look at the can examples. I believe you could try to copy from there. Or having a look at the official documentation where the examples provided can give you an hint on how to proceed.

Best regards,
Matteo
Previous Topic:table created in the Hsql data base dropped after reboot
Next Topic:Unable to active ActiveMQ embedded broker
Goto Forum:
  


Current Time: Thu Nov 07 13:24:57 GMT 2024

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

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

Back to the top