Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Tester
    4. Test ioBroker Fixer mit JSONL-Compression

    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

    Test ioBroker Fixer mit JSONL-Compression

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

      @apollon77
      für iob diag wie @Dr-Bakterius

      bash: Zeile 1: Syntaxfehler beim unerwarteten Symbol »<«
      bash: Zeile 1: `<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/www/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#2196F3"><meta name="description" content="Remote access to personal ioBroker server via ioBroker.cloud"/><link rel="apple-touch-icon" href="/www/logo192.png"/><link rel="manifest" href="/www/manifest.json"/><title>ioBroker Cloud</title><style>#root,body,html{height:100%;width:100%;display:flex;overflow:hidden}</style><script defer="defer" src="/www/static/js/main.ae982c84.js"></script><link href="/www/static/css/main.59da0ebb.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>'
      
      

      für iob fix auf meinem vermanschten System
      vorher:

      bommel@iobroker:~$ ls -lah /opt/iobroker/iobroker-data/*.jsonl
      -rw-rw-r--+ 1 iobroker iobroker  54M 13. Dez 10:52 /opt/iobroker/iobroker-data/objects.jsonl
      -rw-rw-r--+ 1 iobroker iobroker 218M 13. Dez 10:52 /opt/iobroker/iobroker-data/states.jsonl
      

      nachher:

      bommel@iobroker:/opt/iobroker$ ls -lah /opt/iobroker/iobroker-data/*.jsonl
      -rw-rw-r--+ 1 iobroker iobroker 31M 13. Dez 10:53 /opt/iobroker/iobroker-data/objects.jsonl
      -rw-rw-r--+ 1 iobroker iobroker 15M 13. Dez 10:53 /opt/iobroker/iobroker-data/states.jsonl
      
      1 Reply Last reply Reply Quote 0
      • apollon77
        apollon77 last edited by

        So, "iob diag" sollte jetzt gefixt sein!!

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

          @apollon77 sagte in Test ioBroker Fixer mit JSONL-Compression:

          So, "iob diag" sollte jetzt gefixt sein!!

          jup, so ist es! 👏

          Edit: Leider wird alles vor der summary in meiner putty-session gelöscht (ich kann zumindest nicht mehr hochscrollen), ist das so gewollt?

          M 1 Reply Last reply Reply Quote 0
          • M
            mrjeschke @Latzi last edited by

            @latzi

            Das Script soll beim Start und vor summary auf einen Tastendruck warten.
            Das macht es aber leider nicht.

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

              @mrjeschke

              Richtig, sollte es.
              Tut es auf meiner lokalen Version auch. Muss ich mal buddeln was da jetzt auf dem Server gelandet ist.

              echad@chet:~/iob_diag $ diff iob_diag diag.sh
              8c8
              < SKRIPTV="0.0.8"; #version of this script
              ---
              > SKRIPTV="2022-12-09"; #version of this script
              

              Bis auf der angepasste Versionsnummer ist das gleich. Keine Ahnung warum das nicht wie vorgesehen funktioniert.

              M 1 Reply Last reply Reply Quote 0
              • M
                mrjeschke @Thomas Braun last edited by

                @thomas-braun

                Seltsam, wenn ich das Script mit

                
                curl -sLf https://iobroker.net/diag.sh > diag.sh
                

                runterlade und lokal ausführe wartet es auf Tastendruck.
                Mit

                
                curl -sLf https://iobroker.net/diag.sh | bash -
                
                

                aber nicht.

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

                  @mrjeschke

                  Kannst du mal versuchen ob es so richtig herunterkommt:

                  curl -sLf -o diag.sh https://iobroker.net/diag.sh && bash diag.sh
                  

                  Mit Ausgabe in ein log file:

                  curl -sLf -o .diag.sh https://iobroker.net/diag.sh && bash .diag.sh | tee iob_diag.log
                  
                  M 1 Reply Last reply Reply Quote 0
                  • M
                    mrjeschke @Thomas Braun last edited by

                    @thomas-braun

                    Ja, das läuft jetzt wie es soll.

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

                      @mrjeschke

                      Hmmm, danke. Dann muss ich mal schauen wie das richtig umgesetzt werden kann.

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

                        @mrjeschke

                        Jetzt läuft iob diag, auch mit Warterei auf Tastatureingaben.

                        O M 2 Replies Last reply Reply Quote 1
                        • O
                          oFbEQnpoLKKl6mbY5e13 @Thomas Braun last edited by

                          @thomas-braun

                          Kann/darf man den Befehl auch bei laufenden iobroker ausführen?

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

                            @ofbeqnpolkkl6mby5e13

                            Ja, der liest nur Werte aus und schreibt nichts in die Konfig.
                            Wenn der iobroker läuft geht es etwas schneller, weil dann schon viel im RAM ist, was bei gestopptem iobroker erst noch geladen werden müsste.

                            Bei einem Bestandssystem muss nur einmal per

                            iobroker fix
                            

                            der aktuelle Stand geladen werden. Dafür muss der ioBroker natürlich wie üblich gestoppt sein.

                            1 Reply Last reply Reply Quote 2
                            • M
                              mrjeschke @Thomas Braun last edited by

                              @thomas-braun
                              Wenn ich

                              iob diag
                              

                              eingebe, läuft das Script immer noch ohne Stop durch.

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

                                @mrjeschke
                                Vorher

                                iobroker fix
                                

                                damit der richtige Aufruf geladen wird.

                                M 1 Reply Last reply Reply Quote 0
                                • M
                                  mrjeschke @Thomas Braun last edited by

                                  @thomas-braun
                                  Alles klar, jetzt läuft es.

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

                                    @mrjeschke
                                    Und legt dir auch ein Log nach

                                    /home/iobroker/iob_diag.log

                                    M 1 Reply Last reply Reply Quote 0
                                    • M
                                      mrjeschke @Thomas Braun last edited by

                                      @thomas-braun
                                      Ja, Log wird erstellt.

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

                                        @apollon77 said in Test ioBroker Fixer mit JSONL-Compression:

                                        Der Fixer ist jetzt auch unter Windows verfügbar! Wäre cool wenn ich da ggf auch Tester finden ...

                                        Also, wie schon im anderen Thread geschrieben, bekomme auch ich unter Windows den schon bekannten Fehler:

                                        F:\ioBrokerTest>npx @iobroker/fix
                                        Need to install the following packages:
                                          @iobroker/fix@4.2.1
                                        Ok to proceed? (y) y
                                        "(" kann syntaktisch an dieser Stelle nicht verarbeitet werden.
                                        

                                        Wenn ich jetzt das Package nicht per npx ausführe, sondern installiere

                                        F:\ioBrokerTest>npm install @iobroker/fix
                                        

                                        Und dann das Script direkt starte:

                                        F:\ioBrokerTest>node node_modules\@iobroker\fix\lib-npx\install.js fix
                                        

                                        Läuft der Fixer erstmal los(!?), meldet am Ende aber einen Fehler:

                                        Windows installation starting... (fixing = true)
                                        NPM version: 8.19.3
                                        Write "iobroker start" to start the ioBroker
                                        npm install node-windows@1.0.0-beta.8 --force --loglevel error --production --save --prefix "F:/ioBrokerTest"
                                        
                                        up to date, audited 524 packages in 9s
                                        
                                        36 packages are looking for funding
                                          run `npm fund` for details
                                        
                                        20 vulnerabilities (2 low, 16 moderate, 2 high)
                                        
                                        To address issues that do not require attention, run:
                                          npm audit fix
                                        
                                        To address all issues (including breaking changes), run:
                                          npm audit fix --force
                                        
                                        Run `npm audit` for details.
                                        
                                        =============================
                                        Running Admin shell
                                        =============================
                                        ioBroker wird beendet.
                                        ioBroker wurde erfolgreich beendet.
                                        
                                        ioBroker service is already installed.
                                        
                                        =============================
                                        Running Admin shell
                                        =============================
                                        ioBroker wird gestartet.
                                        ioBroker wurde erfolgreich gestartet.
                                        
                                        ioBroker service installed and started. Go to http://localhost:8081 to open the admin UI.
                                        To see the outputs do not start the service, but write "node node_modules/iobroker.js-controller/controller"
                                        NPM version: 8.19.3
                                        No path given, using F:\ioBrokerTest\iobroker-data
                                        Compressing F:\ioBrokerTest\iobroker-data\states.jsonl
                                        Cannot compress states.jsonl: Error: Failed to lock DB file "F:\ioBrokerTest\iobroker-data\states.jsonl"!
                                            at JsonlDB.open (C:\Users\OnkelAdmin\AppData\Local\npm-cache\_npx\36bee06d4228a674\node_modules\@alcalzone\jsonl-db\build\lib\db.js:185:19)
                                            at async compressDB (C:\Users\OnkelAdmin\AppData\Local\npm-cache\_npx\36bee06d4228a674\node_modules\@iobroker\jsonltool\index.js:37:9)
                                            at async main (C:\Users\OnkelAdmin\AppData\Local\npm-cache\_npx\36bee06d4228a674\node_modules\@iobroker\jsonltool\index.js:78:17)
                                        Compressing F:\ioBrokerTest\iobroker-data\objects.jsonl
                                        Cannot compress objects.jsonl: Error: Failed to lock DB file "F:\ioBrokerTest\iobroker-data\objects.jsonl"!
                                            at JsonlDB.open (C:\Users\OnkelAdmin\AppData\Local\npm-cache\_npx\36bee06d4228a674\node_modules\@alcalzone\jsonl-db\build\lib\db.js:185:19)
                                            at async compressDB (C:\Users\OnkelAdmin\AppData\Local\npm-cache\_npx\36bee06d4228a674\node_modules\@iobroker\jsonltool\index.js:37:9)
                                            at async main (C:\Users\OnkelAdmin\AppData\Local\npm-cache\_npx\36bee06d4228a674\node_modules\@iobroker\jsonltool\index.js:93:17)
                                        No relevant JSONL files found to compress, skip
                                        

                                        Hilft das irgendwie weiter?

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

                                          @gaspode iobroker gestoppt vorher? Cannot lock db heißt das die dB offen ist. Fixer darf nur laufen wenn gestoppt ist.

                                          Jetzt kapiere ich aber nicht warum es so „zu Fuß“ geht aber nicht direkt per npx. Das sollte genaueste gleiche tun 😞

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

                                            @apollon77 said in Test ioBroker Fixer mit JSONL-Compression:

                                            iobroker gestoppt vorher?

                                            Ja, ioBroker vorher mit iobroker stop gestoppt. Allerdings scheint er, wenn ich das Log richtig verstehe, unmittelbar vor der Komprimierung wieder gestartet zu werden (Zeile 29ff):

                                            ...
                                            =============================
                                            Running Admin shell
                                            =============================
                                            ioBroker wird gestartet.
                                            ioBroker wurde erfolgreich gestartet.
                                            ioBroker service installed and started. Go to http://localhost:8081 to open the admin UI.
                                            To see the outputs do not start the service, but write "node node_modules/iobroker.js-controller/controller"
                                            NPM version: 8.19.3
                                            No path given, using F:\ioBrokerTest\iobroker-data
                                            Compressing F:\ioBrokerTest\iobroker-data\states.jsonl
                                            ...
                                            

                                            @apollon77 said in Test ioBroker Fixer mit JSONL-Compression:

                                            Jetzt kapiere ich aber nicht warum es so „zu Fuß“ geht aber nicht direkt per npx. Das sollte genaueste gleiche tun

                                            Ich hatte das ja nur "zu Fuß" gemacht, weil ich hoffte, so die Stelle zu finden, wo etwas schief läuft. Hätte nicht erwartet, dass der Fixer dann startet.

                                            Der npx Aufruf mit --verbose liefert übrigens das hier:

                                            F:\ioBrokerTest>iobroker status
                                            iobroker is not running on this host.
                                            
                                            Objects type: jsonl
                                            States  type: jsonl
                                            
                                            F:\ioBrokerTest>npx --verbose @iobroker/fix
                                            npm verb cli C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js
                                            npm info using npm@8.19.3
                                            npm info using node@v16.19.0
                                            npm timing npm:load:whichnode Completed in 0ms
                                            npm timing config:load:defaults Completed in 2ms
                                            npm timing config:load:file:C:\Program Files\nodejs\node_modules\npm\npmrc Completed in 10ms
                                            npm timing config:load:builtin Completed in 11ms
                                            npm timing config:load:cli Completed in 2ms
                                            npm timing config:load:env Completed in 1ms
                                            npm timing config:load:file:F:\ioBrokerTest\.npmrc Completed in 1ms
                                            npm timing config:load:project Completed in 3ms
                                            npm timing config:load:file:C:\Users\OnkelAdmin\.npmrc Completed in 1ms
                                            npm timing config:load:user Completed in 1ms
                                            npm timing config:load:file:C:\Users\OnkelAdmin\AppData\Roaming\npm\etc\npmrc Completed in 0ms
                                            npm timing config:load:global Completed in 0ms
                                            npm timing config:load:validate Completed in 1ms
                                            npm timing config:load:credentials Completed in 1ms
                                            npm timing config:load:setEnvs Completed in 1ms
                                            npm timing config:load Completed in 25ms
                                            npm timing npm:load:configload Completed in 26ms
                                            npm timing npm:load:mkdirpcache Completed in 1ms
                                            npm timing npm:load:mkdirplogs Completed in 1ms
                                            npm verb title npm exec @iobroker/fix
                                            npm verb argv "exec" "--loglevel" "verbose" "--" "@iobroker/fix"
                                            npm timing npm:load:setTitle Completed in 2ms
                                            npm timing config:load:flatten Completed in 5ms
                                            npm timing npm:load:display Completed in 20ms
                                            npm verb logfile logs-max:10 dir:C:\Users\OnkelAdmin\AppData\Local\npm-cache\_logs
                                            npm verb logfile C:\Users\OnkelAdmin\AppData\Local\npm-cache\_logs\2023-01-14T08_15_41_665Z-debug-0.log
                                            npm timing npm:load:logFile Completed in 12ms
                                            npm timing npm:load:timers Completed in 0ms
                                            npm timing npm:load:configScope Completed in 0ms
                                            npm timing npm:load Completed in 67ms
                                            npm timing arborist:ctor Completed in 1ms
                                            npm verb shrinkwrap failed to load node_modules/.package-lock.json out of date, updated: node_modules/iobroker.js-controller
                                            "(" kann syntaktisch an dieser Stelle nicht verarbeitet werden.
                                            npm timing command:exec Completed in 938ms
                                            npm verb exit 255
                                            npm timing npm Completed in 1307ms
                                            npm verb code 255
                                            

                                            Hilf das evtl. weiter?

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

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            881
                                            Online

                                            31.9k
                                            Users

                                            80.1k
                                            Topics

                                            1.3m
                                            Posts

                                            15
                                            84
                                            5815
                                            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