User avatar
jadro
Posts: 404
Joined: Sun Oct 02, 2016 1:20 pm
Location: Croatia

Mqtt restarting user

Sat Jun 29, 2019 8:39 pm

Hi,
I have 3 users in my mosquitto password file and acl file with topics for users. When I add new topic to user, i have to restart whole raspberry because restarting mqtt server does not work. Can I restart just one user?
If I do stop and start mosquitto then my raspberry python mqtt client can not restart. I get exception but I think I will try to put try exception block into code and start instance connection again.
Thanx,
Jadro
Last edited by jadro on Sat Jun 29, 2019 8:43 pm, edited 2 times in total.
Oracle backend database developer
SmartHome IoT & Microprocessor enthusiast and hobbyist

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

Re: Mqtt restarting user

Sat Jun 29, 2019 8:42 pm

Can you post (in [code] tags) an example of what you've got (with redcated userids/passwords) so I can recreate it on my Mosquitto system?
Note: Having anything remotely humorous in your signature is completely banned on this forum. Wear a tinfoil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

User avatar
jadro
Posts: 404
Joined: Sun Oct 02, 2016 1:20 pm
Location: Croatia

Re: Mqtt restarting user

Sat Jun 29, 2019 8:45 pm

I will try as son as possible, I am on the weekend, when arrive to home I will try to put code and exception
Oracle backend database developer
SmartHome IoT & Microprocessor enthusiast and hobbyist

User avatar
jadro
Posts: 404
Joined: Sun Oct 02, 2016 1:20 pm
Location: Croatia

Re: Mqtt restarting user

Sun Jun 30, 2019 8:24 pm

Now I try with sudo /etc/init.d/mosquitto stop and sudo /etc/init.d/mosquitto start and now this works, my mqtt client script in python did not show exception. If my exception occure then I will do screenshot and put on this topic.
Oracle backend database developer
SmartHome IoT & Microprocessor enthusiast and hobbyist

Return to “General discussion”