Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. ioBroker Allgemein
    4. [How-to] Node.js ioBroker richtig updaten-2021/22 Edition

    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

    [How-to] Node.js ioBroker richtig updaten-2021/22 Edition

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

      @supernils ja das typische rebuild Problem wo die Art automatisch vom Controller zu rebuilders nicht tut. Musst du manuell tun. Gibts in diesem thread gefühlt schon tausend mal und vor allem
      Im
      Ersten post steht es sogar ganz genau.

      Der Controller 4 der bald kommt sollte das dann automatisch hinbekommen in mehr Fällen 😉

      H 1 Reply Last reply Reply Quote 1
      • H
        homecineplexx @apollon77 last edited by

        Hallo
        wenn ich folgendes probiere:

        iobroker rebuild zigbee
        

        kommt leider nur folgendes:

        Path argument needs to be an absolute path!
        

        was genau muss ich da angeben?

        Thomas Braun apollon77 2 Replies Last reply Reply Quote 0
        • Thomas Braun
          Thomas Braun Most Active @homecineplexx last edited by

          @homecineplexx
          js-controller 4.0.4 in einem Container eingedost?

          H 1 Reply Last reply Reply Quote 0
          • H
            homecineplexx @Thomas Braun last edited by

            @thomas-braun said in [How-to] Node.js für ioBroker richtig updaten - 2021 Edition:

            js-controller 4.0.4 in einem Container eingedost?

            js-controller 4.0.4 läuft auf einer Proxmox VM ja, genau

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

              @homecineplexx

              Auf 4.0.5 warten.

              H apollon77 2 Replies Last reply Reply Quote 0
              • H
                homecineplexx @Thomas Braun last edited by

                @thomas-braun wenn das die Lösung ist dann dankeschön --- das sitz ich aus 🙂

                1 Reply Last reply Reply Quote 0
                • apollon77
                  apollon77 @homecineplexx last edited by

                  @homecineplexx ääähhmm ...Warum willst Du zigbee rebuilden? (Und nein davon hat nichts mit Docker zu tun) ... An sich ist bisher eher bekannt das es bei Zigbee sehr gut automatisch funktioniert.

                  Also bitte mal Logs zeigen

                  H 1 Reply Last reply Reply Quote 0
                  • apollon77
                    apollon77 @Thomas Braun last edited by

                    @thomas-braun Neeeeeee, Docker geht alles, man muss nur ggf. nach einem ersten Start nochmal den Fixer laufen lassen weil beim ersten Start keine Adapter startet. Hat aber an sich mit rebuild cases nichts zu tun

                    1 Reply Last reply Reply Quote 0
                    • H
                      homecineplexx @apollon77 last edited by homecineplexx

                      @apollon77 Hallo, naja warum möchte ich das, weils nicht funktioniert und nein ich hab auch nichts mit Docker erwähnt!! Also was soll/kann ich in meinem Fall tun?
                      Vielleicht noch als info:

                      node -v      v14.19.0
                      npm -v       6.14.16
                      

                      bzw das ist auch recht interessant:

                      iobroker info
                       Cannot determine Lua scripts strategy: Connection is closed. ["cfg.o.system.host.IoBrokerSmartHome"]
                      Server Cannot start inMem-states on port 9000: Failed to lock DB file "/opt/iobroker/iobroker-data/states.jsonl"!
                      
                      
                      host.IoBrokerSmartHome
                      2022-02-08 06:25:29.718	info	Rebuild for adapter system.adapter.zigbee.0 not successful in 3 tries. Adapter will not be restarted again. Please execute "npm install --production" in adapter directory manually.
                      host.IoBrokerSmartHome
                      2022-02-08 06:25:29.718	error	instance system.adapter.zigbee.0 terminated with code 1 (JS_CONTROLLER_STOPPED)
                      host.IoBrokerSmartHome
                      2022-02-08 06:25:29.717	error	Caught by controller[0]: }
                      host.IoBrokerSmartHome
                      2022-02-08 06:25:29.717	error	Caught by controller[0]: code: 'ERR_DLOPEN_FAILED'
                      host.IoBrokerSmartHome
                      2022-02-08 06:25:29.716	error	Caught by controller[0]: at Module.load (internal/modules/cjs/loader.js:950:32) {
                      host.IoBrokerSmartHome
                      2022-02-08 06:25:29.716	error	Caught by controller[0]: at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
                      host.IoBrokerSmartHome
                      2022-02-08 06:25:29.716	error	Caught by controller[0]: at Module._compile (internal/modules/cjs/loader.js:1085:14)
                      host.IoBrokerSmartHome
                      2022-02-08 06:25:29.715	error	Caught by controller[0]: at Object.<anonymous> (/opt/iobroker/node_modules/iobroker.zigbee/node_modules/@serialport/bindings/lib/linux.js:2:36)
                      host.IoBrokerSmartHome
                      2022-02-08 06:25:29.715	error	Caught by controller[0]: at bindings (/opt/iobroker/node_modules/bindings/bindings.js:112:48)
                      host.IoBrokerSmartHome
                      2022-02-08 06:25:29.714	error	Caught by controller[0]: at require (internal/modules/cjs/helpers.js:101:18)
                      host.IoBrokerSmartHome
                      2022-02-08 06:25:29.714	error	Caught by controller[0]: at Module.require (internal/modules/cjs/loader.js:974:19)
                      host.IoBrokerSmartHome
                      2022-02-08 06:25:29.713	error	Caught by controller[0]: at Function.Module._load (internal/modules/cjs/loader.js:790:12)
                      host.IoBrokerSmartHome
                      2022-02-08 06:25:29.713	error	Caught by controller[0]: at Module.load (internal/modules/cjs/loader.js:950:32)
                      host.IoBrokerSmartHome
                      2022-02-08 06:25:29.712	error	Caught by controller[0]: at Object.Module._extensions..node (internal/modules/cjs/loader.js:1144:18)
                      host.IoBrokerSmartHome
                      2022-02-08 06:25:29.712	error	Caught by controller[0]: the module (for instance, using `npm rebuild` or `npm install`).
                      host.IoBrokerSmartHome
                      2022-02-08 06:25:29.712	error	Caught by controller[0]: NODE_MODULE_VERSION 83. Please try re-compiling or re-installing
                      host.IoBrokerSmartHome
                      2022-02-08 06:25:29.711	error	Caught by controller[0]: NODE_MODULE_VERSION 72. This version of Node.js requires
                      host.IoBrokerSmartHome
                      2022-02-08 06:25:29.711	error	Caught by controller[0]: was compiled against a different Node.js version using
                      host.IoBrokerSmartHome
                      2022-02-08 06:25:29.710	error	Caught by controller[0]: Error: The module '/opt/iobroker/node_modules/iobroker.zigbee/node_modules/@serialport/bindings/build/Release/bindings.node'
                      host.IoBrokerSmartHome
                      2022-02-08 06:25:29.709	error	Caught by controller[0]: ^
                      host.IoBrokerSmartHome
                      2022-02-08 06:25:29.709	error	Caught by controller[0]: throw e;
                      host.IoBrokerSmartHome
                      2022-02-08 06:25:29.708	error	Caught by controller[0]: /opt/iobroker/node_modules/bindings/bindings.js:121
                      host.IoBrokerSmartHome
                      2022-02-08 06:25:27.389	info	instance system.adapter.zigbee.0 started with pid 10214
                      host.IoBrokerSmartHome
                      2022-02-08 06:25:23.624	info	"system.adapter.zigbee.0" enabled
                      
                      apollon77 1 Reply Last reply Reply Quote 0
                      • apollon77
                        apollon77 @homecineplexx last edited by

                        @homecineplexx Ok, also ja in dem Fall braucht es einen rebuild. Am besten im /opt/iobroker ein "npm rebuil" ausführen. Das sollte das fixen.

                        Der "iobroker info" Fehler ist komisch. Der sollte nur passieren wenn er versucht die DB zwei mal zu öffnen ... läuft da irgendwas parallel?

                        H 1 Reply Last reply Reply Quote 0
                        • H
                          homecineplexx @apollon77 last edited by

                          @apollon77 said in [How-to] Node.js für ioBroker richtig updaten - 2021 Edition:

                          @homecineplexx Ok, also ja in dem Fall braucht es einen rebuild. Am besten im /opt/iobroker ein "npm rebuil" ausführen. Das sollte das fixen.

                          Der "iobroker info" Fehler ist komisch. Der sollte nur passieren wenn er versucht die DB zwei mal zu öffnen ... läuft da irgendwas parallel?

                          ob da etwas doppelt läuft, weiss ich nicht, wie find ich das raus?

                          also das "npm rebuild" war nicht sehr erfolgreich:

                          
                          > iobroker.js-controller@4.0.4 install /opt/iobroker/node_modules/iobroker.js-controller
                          > node iobroker.js setup first
                          
                          Uncaught Rejection: Error: Connection is closed.
                              at close (/opt/iobroker/node_modules/ioredis/built/redis/event_handler.js:184:25)
                              at Socket.<anonymous> (/opt/iobroker/node_modules/ioredis/built/redis/event_handler.js:151:20)
                              at Object.onceWrapper (events.js:520:26)
                              at Socket.emit (events.js:400:28)
                              at TCP.<anonymous> (net.js:686:12)
                           Unable to subscribe to expiry Keyspace events from Redis Server: Connection is closed.
                           Unable to subscribe to evicted Keyspace events from Redis Server: Connection is closed.
                           Unable to subscribe to meta namespace "meta." changes: Connection is closed.
                          Server Cannot start inMem-states on port 9000: Failed to lock DB file "/opt/iobroker/iobroker-data/states.jsonl"!
                          npm ERR! code ELIFECYCLE
                          npm ERR! errno 24
                          npm ERR! iobroker.js-controller@4.0.4 install: `node iobroker.js setup first`
                          npm ERR! Exit status 24
                          npm ERR! 
                          npm ERR! Failed at the iobroker.js-controller@4.0.4 install script.
                          npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
                          
                          npm ERR! A complete log of this run can be found in:
                          npm ERR!     /home/iobroker/.npm/_logs/2022-02-08T07_47_46_047Z-debug.log
                          root@IoBrokerSmartHome:/opt/iobroker# less /home/iobroker/.npm/_logs/2022-02-08T07_47_46_047Z-debug.log
                          
                          
                          Thomas Braun apollon77 2 Replies Last reply Reply Quote 0
                          • Thomas Braun
                            Thomas Braun Most Active @homecineplexx last edited by

                            @homecineplexx
                            Lösch den npm cache mal.
                            Und eier nicht als root herum.

                            H 1 Reply Last reply Reply Quote 0
                            • apollon77
                              apollon77 @homecineplexx last edited by

                              @homecineplexx sagte in [How-to] Node.js für ioBroker richtig updaten - 2021 Edition:

                              Server Cannot start inMem-states on port 9000: Failed to lock DB file "/opt/iobroker/iobroker-data/states.jsonl"!

                              Neee ich denke das hier ist die Ursache. Das JSONL File ist gelockt ... Und damit kann er die DB nicht öffnen. Ich sag mal so: Reboote mal ... oder finde raus welcher prozess das File lockt ...

                              @AlCalzone noch ne idee?

                              H AlCalzone 2 Replies Last reply Reply Quote 0
                              • H
                                homecineplexx @Thomas Braun last edited by

                                @thomas-braun said in [How-to] Node.js für ioBroker richtig updaten - 2021 Edition:

                                Und eier nicht als root herum

                                npm cache clear --force
                                und
                                das hab ich nun befolgt aber keine Änderung

                                node-pre-gyp WARN Using request for node-pre-gyp https download 
                                [lzma-native] Success: "/opt/iobroker/node_modules/iobroker.javascript/node_modules/lzma-native/binding-v4.0.6-node-v83-linux-x64/lzma_native.node" already installed
                                Pass --update-binary to reinstall or --build-from-source to recompile
                                
                                > iobroker.javascript@5.2.21 postinstall /opt/iobroker/node_modules/iobroker.javascript
                                > node ./install/installTypings.js
                                
                                Installing NodeJS typings...
                                latest @types: 17, installed node: 14
                                
                                > lzma-native@4.0.6 install /opt/iobroker/node_modules/iobroker.javascript/node_modules/lzma-native
                                > node-pre-gyp install --fallback-to-build && rimraf build
                                
                                node-pre-gyp WARN Using request for node-pre-gyp https download 
                                [lzma-native] Success: "/opt/iobroker/node_modules/iobroker.javascript/node_modules/lzma-native/binding-v4.0.6-node-v83-linux-x64/lzma_native.node" already installed
                                Pass --update-binary to reinstall or --build-from-source to recompile
                                
                                > iobroker.js-controller@4.0.4 preinstall /opt/iobroker/node_modules/iobroker.js-controller
                                > node lib/preinstallCheck.js
                                
                                NPM version: 6.14.16
                                
                                > iobroker.js-controller@4.0.4 install /opt/iobroker/node_modules/iobroker.js-controller
                                > node iobroker.js setup first
                                
                                 Connection is closed.
                                Uncaught Rejection: Error: States DB is not allowed to start in the current Multihost environment
                                    at Redis.<anonymous> (/opt/iobroker/node_modules/@iobroker/db-states-redis/lib/states/statesInRedisClient.js:579:23)
                                    at processTicksAndRejections (internal/process/task_queues.js:95:5)
                                Server Cannot start inMem-states on port 9000: Failed to lock DB file "/opt/iobroker/iobroker-data/states.jsonl"!
                                npm ERR! code ELIFECYCLE
                                npm ERR! errno 24
                                npm ERR! iobroker.js-controller@4.0.4 install: `node iobroker.js setup first`
                                npm ERR! Exit status 24
                                npm ERR! 
                                npm ERR! Failed at the iobroker.js-controller@4.0.4 install script.
                                npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
                                
                                npm ERR! A complete log of this run can be found in:
                                npm ERR!     /home/iobroker/.npm/_logs/2022-02-08T08_11_00_567Z-debug.log
                                chris@IoBrokerSmartHome:/opt/iobroker$ 
                                
                                
                                1 Reply Last reply Reply Quote 0
                                • H
                                  homecineplexx @apollon77 last edited by

                                  @apollon77 said in [How-to] Node.js für ioBroker richtig updaten - 2021 Edition:

                                  @homecineplexx sagte in [How-to] Node.js für ioBroker richtig updaten - 2021 Edition:

                                  Server Cannot start inMem-states on port 9000: Failed to lock DB file "/opt/iobroker/iobroker-data/states.jsonl"!

                                  Neee ich denke das hier ist die Ursache. Das JSONL File ist gelockt ... Und damit kann er die DB nicht öffnen. Ich sag mal so: Reboote mal ... oder finde raus welcher prozess das File lockt ...

                                  @AlCalzone noch ne idee?

                                  reboot des systems hab ich durchgeführt
                                  wenn du mir jetzt noch bitte sagen könntest, wie ich raus finde, was hier blockieren könnte...?

                                  chris@IoBrokerSmartHome:/opt/iobroker$ iobroker status
                                  (node:1354) Warning: Accessing non-existent property 'count' of module exports inside circular dependency
                                  (Use `node --trace-warnings ...` to show where the warning was created)
                                  (node:1354) Warning: Accessing non-existent property 'findOne' of module exports inside circular dependency
                                  (node:1354) Warning: Accessing non-existent property 'remove' of module exports inside circular dependency
                                  (node:1354) Warning: Accessing non-existent property 'updateOne' of module exports inside circular dependency
                                  iobroker is running on this host.
                                  
                                  
                                  Objects type: jsonl
                                  States  type: jsonl
                                  
                                  
                                  apollon77 1 Reply Last reply Reply Quote 0
                                  • AlCalzone
                                    AlCalzone Developer @apollon77 last edited by

                                    @apollon77 sagte in [How-to] Node.js für ioBroker richtig updaten - 2021 Edition:

                                    @AlCalzone noch ne idee?

                                    paar Sekunden warten. Das passiert eigentlich nur wenn innerhalb der letzen 10s der DB-Prozess abgeschmiert ist ohne die DB sauber zu schließen.

                                    H 1 Reply Last reply Reply Quote 0
                                    • H
                                      homecineplexx @AlCalzone last edited by homecineplexx

                                      @alcalzone said in [How-to] Node.js für ioBroker richtig updaten - 2021 Edition:

                                      @apollon77 sagte in [How-to] Node.js für ioBroker richtig updaten - 2021 Edition:

                                      @AlCalzone noch ne idee?

                                      paar Sekunden warten. Das passiert eigentlich nur wenn innerhalb der letzen 10s der DB-Prozess abgeschmiert ist ohne die DB sauber zu schließen.

                                      also das warten wäre es nicht...hab ja gestern schon versucht und heute..also zeit hätte das teil ja genug.

                                      ich finde auch das recht spannend (was auch immer redis damit zu tun hat):

                                      node-pre-gyp WARN Using request for node-pre-gyp https download 
                                      [lzma-native] Success: "/opt/iobroker/node_modules/iobroker.javascript/node_modules/lzma-native/binding-v4.0.6-node-v83-linux-x64/lzma_native.node" already installed
                                      Pass --update-binary to reinstall or --build-from-source to recompile
                                      
                                      > iobroker.js-controller@4.0.4 preinstall /opt/iobroker/node_modules/iobroker.js-controller
                                      > node lib/preinstallCheck.js
                                      
                                      NPM version: 6.14.16
                                      
                                      > iobroker.js-controller@4.0.4 install /opt/iobroker/node_modules/iobroker.js-controller
                                      > node iobroker.js setup first
                                      
                                       Connection is closed.
                                      Uncaught Rejection: Error: States DB is not allowed to start in the current Multihost environment
                                          at Redis.<anonymous> (/opt/iobroker/node_modules/@iobroker/db-states-redis/lib/states/statesInRedisClient.js:579:23)
                                          at processTicksAndRejections (internal/process/task_queues.js:95:5)
                                      Server Cannot start inMem-states on port 9000: Failed to lock DB file "/opt/iobroker/iobroker-data/states.jsonl"!
                                      npm ERR! code ELIFECYCLE
                                      npm ERR! errno 24
                                      npm ERR! iobroker.js-controller@4.0.4 install: `node iobroker.js setup first`
                                      npm ERR! Exit status 24
                                      npm ERR! 
                                      npm ERR! Failed at the iobroker.js-controller@4.0.4 install script.
                                      npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
                                      
                                      npm ERR! A complete log of this run can be found in:
                                      npm ERR!     /home/iobroker/.npm/_logs/2022-02-08T08_21_08_680Z-debug.log
                                      chris@IoBrokerSmartHome:/opt/iobroker$ 
                                      
                                      
                                      AlCalzone 1 Reply Last reply Reply Quote 0
                                      • apollon77
                                        apollon77 last edited by

                                        Ok, kannst Du denn "iob setup first" generell aufrufen ... nicht im Rahmen des Rebuilds?

                                        H 1 Reply Last reply Reply Quote 0
                                        • AlCalzone
                                          AlCalzone Developer @homecineplexx last edited by

                                          @homecineplexx Dann kann eigentlich nur ein anderer Controller/CLI-Prozess noch laufen, der die DB in Nutzung hat. @apollon77 ne Idee wie das sein kann?

                                          apollon77 1 Reply Last reply Reply Quote 0
                                          • apollon77
                                            apollon77 @homecineplexx last edited by

                                            @homecineplexx Das hietr ist auch komisch. Mach mal bitte in /opt/iobroker

                                            node --trace-warnings node_modules/iobroker.js-controller/iobroker.js status

                                            H 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

                                            721
                                            Online

                                            31.9k
                                            Users

                                            80.1k
                                            Topics

                                            1.3m
                                            Posts

                                            97
                                            812
                                            319645
                                            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