Replies: 1 comment 1 reply
-
You can't use the SenorThings API MQTT service using an external MQTT broker, only through the FROST-MQTT component. The reason for that is that FROST must know which topics have subscriptions, since there is a near-infinite number of possible topics that need to be notified for a change. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I am having difficulties integrating FROST-Server with an external Mosquitto MQTT broker. The MQTT server is functioning correctly, and I am able to publish messages to the appropriate topic. However, the messages are not being persisted in the FROST-Server database, even though everything seems to be configured properly.
Here are the details of my setup:
Mosquitto MQTT Broker is running on a separate server and is accepting connections. I have tested publishing to the topic v1.0/Datastreams(3)/Observations and can see the messages being published without issues using MQTT clients.
FROST-Server is running in a Docker container, and I am using the fraunhoferiosb/frost-server:latest image.
Here is my docker-compose.yml file:
version: '3.8' services: frost-server: image: fraunhoferiosb/frost-server:latest environment: - serviceRootUrl=http://222.333.333.111:8989/FROST-Server - plugins.multiDatastream.enable=false - http.cors.enable=true - http.cors.allowed_origins=* - persistence.db.driver=org.postgresql.Driver - persistence.db.url=jdbc:postgresql://222.222.222.222:5433/frostdb - persistence.db.username=frostuser - persistence.db.password=xxxxxxx - persistence.autoUpdateDatabase=true - mqtt.broker.url=tcp://111.111.111.111:1883 - mqtt.broker.username=celular - mqtt.broker.password=xxxxx - mqtt.enable=true - mqtt.QoS=2 - mqtt.allow.anonymous=false ports: - 8989:8080
When I check the FROST-Server logs, it seems like the MQTT component does not start properly, or at least there is no indication that the server is receiving the messages. Here’s a snippet of my log output:
13-Sep-2024 09:19:40.127 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in [11171] milliseconds ... No errors related to MQTT appear in the logs.
Question:
Is there any specific configuration I need to add for FROST-Server to properly connect to the external Mosquitto MQTT broker and persist messages?
Are there additional troubleshooting steps or logs I should be looking at to ensure MQTT is functioning as expected on FROST-Server?
Is it necessary to configure SSL or specific authentication mechanisms to ensure the MQTT connection is successful?
I appreciate any guidance or suggestions to resolve this issue.
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions