Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
I followed this all along, mainly trying to get mosquitto to work over SSL. But when I try to publish on port 8883, I get an error saying :
"Connection Refused: not authorised.
Error: The connection was refused."
When I run mosquitto client in blocking mode by manually providing the conf file, here’s what I get:
$ mosquitto -c /etc/mosquitto/conf.d/default.conf
1568594709: mosquitto version 1.4.15 (build date Tue, 18 Jun 2019 11:42:22 -0300) starting
1568594709: Config loaded from /etc/mosquitto/conf.d/default.conf.
1568594709: Opening ipv4 listen socket on port 1883.
1568594709: Opening ipv4 listen socket on port 8883.
1568594709: Opening ipv6 listen socket on port 8883.
1568594709: Error: Unable to load CA certificates. Check cafile "/etc/letsencrypt/live/my-domain.xyz/chain.pem".
Is this tutorial old, has this been verified on Ubuntu 18.04? Could this be a permission related issue?
I have nginx installed, could that be a problem?
Hey, Thank you for your great article ! Just one question, I need to use MQTT with an ESP32 board coded in MicroPython and I think it’s impossible to use MQTT over SSL on it. So, I just want to have both SSL (port 8883) and not SSL (port 1883) available on the broker. Do you have a solution ?
Hi! Great tutorial. I followed this one but in Ubuntu v20. When I get to securing Configuring MQTT SSL part though, I got this error when running this code sudo systemctl restart mosquitto:
Job for mosquitto.service failed because the control process exited with error code.
See "systemctl status mosquitto.service" and "journalctl -xe" for details.
What should I do?
UPDATE:
As it turns out, my path to the letsencrypt pem files are incorrect. The error was gone after I corrected my paths. I hope this could help someone in the future. Thanks for this tutorial!
Would you please help write a tutorial for MQTT and Ubuntu 22.04 ? It seems to need some extra steps there. Thank you!
Why have you suggested to secure mosquitto with its own ssl management? Would it not be possible to put a Digital Ocean Load balancer in front of it and put a forwarding rule with SSL offloading there? I would be very interested if you venture in such a version of this article?
Mosquitto won’t start. My mosquitto.conf
# Place your local configuration in /etc/mosquitto/conf.d/
#
# A full description of the configuration file is at
# /usr/share/doc/mosquitto/examples/mosquitto.conf.example
#pid_file /run/mosquitto/mosquitto.pid
per_listener_settings true
pid_file /run/mosquitto/mosquitto.pid
persistence true
persistence_location /var/lib/mosquitto/
log_dest file /var/log/mosquitto/mosquitto.log
include_dir /etc/mosquitto/conf.d
allow_anonymous false
listener 1883
password_file /etc/mosquitto/passwd
log file:
1704459684: mosquitto version 2.0.18 starting
1704459684: Config loaded from /etc/mosquitto/mosquitto.conf.
1704459684: Starting in local only mode. Connections will only be possible from clients running on this machine.
1704459684: Create a configuration file which defines a listener to allow remote access.
1704459684: For more details see https://mosquitto.org/documentation/authentication-methods/
1704459684: Opening ipv4 listen socket on port 1883.
1704459684: Opening ipv6 listen socket on port 1883.
1704459684: mosquitto version 2.0.18 running
1704460402: mosquitto version 2.0.18 terminating
1704460402: Saving in-memory database to /var/lib/mosquitto//mosquitto.db.
1704460402: mosquitto version 2.0.18 starting
1704460402: Config loaded from /etc/mosquitto/mosquitto.conf.
1704460402: Error: Unable to open pwfile "/etc/mosquitto/passwd".
1704460402: Error opening password file "/etc/mosquitto/passwd".
File /etc/mosquitto/passwd exist. Please give me some advice, what can I do?