Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. ioBroker Allgemein
    4. Javascript Instanz steht / wie starten ohne Internet

    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

    Javascript Instanz steht / wie starten ohne Internet

    This topic has been deleted. Only users with topic management privileges can see it.
    • J
      jan_ @Thomas Braun last edited by jan_

      @Thomas-Braun

      Alle Filesysteme sind rw, wenn ich das richtig verstehe. Stimmt das eigentlich dass das so viele sind?

      pi@iobroker:~ $ mount | column -t
      /dev/mmcblk0p2  on  /                           type  ext4        (rw,noatime)
      devtmpfs        on  /dev                        type  devtmpfs    (rw,relatime,size=1827808k,nr_inodes=97777,mode=755)
      sysfs           on  /sys                        type  sysfs       (rw,nosuid,nodev,noexec,relatime)
      proc            on  /proc                       type  proc        (rw,relatime)
      securityfs      on  /sys/kernel/security        type  securityfs  (rw,nosuid,nodev,noexec,relatime)
      tmpfs           on  /dev/shm                    type  tmpfs       (rw,nosuid,nodev)
      devpts          on  /dev/pts                    type  devpts      (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
      tmpfs           on  /run                        type  tmpfs       (rw,nosuid,nodev,mode=755)
      tmpfs           on  /run/lock                   type  tmpfs       (rw,nosuid,nodev,noexec,relatime,size=5120k)
      tmpfs           on  /sys/fs/cgroup              type  tmpfs       (ro,nosuid,nodev,noexec,mode=755)
      cgroup2         on  /sys/fs/cgroup/unified      type  cgroup2     (rw,nosuid,nodev,noexec,relatime,nsdelegate)
      cgroup          on  /sys/fs/cgroup/systemd      type  cgroup      (rw,nosuid,nodev,noexec,relatime,xattr,name=systemd)
      none            on  /sys/fs/bpf                 type  bpf         (rw,nosuid,nodev,noexec,relatime,mode=700)
      cgroup          on  /sys/fs/cgroup/blkio        type  cgroup      (rw,nosuid,nodev,noexec,relatime,blkio)
      cgroup          on  /sys/fs/cgroup/net_cls      type  cgroup      (rw,nosuid,nodev,noexec,relatime,net_cls)
      cgroup          on  /sys/fs/cgroup/freezer      type  cgroup      (rw,nosuid,nodev,noexec,relatime,freezer)
      cgroup          on  /sys/fs/cgroup/devices      type  cgroup      (rw,nosuid,nodev,noexec,relatime,devices)
      cgroup          on  /sys/fs/cgroup/cpu,cpuacct  type  cgroup      (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
      cgroup          on  /sys/fs/cgroup/cpuset       type  cgroup      (rw,nosuid,nodev,noexec,relatime,cpuset)
      cgroup          on  /sys/fs/cgroup/pids         type  cgroup      (rw,nosuid,nodev,noexec,relatime,pids)
      sunrpc          on  /run/rpc_pipefs             type  rpc_pipefs  (rw,relatime)
      debugfs         on  /sys/kernel/debug           type  debugfs     (rw,relatime)
      mqueue          on  /dev/mqueue                 type  mqueue      (rw,relatime)
      systemd-1       on  /proc/sys/fs/binfmt_misc    type  autofs      (rw,relatime,fd=40,pgrp=1,timeout=0,minproto=5,maxproto=5,direct)
      configfs        on  /sys/kernel/config          type  configfs    (rw,relatime)
      /dev/mmcblk0p1  on  /boot                       type  vfat        (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,errors=remount-ro)
      tmpfs           on  /run/user/1000              type  tmpfs       (rw,nosuid,nodev,relatime,size=391980k,mode=700,uid=1000,gid=1000)
      

      Das letztendliche File in /opt ist leer.
      Und zwar, soweit ich das verstehe, "nur" leer, also nicht nach /dev/null gelinked, also eigentlich nicht gemasked.

      pi@iobroker:~ $ ls -la /usr/bin/iobroker
      lrwxrwxrwx 1 root root 22 Nov 24 11:54 /usr/bin/iobroker -> /opt/iobroker/iobroker
      pi@iobroker:~ $ ls -la /opt/iobroker/iobroker
      -rwxr-xr-x+ 1 iobroker iobroker 0 Nov 24 11:54 /opt/iobroker/iobroker
      
      Thomas Braun 1 Reply Last reply Reply Quote 0
      • Thomas Braun
        Thomas Braun Most Active @jan_ last edited by Thomas Braun

        @jan_ sagte in Javascript Instanz steht / wie starten ohne Internet:

        /opt/iobroker/iobroker

        Die 'mask' liegt ja auch nicht auf dem file in /opt/iobroker sondern in den services.

        cat /opt/iobroker/iobroker
        

        In der Datei sollte dieses kurze shell-skript drin sein:

        #!/bin/bash
        if (( $# == 1 )) && ([ "$1" = "start" ] || [ "$1" = "stop" ] || [ "$1" = "restart" ]); then
        sudo systemctl $1 iobroker
        elif [ "$1" = "fix" ]; then
        curl -sL https://iobroker.net/fix.sh | bash -
        else
        sudo -H -u iobroker node /opt/iobroker/node_modules/iobroker.js-controller/iobroker.js "$@"
        fi
        
        J 1 Reply Last reply Reply Quote 0
        • J
          jan_ @Thomas Braun last edited by jan_

          @Thomas-Braun
          Danke!
          Leider klappt das mit dem unmasken trotzdem nicht

          pi@iobroker:~ $ sudo systemctl unmask iobroker
          pi@iobroker:~ $ sudo systemctl unmask iobroker.service
          pi@iobroker:iobroker start
          Failed to start iobroker.service: Unit iobroker.service is masked.
          

          ;-(

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

            @jan_

            cat /opt/iobroker/iobroker
            
            J 1 Reply Last reply Reply Quote 0
            • J
              jan_ @Thomas Braun last edited by

              @Thomas-Braun said in Javascript Instanz steht / wie starten ohne Internet:

              cat /opt/iobroker/iobroker

              Naja, das was Du mir gepostet hast - ich habe das File "neu befüllt":

              #!/bin/bash
              if (( $# == 1 )) && ([ "$1" = "start" ] || [ "$1" = "stop" ] || [ "$1" = "restart" ]); then
              sudo systemctl $1 iobroker
              elif [ "$1" = "fix" ]; then
              curl -sL https://iobroker.net/fix.sh | bash -
              else
              sudo -H -u iobroker node /opt/iobroker/node_modules/iobroker.js-controller/iobroker.js "$@"
              fi
              

              "iobroker status" gibt auch einen sinnvollen output - "not running"
              Nur beim starten kommt "masked".

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

                @jan_

                systemctl status iobroker
                
                J 1 Reply Last reply Reply Quote 0
                • J
                  jan_ @Thomas Braun last edited by

                  @Thomas-Braun

                  pi@iobroker:~ $ systemctl status iobroker
                  ● iobroker.service
                     Loaded: masked (Reason: Unit iobroker.service is masked.)
                     Active: inactive (dead)
                  

                  Da ist übrigens weder in /etc/systemd/system/ noch in /etc/init.d/ ein Symlink / File von iobroker zu finden...

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

                    @jan_

                    In einem 'gesunden' System sieht das so aus:

                    /etc/systemd/system/multi-user.target.wants/iobroker.service
                    /lib/systemd/system/iobroker.service
                    /run/systemd/units/invocation:iobroker.service
                    

                    Da man jetzt nur ganz schwer nachvollziehen kann, was da warum mit dem System passiert ist (root-login, Aufruf von iobroker mit sudo, schwaches Netzteil, angeschossenes Filesystem usw.) installier das mit neuer Hardware neu und spiel ein Backup ein.

                    J 1 Reply Last reply Reply Quote 0
                    • J
                      jan_ @Thomas Braun last edited by jan_

                      @Thomas-Braun
                      Sehe ich genauso.
                      Das wird jetzt ein reparieren von Stöckchen zu Stöckchen.
                      Und wer sagt dass nicht noch mehr Dienste einen Schaden haben.

                      Werde ich machen. Bis dahin muss ich eben die eine Hälfte der Lichter (zigbee) über Phoscon mit der Hand steuern und die shellys über ihre Webinterface.

                      Wie gesagt: kannst Du einschätzen ob ich mit dem vorliegenden Backup von Backitup "voll versorgt" bin ober ob die Tatsache dass meine Zigbee-Geräte über den Deconz-Stick kommen bedeutet, dass irgendwas fehlt?

                      Ganz herzlichen Dank für Deinen irrsinnigen Einsatz und die vielen guten Tipps!
                      Habe wieder viel gelernt.

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

                        @jan_
                        Für deconz gibt es soweit ich weiß einen eigenen Backup-Prozess, das ist im Backitup nicht drin.

                        J 1 Reply Last reply Reply Quote 0
                        • J
                          jan_ @Thomas Braun last edited by

                          @Thomas-Braun
                          Tatsächlich: unter "Menü -> Gateway -> Backup-Optionen" kann man sich eins ziehen. Was bei mir auch noch funktioniert.
                          Hervorragend.
                          Wieder was gelernt.
                          Danke!

                          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

                          547
                          Online

                          31.9k
                          Users

                          80.1k
                          Topics

                          1.3m
                          Posts

                          javascript offline
                          4
                          34
                          1349
                          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