Fiservedpi
Posts: 5
Joined: Tue Aug 14, 2018 2:45 am

MQTT "Not Authorized" Mosquitto_sub

Mon Sep 10, 2018 3:55 am

when trying to subscribe to a topic I'm getting

Code: Select all

permission denied: not authorized, 

has anyone gotten around this if so can you pls help me

Code: Select all

mosquitto version 1.4.10 (build date Fri, 22 Dec 2017 08:19:25 +0000) starting
 Using default config. 

DirkS
Posts: 9514
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: MQTT "Not Authorized" Mosquitto_sub

Mon Sep 10, 2018 6:15 am

Do you use a local broker? Is the broker installed on the same computer?
Please show full command *and* error message.

User avatar
DougieLawson
Posts: 34167
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website

Re: MQTT "Not Authorized" Mosquitto_sub

Mon Sep 10, 2018 6:32 am

Restart your broker with

Code: Select all

log all
log_dest file /var/log/mosquitto/mosquitto.log
in your config.

Run mosquitto_sub with
mosquitto_sub -d -v -t "#" -h 127.0.0.1
to enable debugging messages.
Note:The use of baseball bats for educational purposes is completely disallowed on this forum.

Any DMs sent on Twitter will be answered next month.

Fiservedpi
Posts: 5
Joined: Tue Aug 14, 2018 2:45 am

Re: MQTT "Not Authorized" Mosquitto_sub

Mon Sep 10, 2018 3:48 pm

Ok thanks for the response guys I'll post response when I get home from work

Return to “HATs and other add-ons”