mosquitto.service not started

Good afternoon. I can’t start the process! See attachment…

Hi Antonio,

Could you please try running manually so we could get an error message? The command to try is:

sudo /usr/sbin/mosquitto -c /etc/mosquitto/mosquitto.conf

Regards,

Roger

Hi, everything is very difficult …

OS : Raspberry Pi os

maybe a problem with access rights?

main.config :

pid_file /var/run/mosquitto.pid

# Persistence

#persistence true

#persistence_file mosquitto.db

#Logging

log_dest syslog

log_dest file /etc/mosquitto/log/mosquitto.log

log_type debug

log_type error

log_type warning

log_type notice

log_type information

password_file /etc/mosquitto/users.list

acl_file /etc/mosquitto/mosquitto.acl


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 /var/run/mosquitto.pid

persistence true
persistence_location /var/lib/mosquitto/

log_dest file /var/log/mosquitto/mosquitto.log

include_dir /etc/mosquitto/conf.d/main.conf


PS: problems start after you create and save your config file…

It looks like this line is the problem - the include_dir option should point to a directory, not a file. If you change it to include_dir /etc/mosquitto/conf.d then I think it should work ok.

Regards,

Roger

1 Like