Code Monkey home page Code Monkey logo

Comments (6)

hylkevds avatar hylkevds commented on September 25, 2024

Without information about your setup, so we can reproduce your problem, there is nothing anyone can do.

  • Which version are you using
  • Did you enable MQTT?
  • Did it work before?
  • Is there something else listening on port 1883 (use netstat)

from frost-server.

johannes-riesterer avatar johannes-riesterer commented on September 25, 2024

With your current version i can connect via mqtt but i get the following error message:
09:14:50.251 [InternalBusSend-Thread] INFO d.f.i.i.s.m.MqttMessageBus - paho-client connecting to broker: tcp://mosquitto:1883
web_1 | 09:14:50.364 [InternalBusSend-Thread] ERROR d.f.i.i.s.m.MqttMessageBus - Failed to connect to broker: tcp://mosquitto:1883
web_1 | 09:14:50.365 [InternalBusSend-Thread] ERROR d.f.i.i.s.m.MqttMessageBus -
web_1 | org.eclipse.paho.client.mqttv3.MqttException: MqttException
web_1 | at org.eclipse.paho.client.mqttv3.internal.ExceptionHelper.createMqttException(ExceptionHelper.java:38)
web_1 | at org.eclipse.paho.client.mqttv3.internal.ClientComms$ConnectBG.run(ClientComms.java:715)
web_1 | at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
web_1 | at java.util.concurrent.FutureTask.run(FutureTask.java:266)
web_1 | at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
web_1 | at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
web_1 | at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
web_1 | at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
web_1 | at java.lang.Thread.run(Thread.java:748)
web_1 | Caused by: java.net.UnknownHostException: mosquitto
web_1 | at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:184)
web_1 | at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
web_1 | at java.net.Socket.connect(Socket.java:589)
web_1 | at org.eclipse.paho.client.mqttv3.internal.TCPNetworkModule.start(TCPNetworkModule.java:84)
web_1 | at org.eclipse.paho.client.mqttv3.internal.ClientComms$ConnectBG.run(ClientComms.java:701)
web_1 | ... 7 common frames omitted
web_1 | 09:14:50.365 [InternalBusSend-Thread] ERROR d.f.i.i.s.m.MqttMessageBus - Failed to publish message to bus.
web_1 | org.eclipse.paho.client.mqttv3.MqttException: Client is not connected
web_1 | at org.eclipse.paho.client.mqttv3.internal.ExceptionHelper.createMqttException(ExceptionHelper.java:31)
web_1 | at org.eclipse.paho.client.mqttv3.internal.ClientComms.sendNoWait(ClientComms.java:199)
web_1 | at org.eclipse.paho.client.mqttv3.MqttAsyncClient.publish(MqttAsyncClient.java:1355)
web_1 | at org.eclipse.paho.client.mqttv3.MqttClient.publish(MqttClient.java:583)
web_1 | at org.eclipse.paho.client.mqttv3.MqttClient.publish(MqttClient.java:575)
web_1 | at de.fraunhofer.iosb.ilt.sta.messagebus.MqttMessageBus.handleMessageSent(MqttMessageBus.java:245)
web_1 | at de.fraunhofer.iosb.ilt.sta.messagebus.MqttMessageBus.lambda$init$0(MqttMessageBus.java:105)
web_1 | at de.fraunhofer.iosb.ilt.sta.util.ProcessorHelper$Processor.run(ProcessorHelper.java:107)
web_1 | at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
web_1 | at java.util.concurrent.FutureTask.run(FutureTask.java:266)
web_1 | at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
web_1 | at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
web_1 | at java.lang.Thread.run(Thread.java:748)

With our version
https://github.com/image357/SensorThingsServer/tree/teco
we can not connect to mqtt broker at all

Regards

Johannes

from frost-server.

hylkevds avatar hylkevds commented on September 25, 2024

I'm guessing you're using the MQTTP package or the FROST-Server docker image. The default setting for the message bus was incorrect. I've fixed it.
You can also explicitly set the option
bus.busImplementationClass to value de.fraunhofer.iosb.ilt.sta.messagebus.InternalMessageBus

Unless you're using the HTTP package, or the FROST-Server-HTTP docker image, in that case you're not running an MQTT server at all.

See https://github.com/FraunhoferIOSB/FROST-Server/blob/master/docs/architecture-packages.adoc

from frost-server.

johannes-riesterer avatar johannes-riesterer commented on September 25, 2024

One more question: which .war files do we have to install into the tomcat server? What do we have to change within our implementation? In your version the bug is fixed, but in our version we still can't connect

from frost-server.

hylkevds avatar hylkevds commented on September 25, 2024

Did you re-build your docker images?
Which war you need depends on the setup you want. If in doubt, take the MQTTP one, since it contains everything.

from frost-server.

johannes-riesterer avatar johannes-riesterer commented on September 25, 2024

ok, that works.

Thank you for your help!

Regards

Johannes

from frost-server.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.