Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Error/Bug
    4. Autostart Problem

    NEWS

    • [erledigt] 15. 05. Wartungsarbeiten am ioBroker Forum

    • ioBroker goes Matter ... Matter Adapter in Stable

    • Monatsrückblick - April 2025

    Autostart Problem

    This topic has been deleted. Only users with topic management privileges can see it.
    • paul53
      paul53 last edited by

      @meicker:

      Wie kann ich ein kompaktes Image bekommen ? `
      Das Image "zippen".

      1 Reply Last reply Reply Quote 0
      • M
        meicker last edited by

        Das ist alles ? Ich dachte es gäbe ein Programm was das so erstellt. Also wenn ich eine 16GB Speicherkarte habe und dann mit dd das Image ziehe und es danach 7z zippe es das das gleiche was auch im Downloadbereich von iobroker liegt ? Teste ich gleich mal - aber zippen war mir zu einfach :lol:

        1 Reply Last reply Reply Quote 0
        • M
          moonsorrox last edited by

          ich muss mich hier nochmal einklinken…!

          Ich betreibe den ioBroker in einer VM/Virtualbox und ich muss ebenfalls den ioBroker immer von Hand starten.

          Heißt also wenn ich die VM starte muss ich jedesmal über ssh den ioBroker zusätzlich starten.

          Habe das iobroker.sh Script eingebaut aber es funktioniert nicht...

          das Script sieht so aus:

          #!/bin/bash
          ### BEGIN INIT INFO
          # Provides:          iobroker.sh
          # Required-Start:    $network $local_fs $remote_fs
          # Required-Stop::    $network $local_fs $remote_fs
          # Default-Start:     2 3 4 5
          # Default-Stop:      0 1 6
          # Short-Description: starts ioBroker
          # Description:       starts ioBroker
          ### END INIT INFO
          (( EUID )) && echo .You need to have root privileges.. && exit 1
          PIDF=/opt/iobroker/node_modules/iobroker.js-controller/lib/iobroker.pid
          NODECMD=/usr/bin/node
          IOBROKERCMD=/opt/iobroker/node_modules/iobroker.js-controller/iobroker.js
          RETVAL=0
          IOBROKERUSER=root
          
          start() {
                      export IOBROKER_HOME=/opt/iobroker
                      echo -n "Starting ioBroker"
                      sudo -u ${IOBROKERUSER} $NODECMD $IOBROKERCMD start
                      RETVAL=$?
          }
          
          stop() {
                      echo -n "Stopping ioBroker"
                      sudo -u ${IOBROKERUSER} $NODECMD $IOBROKERCMD stop
                      RETVAL=$?
          }
          case "$1" in
              start)
                start
            ;;
              stop)
                stop
            ;;
              restart)
                stop
                start
            ;;
              *)
                echo "Usage: iobroker {start|stop|restart}"
                exit 1
            ;;
          esac
          exit $RETVAL
          
          

          die Ausgabe von systemctl status -l iobroker.service

          root@ioBrokerVM:~# systemctl status -l iobroker.service
          ● iobroker.service - LSB: starts ioBroker
             Loaded: loaded (/etc/init.d/iobroker.sh; generated; vendor preset: enabled)
             Active: inactive (dead)
               Docs: man:systemd-sysv-generator(8)
          root@ioBrokerVM:~#
          
          

          ich melde mich hier per root an, dann gibt es noch einen weiteren user, aber fhem nutze ich in dieser VM nicht. Hier läuft nur der ioBroker auf einem Debian der neusten Generation

          was kann ich jetzt noch machen..?

          1 Reply Last reply Reply Quote 0
          • foxriver76
            foxriver76 Developer last edited by

            @moonsorrox:

            ich melde mich hier per root an, dann gibt es noch einen weiteren user, aber fhem nutze ich in dieser VM nicht. Hier läuft nur der ioBroker auf einem Debian der neusten Generation

            was kann ich jetzt noch machen..? `

            Stimmt der Pfad für NODECMD? Prüfen mittels````
            which node

            1 Reply Last reply Reply Quote 0
            • M
              moonsorrox last edited by

              ja habe ich schon überprüft..

              ist folgender

              /usr/bin/node
              
              
              1 Reply Last reply Reply Quote 0
              • paul53
                paul53 last edited by

                Was ergibt ?

                ls -l /etc/rc?.d/*iob*
                
                1 Reply Last reply Reply Quote 0
                • M
                  moonsorrox last edited by

                  das kommt dabei raus:

                  root@ioBrokerVM:~# ls -l /etc/rc?.d/*iob*
                  lrwxrwxrwx 1 root root 21 Okt 30 14:22 /etc/rc0.d/K01iobroker.sh -> ../init.d/iobroker.sh
                  lrwxrwxrwx 1 root root 21 Okt 30 14:22 /etc/rc1.d/K01iobroker.sh -> ../init.d/iobroker.sh
                  lrwxrwxrwx 1 root root 21 Okt 30 14:22 /etc/rc6.d/K01iobroker.sh -> ../init.d/iobroker.sh
                  
                  
                  1 Reply Last reply Reply Quote 0
                  • M
                    moonsorrox last edited by

                    noch irgend eine Idee..?

                    1 Reply Last reply Reply Quote 0
                    • paul53
                      paul53 last edited by

                      Bei mir sieht es so aus:

                      lrwxrwxrwx 1 root root 21 Apr  7  2016 /etc/rc0.d/K01iobroker.sh -> ../init.d/iobroker.sh
                      lrwxrwxrwx 1 root root 21 Apr  7  2016 /etc/rc1.d/K01iobroker.sh -> ../init.d/iobroker.sh
                      lrwxrwxrwx 1 root root 21 Apr  7  2016 /etc/rc2.d/S01iobroker.sh -> ../init.d/iobroker.sh
                      lrwxrwxrwx 1 root root 21 Apr  7  2016 /etc/rc3.d/S01iobroker.sh -> ../init.d/iobroker.sh
                      lrwxrwxrwx 1 root root 21 Apr  7  2016 /etc/rc4.d/S01iobroker.sh -> ../init.d/iobroker.sh
                      lrwxrwxrwx 1 root root 21 Apr  7  2016 /etc/rc5.d/S01iobroker.sh -> ../init.d/iobroker.sh
                      lrwxrwxrwx 1 root root 21 Apr  7  2016 /etc/rc6.d/K01iobroker.sh -> ../init.d/iobroker.sh
                      
                      

                      Versuche bitte (als User root)

                      update-rc.d iobroker.sh defaults
                      ls -l /etc/rc?.d/*iob*
                      
                      
                      1 Reply Last reply Reply Quote 0
                      • M
                        moonsorrox last edited by

                        sieht noch genau so aus:

                        root@ioBrokerVM:~# update-rc.d iobroker.sh defaults
                        root@ioBrokerVM:~# ls -l /etc/rc?.d/*iob*
                        lrwxrwxrwx 1 root root 21 Okt 30 14:22 /etc/rc0.d/K01iobroker.sh -> ../init.d/iobroker.sh
                        lrwxrwxrwx 1 root root 21 Okt 30 14:22 /etc/rc1.d/K01iobroker.sh -> ../init.d/iobroker.sh
                        lrwxrwxrwx 1 root root 21 Okt 30 14:22 /etc/rc6.d/K01iobroker.sh -> ../init.d/iobroker.sh
                        
                        
                        1 Reply Last reply Reply Quote 0
                        • paul53
                          paul53 last edited by

                          Gemäß Skript iobroker.sh

                          # Default-Start:     2 3 4 5
                          # Default-Stop:      0 1 6
                          
                          

                          fehlen die Start-Einträge. Leider verstehe ich zu wenig von Linux, um hier weiter helfen zu können 😞

                          Das Skript funktioniert aber, d.h. ioBroker läßt sich damit stoppen und starten ?

                          /etc/init.d/iobroker.sh stop
                          /etc/init.d/iobroker.sh start
                          
                          1 Reply Last reply Reply Quote 0
                          • M
                            moonsorrox last edited by

                            ja von hand mit den Scripten kann ich den ioBroker starten und stoppen

                            1 Reply Last reply Reply Quote 0
                            • Chaot
                              Chaot last edited by

                              Sorry falls ich mich hier einmische. Aber bei mir starte der ioBroker in der VM ebenfalls nicht.

                              Kann jemand was mit der Fehlermeldung anfangen:

                              root@haus:/home/haus# update-rc.d iobroker.sh defaults
                              root@haus:/home/haus# ls -l /etc/rc?.d/*iob*
                              lrwxrwxrwx 1 root root 21 Jul 21 17:34 /etc/rc0.d/K01iobroker.sh -> ../init.d/iobroker.sh
                              lrwxrwxrwx 1 root root 21 Jul 21 17:34 /etc/rc1.d/K01iobroker.sh -> ../init.d/iobroker.sh
                              lrwxrwxrwx 1 root root 21 Jul 21 17:34 /etc/rc2.d/S01iobroker.sh -> ../init.d/iobroker.sh
                              lrwxrwxrwx 1 root root 21 Jul 21 17:34 /etc/rc3.d/S01iobroker.sh -> ../init.d/iobroker.sh
                              lrwxrwxrwx 1 root root 21 Jul 21 17:34 /etc/rc4.d/S01iobroker.sh -> ../init.d/iobroker.sh
                              lrwxrwxrwx 1 root root 21 Jul 21 17:34 /etc/rc5.d/S01iobroker.sh -> ../init.d/iobroker.sh
                              lrwxrwxrwx 1 root root 21 Jul 21 17:34 /etc/rc6.d/K01iobroker.sh -> ../init.d/iobroker.sh
                              root@haus:/home/haus# /etc/init.d/iobroker.sh stop
                              Stopping ioBrokersudo: unknown user: @@user
                              sudo: unable to initialize policy plugin
                              root@haus:/home/haus# /etc/init.d/iobroker.sh start
                              Starting ioBrokersudo: unknown user: @@user
                              sudo: unable to initialize policy plugin
                              root@haus:/home/haus# iobroker start
                              Starting iobroker controller daemon...
                              iobroker controller daemon started. PID: 1763
                              
                              

                              "unable to initialize policy plugin"

                              1 Reply Last reply Reply Quote 0
                              • M
                                moonsorrox last edited by

                                so wie es bei mir aussieht fehlen die symlinks in den Ordnern siehe Code das sind alles die mit dem "S01"

                                warum..?? kennt sich damit jemand aus und wie kann ich die dort hinbekommen. Sind das auch symlinks..?

                                /etc/rc2.d/S01iobroker.sh -> ../init.d/iobroker.sh
                                /etc/rc3.d/S01iobroker.sh -> ../init.d/iobroker.sh
                                /etc/rc4.d/S01iobroker.sh -> ../init.d/iobroker.sh
                                /etc/rc5.d/S01iobroker.sh -> ../init.d/iobroker.sh
                                
                                1 Reply Last reply Reply Quote 0
                                • paul53
                                  paul53 last edited by

                                  @Chaot:

                                  Stopping ioBrokersudo: unknown user: @@user
                                  ```` `  
                                  

                                  Anscheinend wurde das Skript /etc/init.d/iobroker.sh bei der Installation nicht richtig initialisiert.

                                  1 Reply Last reply Reply Quote 0
                                  • Chaot
                                    Chaot last edited by

                                    Ok, und wie könnte ich das beheben?

                                    1 Reply Last reply Reply Quote 0
                                    • paul53
                                      paul53 last edited by

                                      @Chaot:

                                      wie könnte ich das beheben? `
                                      Zeige bitte den Inhalt des Skripts und prüfe den Pfad von Node.

                                      which node
                                      
                                      1 Reply Last reply Reply Quote 0
                                      • Chaot
                                        Chaot last edited by

                                        Ergibt

                                        /usr/bin/node
                                        
                                        

                                        Script:````
                                        #!/bin/bash

                                        BEGIN INIT INFO

                                        Provides: iobroker.sh

                                        Required-Start: $network $local_fs $remote_fs

                                        Required-Stop:: $network $local_fs $remote_fs

                                        Default-Start: 2 3 4 5

                                        Default-Stop: 0 1 6

                                        Short-Description: starts ioBroker

                                        Description: starts ioBroker

                                        END INIT INFO

                                        (( EUID )) && echo .You need to have root privileges.. && exit 1
                                        PIDF=/opt/iobroker/node_modules/iobroker.js-controller/lib/iobroker.pid
                                        NODECMD=@@node
                                        IOBROKERCMD=/opt/iobroker/node_modules/iobroker.js-controller/iobroker.js
                                        RETVAL=0
                                        IOBROKERUSER=@@user

                                        start() {
                                        export IOBROKER_HOME=/opt/iobroker

                                        1 Reply Last reply Reply Quote 0
                                        • Chaot
                                          Chaot last edited by

                                          :idea:

                                          Ah, selbst gesehen:

                                          NODECMD=@@node
                                          ````muss lauten````
                                          NODECMD=/usr/bin/node
                                          

                                          und

                                          IOBROKERUSER=@@user
                                          ````muss lauten````
                                          IOBROKERUSER=root
                                          

                                          Danke @paul53 , ich habe die ganze Zeit nach einer Erklärung für "unable to initialize policy plugin" gesucht und das wesentliche mal wieder nicht gelesen.

                                          1 Reply Last reply Reply Quote 0
                                          • N
                                            Nepomukl last edited by

                                            Guten Morgen,

                                            ich muss mal kurz hier nachfragen.

                                            Bei mir ist

                                            NODECMD=/usr/local/bin/node
                                            
                                            

                                            kann es damit Probleme geben?

                                            Denn ab und zu muss ich auch per Hand starten. Obwohl der Eintrag so im Startscript auch drin steht.

                                            Ich weiß auch nicht wie Node in diesem Ordner gelandet ist. Da muss ich wohl irgendetwas verpeilt haben.

                                            Gruß Andreas

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

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            278
                                            Online

                                            31.6k
                                            Users

                                            79.5k
                                            Topics

                                            1.3m
                                            Posts

                                            14
                                            47
                                            17420
                                            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