Connection Refused: not authorised only at mosquitto_pub (mqtt in docker) [message #1839729] |
Fri, 26 March 2021 14:46 |
Sascha N Messages: 3 Registered: March 2021 |
Junior Member |
|
|
Im using my mqtt brocker for one year in an docker.
Recently I updated my whole rapsi and all dockers etc.
Up to that point everything worked
If I use mqtt.fx from my PC or my also in docker running Homeassistant to publish an message everthing works in both direction but if I want to publish a message via mosquitto_pub in the command line via ssh (or directly at the raspi) I get Connection Refused: not authorised.
The mqtt docker uses port 1883
Im using the correct username and password
I tried several addiotional parameters -h localhost -p 1883
BTW: The mqtt docker has another ip adress (172.18.0.2) then my rapsi itself (192.168.178.X). At the mqtt Docker a Gateway 172.18.0.1 is set. Does the -h parameter needs the docker ip or the main ip?
mosquitto_pub -p 1883 -h localhost -u myuser -P mypw -t /Test -m "TEST-MSG"
Connection Refused: not authorised.
Error: The connection was refused.
mqtt logfile: 1616766878: New connection from 172.18.0.1:33986 on port 1883.
1616766878: Client <unknown> disconnected, not authorised.
==> look like it comes from the Gateway IP
I assume its something related to my mosquitto.conf or something with the iptables
Thanks for your help.
mosquitto.conf:
persistence false
persistence_location /mosquitto/data/
log_dest file /mosquitto/log/mosquitto.log
password_file /mosquitto/config/pwfile
allow_anonymous false
log_timestamp true
log_type error
log_type warning
log_type notice
log_type information
listener 1883
[Updated on: Sat, 27 March 2021 10:47] Report message to a moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03390 seconds