Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Off Topic
    4. Mosquitto LXC Rechteproblem

    NEWS

    • Monatsrückblick - April 2025

    • Minor js-controller 7.0.7 Update in latest repo

    • Save The Date: ioBroker@Smart Living Forum Solingen, 14.06.

    Mosquitto LXC Rechteproblem

    This topic has been deleted. Only users with topic management privileges can see it.
    • Thomas Braun
      Thomas Braun Most Active @Marcel Drzal 0 last edited by

      @marcel-drzal-0

      Bitte KEINE Bildchen von TEXT.
      Setz den Text hier eingebettet in CodeTags rein.

      1 Reply Last reply Reply Quote 0
      • haus-automatisierung
        haus-automatisierung Developer Most Active @Marcel Drzal 0 last edited by haus-automatisierung

        @marcel-drzal-0 Wie hast Du mosquitto denn installiert? Über apt?

        Wie sieht deine Path-Variable aus? echo $PATH

        Normalerweise landet die Standard-Installation in /usr/sbin/. Also /usr/sbin/mosquitto.

        Und dann wird ja auch der Linux-Benutzer mosquitto angelegt, unter welchem der Prozess läuft. Also der Prozess selbst wird nicht als root laufen.

        Marcel Drzal 0 1 Reply Last reply Reply Quote 0
        • Marcel Drzal 0
          Marcel Drzal 0 last edited by

          3d3a7ff6-d8ea-4939-965a-42796fa56fb9-image.png

          haus-automatisierung 1 Reply Last reply Reply Quote 0
          • Marcel Drzal 0
            Marcel Drzal 0 @haus-automatisierung last edited by

            @haus-automatisierung

            ein 2. Problem was ich habe ist

            d8d5a6c7-95a2-498a-88a8-60334b7a28bf-image.png

            bin in deinem Video Kus Grundkonfiguration von Mosquitto (06:41

            1 Reply Last reply Reply Quote 0
            • haus-automatisierung
              haus-automatisierung Developer Most Active @Marcel Drzal 0 last edited by haus-automatisierung

              @marcel-drzal-0 Dann trag in deine ~/.bashrc doch einfach export 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?

              Marcel Drzal 0 1 Reply Last reply Reply Quote 1
              • Marcel Drzal 0
                Marcel Drzal 0 @haus-automatisierung last edited by Marcel Drzal 0

                @haus-automatisierung verstehe es nicht sorry hatte aber immer 1886

                haus-automatisierung 1 Reply Last reply Reply Quote 0
                • haus-automatisierung
                  haus-automatisierung Developer Most Active @Marcel Drzal 0 last edited by haus-automatisierung

                  @marcel-drzal-0

                  1. 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.
                  2. Zeig mal bitte die Config-Dateien von Mosquitto.
                  cat /etc/mosquitto/mosquitto.conf
                  cat /etc/mosquitto/conf.d/*.conf
                  
                  Marcel Drzal 0 1 Reply Last reply Reply Quote 0
                  • Marcel Drzal 0
                    Marcel Drzal 0 @haus-automatisierung last edited by Marcel Drzal 0

                    @haus-automatisierung

                    211dad00-28aa-4587-a172-929f02048091-image.png

                    haus-automatisierung Homoran 2 Replies Last reply Reply Quote 0
                    • haus-automatisierung
                      haus-automatisierung Developer Most Active @Marcel Drzal 0 last edited by haus-automatisierung

                      @marcel-drzal-0 allow schreibt man mit 2 l. 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 1 Reply Last reply Reply Quote 0
                      • Homoran
                        Homoran Global Moderator Administrators @Marcel Drzal 0 last edited by

                        @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

                        1 Reply Last reply Reply Quote 0
                        • Marcel Drzal 0
                          Marcel Drzal 0 @haus-automatisierung last edited by

                          @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:~$
                          
                          
                          haus-automatisierung 1 Reply Last reply Reply Quote 0
                          • haus-automatisierung
                            haus-automatisierung Developer Most Active @Marcel Drzal 0 last edited by

                            @marcel-drzal-0

                            sudo rm /etc/mosquitto/conf.d/access.conf
                            cat /etc/mosquitto/conf.d/custom.conf
                            
                            Marcel Drzal 0 1 Reply Last reply Reply Quote 0
                            • Marcel Drzal 0
                              Marcel Drzal 0 @haus-automatisierung last edited by Marcel Drzal 0

                              @haus-automatisierung

                              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 -h

                              smarthome@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:~$
                              
                              

                              538675de-0740-48b1-98f5-fe05034ce048-image.png

                              Thomas Braun 1 Reply Last reply Reply Quote 0
                              • Thomas Braun
                                Thomas Braun Most Active @Marcel Drzal 0 last edited by

                                @marcel-drzal-0

                                mosquitto liegt offenbar nicht im PATH des Users. Siehe oben, wie man den anpassen kann.

                                Marcel Drzal 0 1 Reply Last reply Reply Quote 0
                                • Marcel Drzal 0
                                  Marcel Drzal 0 @Thomas Braun last edited by Marcel Drzal 0

                                  @thomas-braun
                                  @haus-automatisierung

                                  e4457115-a4a1-4556-ab5e-85c198cc34cd-image.png

                                   influxdb.1 (639) Connecting http://172.16.0.217:8086/ ...
                                  2024-04-30 13:44:00.135  - info: influxdb.1 (639) Influx DB Version used: 2.x
                                  2024-04-30 13:44:00.136  - error: 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
                                  
                                  

                                  103b988c-e4c8-454a-b47b-8f439de54e8a-image.png nun muss ich sicher was angleichen da die Lampe nun nicht mehr schaltet?

                                  1 Reply Last reply Reply Quote 0
                                  • First post
                                    Last post

                                  Support us

                                  ioBroker
                                  Community Adapters
                                  Donate

                                  970
                                  Online

                                  31.6k
                                  Users

                                  79.4k
                                  Topics

                                  1.3m
                                  Posts

                                  4
                                  16
                                  436
                                  Loading More Posts
                                  • Oldest to Newest
                                  • Newest to Oldest
                                  • Most Votes
                                  Reply
                                  • Reply as topic
                                  Log in to reply
                                  Community
                                  Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen
                                  The ioBroker Community 2014-2023
                                  logo