• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

No logs in eclipse-mosquitto running under Docker

Q&A Forum › Category: Questions › No logs in eclipse-mosquitto running under Docker
0 Vote Up Vote Down
Steve asked 4 years ago

Down to the fact I had an IP clash (using fixed IP’s) I had a problem with Publish-Subscribe.
(P 231 MicroPython_Programming…)
Messages were only passing one way and only for a short period of time.
I am using eclipse-mosquitto in a Docker container on a RaspPi.
Before I spotted the clash on my router I tried to look at the log(s) in eclipse-mosquitto. (Through the quick link in Portainer)
“No logs available”
Sorted the IP issue. Publish-Subscribe worked. But still no logs.
Can you tell me how I turn logging on?
(If this is covered in one of the other ebooks I have purchased, please tell me where)
Thanks
Steve

Question Tags: ec;ipse-mosquitto
5 Answers
0 Vote Up Vote Down
Sara Santos Staff answered 4 years ago

Hi Steve.
We never used that exact same setup before. So, I’m not sure how Portainer works.
But what type of information are you looking for in the logs?
If you’re interested in monitoring a specific MQTT topic, you can subscribe to it, and then publish messages will be printed in the terminal window.
I’m sorry that I can’t help much.
Regards,
Sara

0 Vote Up Vote Down
Steve Mercer answered 4 years ago

It has been many years since I played with Mosquitto so some of this may be out of date. At any rate I don’t believe logging is turned on by default. You have to enable logging in the mosquito.conf file. You can also set where the log files are in this file. Also check the /var/log directory for anything named mosquitto.

0 Vote Up Vote Down
Steve answered 4 years ago

Sara/Steve…
Initially I was looking for info to tell me which IP was getting through and which was not. Thanks to discord.com I discovered that the log is to be found in: /IOTstack/volumes/mosquitto/log/mosquitto.log and from what I can make out it has been running all the time, I just did not know where to look.
There’s also a log_dest stdout “switch” (for want of a better expression) in mosquitto.conf although I haven’t fully got my head around exactly what that changes.
One important thing I did learn, which you may have come across already, is that Eclipse have made changes to the ‘listening’ set-up in the latest version of Mosquitto (2.07). I discovered this at https://youtu.be/KKw3tUrX3d8
Learning more all the time.
Thanks for your help
Steve

0 Vote Up Vote Down
Sara Santos Staff answered 4 years ago

Great!
Thanks for sharing this information.
Regards,
Sara

0 Vote Up Vote Down
Steve Mercer answered 4 years ago

You would need to understand a little bit of *nix to get an idea what that line means (log_dest stdout “switch”). “log_dest” is from mosquitto itself and an educated guess would say its “log destination”. ie. Where should the log go? stdout is *nix for “Standard Output” and is generally set to the terminal but can be changed to almost anywhere (/dev/null is popular if you don’t care) including a file. Unfortunately I have no idea what “switch” means.

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition April 16, 2025
  • [eBook Updated] Learn ESP32 with Arduino IDE eBook – Version 3.2 April 16, 2025

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2025 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.