Closed RudolphAschmoneit closed 3 years ago
hi In your config , publish mqtt message to tb port in 1884. and topic string"topicFilter": "/sensor/data/", in mosquitto config acl file add usr and same topic: right readwrite.
{ "type": "double", "key": "timestamp", "value": "${timestamp}" }, only field in mqtt.json can be translate into tb.
hi In your config , publish mqtt message to tb port in 1884. and topic string"topicFilter": "/sensor/data/", in mosquitto config acl file add usr and same topic: right readwrite.
Hey, thanks for your answer, but I do not really get what you mean by "In your config , publish mqtt message to tb port in 1884". The Port of the thingsboard mqtt is 1883, and this is also the port I used in tb_gateway.yaml, like the tb_gateway documentation says. The Port in mqtt.json is the port of the external broker I want the gateway to connect with (also according to thingsboard_gateway documentation) so this is 1884. Sorry If I'm be a bit slow on that, or getting something wrong.
What is mosquitto's log?
in mosqutto conf file you have to set log file then create log file in setting dir or you start 模式去天堂service in console you can see log
发自我的iPhone
在 2021年3月19日,11:39,espring @.***> 写道:
What is mosquitto's log?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.
Hi @RudolphAschmoneit ,
Thank you for your interest in ThingsBoard IoT gateway. This issue may be caused by routing requests, could you try to use your local IP in your network instead of 127.0.0.1?
Hey @zbeacon, @buckyy2018 and @espring Thanks for your answers and sorry for my late reply. I had to finish some other projects here at work. The hint from @zbeacon fixed the issue. Using the local IP of the server instead of 127.0.0.1. Thanks a lot for your help! Kind Regards
Describe the issue Hey, I have a thingsboard CE v3.2 (Ubuntu installation) and a mosquitto mqtt broker v2.0.7 (docker container, via docker-compose) running on the same ubuntu 20.04 server. Thingsboard using mqtt standard port 1883, mosquitto using port 1884. Now I try to get up and running a thingsboard-gateway, to subscribe to the broker and push the data to the thingsboard instance. I try to run the gateway as a docker container via
docker-compose up -d --build
. I tested my credentials separately before (username and password for the broker viamosquitto_sub -q 1 -h 127.0.0.1 -p 1884 -u _my_user_ -P _my_password_ -t sensor/data -d
and access token for thingsboard viamosquitto_pub -d -q 1 -h "127.0.0.1" -p "1883" -t "v1/devices/me/telemetry" -u "_my_access_token_" -m "{"pressure":42}"
) - everything works fine. If I now try to get the gateway up I get the ErrorERROR - [mqtt_connector.py] - mqtt_connector - 193 - [Errno 111] Connection refused
which means imho the gateway's connection request to the broker is rejecteded. I spent several hours checking my configuration, but I could not find the bug, maybe you could help me. I'm assuming that the name of the broker in the mqtt.json is not relevant for my issue? There are also no log files in my host volume (tb-gateway/logs/), so I attach the container logs. For testing purposes I only try to get some of the data send to the specific topic at the moment, but this should also not be the reason for the error (?) Thank you very much in Advance for any help!Configuration tb_gateway.yaml:
mqtt.json:
docker-compose.yml (my tb-gateway directory on the host are in the same directory as the docker-compose.yml):
Connector name (If you need help with some connector/converter): MQTT Connector
Log files from
docker-compose logs -t
:Versions: