NEWS
Mosquitto LXC Rechteproblem
-
ein 2. Problem was ich habe ist
bin in deinem Video Kus Grundkonfiguration von Mosquitto (06:41
-
@marcel-drzal-0 Dann trag in deine
~/.bashrc
doch einfachexport PATH=/usr/local/sbin:/usr/sbin/:$PATH
ein. Damit wäre Problem 1 gelöst.Wie sieht denn deine Config aus? Vertippt? Port 1883 schon in Benutzung?
-
@haus-automatisierung verstehe es nicht sorry hatte aber immer 1886
-
- Das mit sudo spielt ja erstmal keine Rolle. Schau in meine Linux-Grundlagen, wenn Du mehr zu PATH und bash wissen willst. Aber ist nicht so wichtig.
- Zeig mal bitte die Config-Dateien von Mosquitto.
cat /etc/mosquitto/mosquitto.conf cat /etc/mosquitto/conf.d/*.conf
-
-
@marcel-drzal-0
allow
schreibt man mit 2l
. Und irgendwie hast Du zwei Config-Dateien, in welchen fast das gleiche steht (nur 1x mit Tippfehler). Eine von beiden löschen und dann die andere ggf korrigieren.ls -la /etc/mosquitto/conf.d/
-
@marcel-drzal-0 Bitte keine Screenshots von Konsolentext!
als Text in code-tags posten!https://forum.iobroker.net/topic/51555/hinweise-für-gute-forenbeiträge/1
-
@haus-automatisierung sagte in Mosquitto LXC Rechteproblem:
ls -la /etc/mosquitto/conf.d/
smarthome@Mosquitto:~$ ls -la /etc/mosquitto/conf.d/ total 20 drwxr-xr-x 2 root root 4096 Apr 28 11:37 . drwxr-xr-x 5 root root 4096 Apr 28 12:10 .. -rw-r--r-- 1 root root 142 Jun 9 2021 README -rw-r--r-- 1 root root 72 Oct 2 2022 access.conf -rw-r--r-- 1 root root 85 Apr 28 11:37 custom.conf smarthome@Mosquitto:~$
-
sudo rm /etc/mosquitto/conf.d/access.conf cat /etc/mosquitto/conf.d/custom.conf
-
Es geht nun wieder.
Ich habe mit Proxmox zurück gesetzt.smarthome@Mosquitto:~$ echo $PATH /usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games smarthome@Mosquitto:~$
smarthome@Mosquitto:~$ cat /etc/mosquitto/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 listener 1886 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 smarthome@Mosquitto:~$ sudo service mosquitto status * mosquitto.service - Mosquitto MQTT Broker Loaded: loaded (/lib/systemd/system/mosquitto.service; enabled; vendor preset: enabled) Active: active (running) since Mon 2024-04-29 16:57:54 CEST; 8min ago Docs: man:mosquitto.conf(5) man:mosquitto(8) Process: 140 ExecStartPre=/bin/mkdir -m 740 -p /var/log/mosquitto (code=exited, status=0/SUCCESS) Process: 142 ExecStartPre=/bin/chown mosquitto /var/log/mosquitto (code=exited, status=0/SUCCESS) Process: 146 ExecStartPre=/bin/mkdir -m 740 -p /run/mosquitto (code=exited, status=0/SUCCESS) Process: 147 ExecStartPre=/bin/chown mosquitto /run/mosquitto (code=exited, status=0/SUCCESS) Main PID: 148 (mosquitto) Tasks: 1 (limit: 38084) Memory: 2.6M CPU: 128ms CGroup: /system.slice/mosquitto.service `-148 /usr/sbin/mosquitto -c /etc/mosquitto/mosquitto.conf Apr 29 16:57:54 Mosquitto systemd[1]: Starting Mosquitto MQTT Broker... Apr 29 16:57:54 Mosquitto mosquitto[148]: 1714402674: Loading config file /etc/mosquitto/conf.d/access.conf Apr 29 16:57:54 Mosquitto systemd[1]: Started Mosquitto MQTT Broker. smarthome@Mosquitto:~$
Nun ist nur noch das Problem mit dem Befehl
mosquitto -hsmarthome@Mosquitto:~$ mosquitto -h -bash: mosquitto: command not found smarthome@Mosquitto:~$ sudo mosquitto -h mosquitto version 2.0.11 mosquitto is an MQTT v5.0/v3.1.1/v3.1 broker. Usage: mosquitto [-c config_file] [-d] [-h] [-p port] -c : specify the broker config file. -d : put the broker into the background after starting. -h : display this help. -p : start the broker listening on the specified port. Not recommended in conjunction with the -c option. -v : verbose mode - enable all logging types. This overrides any logging options given in the config file. See https://mosquitto.org/ for more information. smarthome@Mosquitto:~$
-
mosquitto liegt offenbar nicht im PATH des Users. Siehe oben, wie man den anpassen kann.
-
@thomas-braun
@haus-automatisierunginfluxdb.1 (639) Connecting http://172.16.0.217:8086/ ... 2024-04-30 13:44:00.135 - [32minfo[39m: influxdb.1 (639) Influx DB Version used: 2.x 2024-04-30 13:44:00.136 - [31merror[39m: influxdb.1 (639) HttpError: unauthorized access
bin nun wieder an der selben stelle hängen geblieben:
smarthome@Mosquitto:~$ sudo service mosquitto status * mosquitto.service - Mosquitto MQTT Broker Loaded: loaded (/lib/systemd/system/mosquitto.service; enabled; vendor pre> Active: failed (Result: exit-code) since Tue 2024-04-30 13:22:26 CEST; 47s> Docs: man:mosquitto.conf(5) man:mosquitto(8) Process: 813 ExecStartPre=/bin/mkdir -m 740 -p /var/log/mosquitto (code=exi> Process: 814 ExecStartPre=/bin/chown mosquitto /var/log/mosquitto (code=exi> Process: 815 ExecStartPre=/bin/mkdir -m 740 -p /run/mosquitto (code=exited,> Process: 816 ExecStartPre=/bin/chown mosquitto /run/mosquitto (code=exited,> Process: 817 ExecStart=/usr/sbin/mosquitto -c /etc/mosquitto/mosquitto.conf> Main PID: 817 (code=exited, status=1/FAILURE) CPU: 6ms Apr 30 13:22:26 Mosquitto systemd[1]: mosquitto.service: Main process exited, c> Apr 30 13:22:26 Mosquitto systemd[1]: mosquitto.service: Failed with result 'ex> Apr 30 13:22:26 Mosquitto systemd[1]: Failed to start Mosquitto MQTT Broker. Apr 30 13:22:26 Mosquitto systemd[1]: mosquitto.service: Scheduled restart job,> Apr 30 13:22:26 Mosquitto systemd[1]: Stopped Mosquitto MQTT Broker. Apr 30 13:22:26 Mosquitto systemd[1]: mosquitto.service: Start request repeated> Apr 30 13:22:26 Mosquitto systemd[1]: mosquitto.service: Failed with result 'ex> Apr 30 13:22:26 Mosquitto systemd[1]: Failed to start Mosquitto MQTT Broker.
smarthome@Mosquitto:/$ export PATH=/usr/local/sbin:/usr/sbin/:$PATH smarthome@Mosquitto:/$ echo $PATH /usr/local/sbin:/usr/sbin/:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/ga mes
nun muss ich sicher was angleichen da die Lampe nun nicht mehr schaltet?