Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. ioBroker Allgemein
    4. Kein autostart debian stretch

    NEWS

    • Neuer Blog: Fotos und Eindrücke aus Solingen

    • ioBroker@Smart Living Forum Solingen, 14.06. - Agenda added

    • ioBroker goes Matter ... Matter Adapter in Stable

    Kein autostart debian stretch

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

      /etc/init.d/iobroker.sh:

      #!/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

      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

      Also habe es getestet mit den Pfad zu Node Anpassung des User aber kommt immer der gleiche fehler

      1 Reply Last reply Reply Quote 0
      • Homoran
        Homoran Global Moderator Administrators last edited by

        @chrram:

        Also habe es getestet mit den Pfad zu Node Anpassung des User aber kommt immer der gleiche fehler `
        Welcher User? - bei mir steht root

        MIt dieser klappt es bei mir

        Ich musste sie auf .txt umbenennen! Bitte wieder eine .sh daraus machen
        144_iobroker.txt

        1 Reply Last reply Reply Quote 0
        • G
          GASMAST3R last edited by

          Schaue noch mal ind den anderen tread wo ich auch geschrkeben habe dort sich lösungen day problem zu beheben, ddr grund ist aber noch nicht bekannt.

          1 Reply Last reply Reply Quote 0
          • Homoran
            Homoran Global Moderator Administrators last edited by

            Kenne den Thread (und weitere 😉 ), deswegen auch jetzt die Bitte diese Datei zu testen.

            Deine eigene vorher umbenennen und nicht überschreiben.-

            1 Reply Last reply Reply Quote 0
            • C
              chrram last edited by

              Teste die Datei morgen früh

              IOBROKERUSER=@@user Habe einmal mit root und einmal mit meinem benutzernamen

              1 Reply Last reply Reply Quote 0
              • C
                chrram last edited by

                also habe die iobroker.sh geändert beim start kommt der selbe wie voher

                /etc/init.d$ sudo sh iobroker.sh
                iobroker.sh: 11: iobroker.sh: EUID: not found
                : not found: 17: iobroker.sh:
                sudo: Unbekannter Benutzer: root
                sudo: Regelwerks-Plugin konnte nicht initialisiert werden
                : not found: 23: iobroker.sh: }
                : not found: 24: iobroker.sh:
                sudo: Unbekannter Benutzer: root
                sudo: Regelwerks-Plugin konnte nicht initialisiert werden
                : not found: 29: iobroker.sh: }
                iobroker.sh: 30: iobroker.sh: Syntax error: word unexpected (expecting "in")
                
                

                Neustart immernoch kein autostart

                was ich komisch finde es bei manchen funktioniert es und bei einigen nicht. habe das gefühl die frage häuft sicht. der tvheadend Server startet bei mir auch voll automatisch

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

                  Test bitte erst einmal die Dateigröße und die Zugriffsrechte.

                  cd /etc/init.d
                  ls -l iobroker.sh
                  

                  Wenn die Länge (1098) stimmt und die x (ausführbar) in den Zugriffsrechten enthalten sind, dann teste das Skript

                  sudo iobroker stop
                  sudo ./iobroker.sh start
                  

                  Wenn dabei iobroker startet, versuche noch

                  sudo update-rc.d iobroker.sh defaults
                  sudo reboot
                  
                  1 Reply Last reply Reply Quote 0
                  • C
                    chrram last edited by

                    /etc/init.d$ ls -l iobroker.sh
                    -rwxrwxrwx 1 root root 1145 Jan  2 09:13 iobroker.sh
                    christopher@HomeServer:/etc/init.d$
                    christopher@HomeServer:/etc/init.d$ sudo ./iobroker.sh start
                    sudo: unable to execute ./iobroker.sh: No such file or directory
                    Aufgelegt
                    christopher@HomeServer:/etc/init.d$
                    christopher@HomeServer:/etc/init.d$ ls
                    acpid         checkroot-bootclean.sh  fail2ban     irqbalance      lvm2-lvmpolld          mountdevsubfs.sh       open-vm-tools  rcS             sendsigs   umountfs
                    apparmor      checkroot.sh            grub-common  iscsid          lxcfs                  mountkernfs.sh         plymouth       README          single     umountnfs.sh
                    apport        console-setup           halt         keyboard-setup  lxd                    mountnfs-bootclean.sh  plymouth-log   reboot          skeleton   umountroot
                    atd           cron                    hostname.sh  killprocs       mdadm                  mountnfs.sh            postfix        resolvconf      ssh        unattended-upgrades
                    avahi-daemon  cryptdisks              hwclock.sh   kmod            mdadm-waitidle         networking             procps         rsync           tvheadend  urandom
                    bootmisc.sh   cryptdisks-early        iobroker     lvm2            mountall-bootclean.sh  ondemand               rc             rsyslog         udev       uuidd
                    checkfs.sh    dbus                    iobroker.sh  lvm2-lvmetad    mountall.sh            open-iscsi             rc.local       screen-cleanup  ufw
                    christopher@HomeServer:/etc/init.d$ sudo sh iobroker.sh start
                    iobroker.sh: 11: iobroker.sh: EUID: not found
                    : not found: 17: iobroker.sh:
                    sudo: Unbekannter Benutzer: root
                    sudo: Regelwerks-Plugin konnte nicht initialisiert werden
                    : not found: 23: iobroker.sh: }
                    : not found: 24: iobroker.sh:
                    sudo: Unbekannter Benutzer: root
                    sudo: Regelwerks-Plugin konnte nicht initialisiert werden
                    : not found: 29: iobroker.sh: }
                    iobroker.sh: 30: iobroker.sh: Syntax error: word unexpected (expecting "in")
                    
                    
                    1 Reply Last reply Reply Quote 0
                    • paul53
                      paul53 last edited by

                      @paul53:

                      Wenn die Länge (1098) stimmt `
                      @chrram:

                      -rwxrwxrwx 1 root root 1145 Jan  2 09:13 iobroker.sh
                      ```` `  
                      

                      Die Datei ist ausführbar, aber die Länge stimmt nicht (ist DOS-Format). Also erst einmal in Linux-Format umwandeln

                      sudo mv iobroker.sh iobroker.dos
                      sudo tr -d '\r' < iobroker.dos > iobroker.sh
                      ls -l iob*
                      

                      bevor dann die weiteren Schritte erfolgen können.

                      1 Reply Last reply Reply Quote 0
                      • C
                        chrram last edited by

                        sudo mv iobroker.sh iobroker.dos
                        [sudo] Passwort für christopher:
                        christopher@HomeServer:/etc/init.d$ sudo tr -d '\r' < iobroker.dos > iobroker.sh
                        -bash: iobroker.sh: Keine Berechtigung
                        christopher@HomeServer:/etc/init.d$ su root
                        Passwort:
                        root@HomeServer:/etc/init.d# sudo tr -d '\r' < iobroker.dos > iobroker.sh
                        root@HomeServer:/etc/init.d# ls -l iob*
                        -rwxr-xr-x 1 root root  870 Jan  1 19:41 iobroker
                        -rwxrwxrwx 1 root root 1145 Jan  2 09:13 iobroker.dos
                        -rw-r--r-- 1 root root 1099 Jan  2 12:01 iobroker.sh
                        root@HomeServer:/etc/init.d#
                        root@HomeServer:/etc/init.d# sh iobroker.sh
                        iobroker.sh: 11: iobroker.sh: EUID: not found
                        Usage: iobroker {start|stop|restart}
                        root@HomeServer:/etc/init.d# nano iobroker.sh
                        root@HomeServer:/etc/init.d# chmod 777 iobroker.sh
                        root@HomeServer:/etc/init.d# ls -l iob*
                        -rwxr-xr-x 1 root root  870 Jan  1 19:41 iobroker
                        -rwxrwxrwx 1 root root 1145 Jan  2 09:13 iobroker.dos
                        -rwxrwxrwx 1 root root 1099 Jan  2 12:01 iobroker.sh
                        root@HomeServer:/etc/init.d# sh iobroker.sh
                        iobroker.sh: 11: iobroker.sh: EUID: not found
                        Usage: iobroker {start|stop|restart}
                        
                        
                        1 Reply Last reply Reply Quote 0
                        • ruhr70
                          ruhr70 last edited by

                          Ich schließe mich hier mal an.

                          Rückmeldung: Neuinstallation 2018 ioBroker unter Ubuntu 16.04.

                          js-controller: 1.2.3 wurde installiert

                          node.js: 8.9.3

                          npm: 4.6.1

                          Kein Autostart.

                          Rückmeldung erfolgt in dieser Phase, da eine Standardinstallation nicht mit Autostart funktioniert.

                          Als nächstes schaue ich mir an, was als Workaround möglich ist (die Datei iobroker.sh habe ich mir noch nicht angesehen, kommt als nächstes).

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

                            @chrram:

                            -rwxrwxrwx 1 root root 1099 Jan 2 12:01 iobroker.sh

                            root@HomeServer:/etc/init.d# sh iobroker.sh

                            iobroker.sh: 11: iobroker.sh: EUID: not found

                            Usage: iobroker {start|stop|restart} `
                            Mich wundert, dass die Dateilänge 1099 anstelle 1098 Byte ist, aber es funktioniert vielleicht trotzdem, allerdings so (im Verzeichnis /etc/init.d und als user root):

                            iobroker stop
                            ./iobroker.sh start
                            

                            Wenn iobroker dann startet, weiter mit

                            update-rc.d iobroker.sh defaults
                            reboot
                            

                            Was macht die Datei iobroker (Länge 870 Byte) in diesem Verzeichnis ? Die gehört da eigentlich nicht hin.

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

                              @Homoran:

                              @chrram:

                              Also habe es getestet mit den Pfad zu Node Anpassung des User aber kommt immer der gleiche fehler `
                              Welcher User? - bei mir steht root

                              MIt dieser klappt es bei mir

                              Ich musste sie auf .txt umbenennen! Bitte wieder eine .sh daraus machen `

                              Danke! Bei mir hat es mit dieser Datei funktioniert. Hatte die gleichen Probleme mit dem Autostart.

                              1 Reply Last reply Reply Quote 0
                              • C
                                chrram last edited by

                                cd /etc/init.d

                                root@HomeServer:/etc/init.d# iobroker stop

                                module.js:327

                                throw err;

                                ^

                                Error: Cannot find module '/etc/init.d/node_modules/iobroker.js-controller/iobroker.js'

                                at Function.Module._resolveFilename (module.js:325:15)

                                at Function.Module._load (module.js:276:25)

                                at Function.Module.runMain (module.js:441:10)

                                at startup (node.js:140:18)

                                at node.js:1043:3

                                root@HomeServer:/etc/init.d# ./iobroker.sh start

                                Starting ioBrokerStarting iobroker controller daemon…

                                iobroker controller daemon started. PID: 1722

                                root@HomeServer:/etc/init.d#

                                root@HomeServer:/etc/init.d# update-rc.d iobroker.sh defaults

                                insserv: script iobroker.dos: service iobroker.sh already provided!

                                root@HomeServer:/etc/init.d#reboot

                                das steht im journal

                                systemd[1]: Starting ioBroker server task…

                                Jan 02 14:35:07 HomeServer iobroker.sh[957]: Usage: iobroker {start|stop|restart}

                                aber komme nicht aufs webif nur wenn ich das script manuel starte

                                /opt/iobroker$ iobroker list instances

                                system.adapter.admin.0 : admin - enabled, port: 8081, bind: 0.0.0.0, run as: admin

                                system.adapter.discovery.0 : discovery - enabled

                                1 Reply Last reply Reply Quote 0
                                • Homoran
                                  Homoran Global Moderator Administrators last edited by

                                  @chrram:

                                  der tvheadend Server startet bei mir auch voll automatisch `
                                  Was ist das?

                                  1 Reply Last reply Reply Quote 0
                                  • C
                                    chrram last edited by

                                    @Homoran:

                                    @chrram:

                                    der tvheadend Server startet bei mir auch voll automatisch Was ist das?
                                    Ein sat Server wollte nur damit sagen das andere Autostart Funktionen gehen

                                    Gesendet von iPhone mit Tapatalk

                                    1 Reply Last reply Reply Quote 0
                                    • Homoran
                                      Homoran Global Moderator Administrators last edited by

                                      Habe als Linux-noob gerade versucht das bei ubuntu-users nachzuvollziehen.

                                      Habe ich das richtig verstanden, dass diese Installation evtl. einiges umbiegt?

                                      1 Reply Last reply Reply Quote 0
                                      • C
                                        chrram last edited by

                                        @Homoran:

                                        Habe als Linux-noob gerade versucht das bei ubuntu-users nachzuvollziehen.

                                        Habe ich das richtig verstanden, dass diese Installation evtl. einiges umbiegt? `
                                        Meinst du tvheadend ? Das hatte ich danach erst installiert vorher ging iobroker auch nicht

                                        Gesendet von iPhone mit Tapatalk

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

                                          @chrram:

                                          das steht im journal

                                          systemd[1]: Starting ioBroker server task…

                                          Jan 02 14:35:07 HomeServer iobroker.sh[957]: Usage: iobroker {start|stop|restart} `
                                          Dann wurde ioBroker wohl nicht automatisch gestartet. Für das "Weshalb" reichen meine Linux-Kenntnisse nicht 😞

                                          1 Reply Last reply Reply Quote 0
                                          • C
                                            chrram last edited by

                                            das kommt wenn ich iobroker.service per hand starte

                                            [b]sudo systemctl start iobroker.service[/b]
                                            Warning: iobroker.service changed on disk. Run 'systemctl daemon-reload' to reload units.
                                            Job for iobroker.service failed because the control process exited with error code. See "systemctl status iobroker.service" and "journalctl -xe" for details.
                                            christopher@HomeServer:[b]/etc/systemd/system$ journalctl -xe
                                            [/b]Jan 02 15:21:31 HomeServer sudo[1527]: christopher : TTY=pts/0 ; PWD=/etc/systemd/system ; USER=root ; COMMAND=/bin/nano iobroker.service
                                            Jan 02 15:21:31 HomeServer sudo[1527]: pam_unix(sudo:session): session opened for user root by christopher(uid=0)
                                            Jan 02 15:21:41 HomeServer sudo[1527]: pam_unix(sudo:session): session closed for user root
                                            Jan 02 15:21:44 HomeServer sudo[1529]: christopher : TTY=pts/0 ; PWD=/etc/systemd/system ; USER=root ; COMMAND=/bin/systemctl status iobroker.service
                                            Jan 02 15:21:44 HomeServer sudo[1529]: pam_unix(sudo:session): session opened for user root by christopher(uid=0)
                                            Jan 02 15:21:44 HomeServer sudo[1529]: pam_unix(sudo:session): session closed for user root
                                            Jan 02 15:21:55 HomeServer sudo[1532]: christopher : TTY=pts/0 ; PWD=/etc/systemd/system ; USER=root ; COMMAND=/bin/systemctl start iobroker.service
                                            Jan 02 15:21:55 HomeServer sudo[1532]: pam_unix(sudo:session): session opened for user root by christopher(uid=0)
                                            Jan 02 15:21:55 HomeServer systemd[1]: Starting ioBroker server task...
                                            -- Subject: Unit iobroker.service has begun start-up
                                            -- Defined-By: systemd
                                            -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
                                            --
                                            -- Unit iobroker.service has begun starting up.
                                            Jan 02 15:21:55 HomeServer iobroker.sh[1535]: Usage: iobroker {start|stop|restart}
                                            Jan 02 15:21:55 HomeServer systemd[1]: iobroker.service: Control process exited, code=exited status=1
                                            Jan 02 15:21:55 HomeServer systemd[1]: Failed to start ioBroker server task.
                                            -- Subject: Unit iobroker.service has failed
                                            -- Defined-By: systemd
                                            -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
                                            --
                                            -- Unit iobroker.service has failed.
                                            --
                                            -- The result is failed.
                                            Jan 02 15:21:55 HomeServer systemd[1]: iobroker.service: Unit entered failed state.
                                            Jan 02 15:21:55 HomeServer systemd[1]: iobroker.service: Failed with result 'exit-code'.
                                            Jan 02 15:21:55 HomeServer sudo[1532]: pam_unix(sudo:session): session closed for user root
                                            Jan 02 15:22:00 HomeServer sudo[1538]: christopher : TTY=pts/0 ; PWD=/etc/systemd/system ; USER=root ; COMMAND=/bin/systemctl status iobroker.service
                                            Jan 02 15:22:00 HomeServer sudo[1538]: pam_unix(sudo:session): session opened for user root by christopher(uid=0)
                                            Jan 02 15:22:00 HomeServer sudo[1538]: pam_unix(sudo:session): session closed for user root
                                            Jan 02 15:22:03 HomeServer sudo[1541]: christopher : TTY=pts/0 ; PWD=/etc/systemd/system ; USER=root ; COMMAND=/bin/nano iobroker.service
                                            Jan 02 15:22:03 HomeServer sudo[1541]: pam_unix(sudo:session): session opened for user root by christopher(uid=0)
                                            Jan 02 15:22:09 HomeServer sudo[1541]: pam_unix(sudo:session): session closed for user root
                                            Jan 02 15:22:11 HomeServer sudo[1543]: christopher : TTY=pts/0 ; PWD=/etc/systemd/system ; USER=root ; COMMAND=/bin/systemctl start iobroker.service
                                            Jan 02 15:22:11 HomeServer sudo[1543]: pam_unix(sudo:session): session opened for user root by christopher(uid=0)
                                            Jan 02 15:22:11 HomeServer systemd[1]: Starting ioBroker server task...
                                            -- Subject: Unit iobroker.service has begun start-up
                                            -- Defined-By: systemd
                                            -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
                                            --
                                            -- Unit iobroker.service has begun starting up.
                                            Jan 02 15:22:11 HomeServer iobroker.sh[1546]: Usage: iobroker {start|stop|restart}
                                            Jan 02 15:22:11 HomeServer systemd[1]: iobroker.service: Control process exited, code=exited status=1
                                            Jan 02 15:22:11 HomeServer systemd[1]: Failed to start ioBroker server task.
                                            -- Subject: Unit iobroker.service has failed
                                            -- Defined-By: systemd
                                            -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
                                            --
                                            -- Unit iobroker.service has failed.
                                            --
                                            -- The result is failed.
                                            Jan 02 15:22:11 HomeServer systemd[1]: iobroker.service: Unit entered failed state.
                                            Jan 02 15:22:11 HomeServer systemd[1]: iobroker.service: Failed with result 'exit-code'.
                                            Jan 02 15:22:11 HomeServer sudo[1543]: pam_unix(sudo:session): session closed for user root
                                            
                                            

                                            @paul53:

                                            @chrram:

                                            das steht im journal

                                            systemd[1]: Starting ioBroker server task…

                                            Jan 02 14:35:07 HomeServer iobroker.sh[957]: Usage: iobroker {start|stop|restart} Dann wurde ioBroker wohl nicht automatisch gestartet. Für das "Weshalb" reichen meine Linux-Kenntnisse nicht :(
                                            danke dir trozdem vielmals für deine jetzige hilfe

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

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate
                                            FAQ Cloud / IOT
                                            HowTo: Node.js-Update
                                            HowTo: Backup/Restore
                                            Downloads
                                            BLOG

                                            393
                                            Online

                                            31.9k
                                            Users

                                            80.1k
                                            Topics

                                            1.3m
                                            Posts

                                            19
                                            83
                                            17978
                                            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