Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Error/Bug
    4. ioBroker failed to lock DB file

    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

    ioBroker failed to lock DB file

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

      Systemdata
      Hardwaresystem: PI3
      Arbeitsspeicher: 1GB
      Festplattenart: SD-Karte
      Betriebssystem: Raspbian GNU/Linux 9.13 (stretch)
      Node-Version: v14.20.0
      Nodejs-Version: v14.20.0
      NPM-Version: 6.14.17
      Installationsart: Skript
      Image genutzt:
      Ort/Name der Imagedatei:

      Hallo,

      mir ist gerade aufgefallen, dass ich die WebUI meines ioBrokers nicht mehr öffnen kann. Da mein Telegram-Adapter wöchentlich neugestartet wird, muss dieser Zustand im Laufe der letzten Woche eingetreten sein. An dem ioBroker System habe ich die letzten Monate nichts geändert.

      Ich habe bereits einiges hier im Forum durchsucht, gelesen und getestet, komme aber nicht weiter.

      Laut Log scheint es eine Boot Loop zu geben:

      2022-07-16 16:33:05.542  - ^[[32minfo^[[39m: host.raspberrypi iobroker _restart
      2022-07-16 16:33:12.679  - ^[[32minfo^[[39m: host.raspberrypi iobroker.js-controller version 4.0.15 js-controller starting
      2022-07-16 16:33:12.691  - ^[[32minfo^[[39m: host.raspberrypi Copyright (c) 2014-2022 bluefox, 2014 hobbyquaker
      2022-07-16 16:33:12.693  - ^[[32minfo^[[39m: host.raspberrypi hostname: raspberrypi, node: v14.20.0
      2022-07-16 16:33:12.694  - ^[[32minfo^[[39m: host.raspberrypi ip addresses: 192.168.178.54 fe80::1a4e:f18e:d0d1:d9f8 192.168.178.55 fe80::c5a1:696e:cdc6:ffa0
      2022-07-16 16:33:42.769  - ^[[31merror^[[39m: host.raspberrypi No connection to databases possible, restart
      2022-07-16 16:33:42.799  - ^[[32minfo^[[39m: host.raspberrypi iobroker _restart
      

      Das Timeout in der iobroker.json habe ich auf 30000 gesetzt.

      Folgendes noch zur Info:

      pi@raspberrypi:/opt/iobroker/log $ which nodejs node npm && nodejs -v && node -v && npm -v && whoami && pwd && sudo apt update &> /dev/null && sudo apt update && apt policy nodejs
      /usr/bin/nodejs
      /usr/bin/node
      /usr/bin/npm
      v14.20.0
      v14.20.0
      6.14.17
      pi
      /opt/iobroker/log
      OK:1 http://raspbian.raspberrypi.org/raspbian stretch InRelease
      OK:2 http://archive.raspberrypi.org/debian stretch InRelease
      OK:3 https://deb.nodesource.com/node_14.x stretch InRelease
      Paketlisten werden gelesen... Fertig
      Abhängigkeitsbaum wird aufgebaut.
      Statusinformationen werden eingelesen.... Fertig
      Alle Pakete sind aktuell.
      nodejs:
        Installiert:           14.20.0-1nodesource1
        Installationskandidat: 14.20.0-1nodesource1
        Versionstabelle:
       *** 14.20.0-1nodesource1 500
              500 https://deb.nodesource.com/node_14.x stretch/main armhf Packages
              100 /var/lib/dpkg/status
           8.11.1~dfsg-2~bpo9+1 500
              500 http://archive.raspberrypi.org/debian stretch/main armhf Packages
           4.8.2~dfsg-1 500
              500 http://raspbian.raspberrypi.org/raspbian stretch/main armhf Packages
      
      pi@raspberrypi:/opt/iobroker/log $ sudo netstat -tulpen
      Aktive Internetverbindungen (Nur Server)
      Proto Recv-Q Send-Q Local Address           Foreign Address         State       Benutzer   Inode      PID/Program name
      tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      0          11785      544/sshd
      tcp6       0      0 :::22                   :::*                    LISTEN      0          11787      544/sshd
      udp        0      0 0.0.0.0:5353            0.0.0.0:*                           108        11257      376/avahi-daemon: r
      udp        0      0 0.0.0.0:46423           0.0.0.0:*                           108        11259      376/avahi-daemon: r
      udp        0      0 0.0.0.0:68              0.0.0.0:*                           0          10014      525/dhcpcd
      udp6       0      0 :::5353                 :::*                                108        11258      376/avahi-daemon: r
      udp6       0      0 :::56341                :::*                                108        11260      376/avahi-daemon: r
      

      Hier wundert mich warum das beta repository angegeben wird:

      pi@raspberrypi:~ $ iobroker update -i
      Used repository: beta
      Adapter    "admin"        : 6.2.1    , installed 5.3.1  [Updatable]
      Adapter    "backitup"     : 2.4.10   , installed 2.3.5  [Updatable]
      Adapter    "ble"          : 0.13.0   , installed 0.12.0 [Updatable]
      Adapter    "bshb"         : 0.1.20   , installed 0.1.16 [Updatable]
      Adapter    "discovery"    : 3.0.5    , installed 2.8.0  [Updatable]
      Adapter    "flot"         : 1.11.0   , installed 1.10.7 [Updatable]
      Adapter    "fritzbox"     : 0.5.0    , installed 0.2.1  [Updatable]
      Adapter    "fritzdect"    : 2.2.3    , installed 2.2.3
      Adapter    "hm-rega"      : 3.0.40   , installed 3.0.37 [Updatable]
      Adapter    "hm-rpc"       : 1.15.12  , installed 1.15.8 [Updatable]
      Adapter    "hue"          : 3.7.1    , installed 3.6.5  [Updatable]
      Adapter    "info"         : 1.9.19   , installed 1.9.19
      Adapter    "javascript"   : 5.8.10   , installed 5.3.3  [Updatable]
      Controller "js-controller": 4.0.23   , installed 4.0.15 [Updatable]
      Adapter    "mihome-lamp"  : 1.1.0    , installed 1.1.0
      Adapter    "pushover"     : 3.0.2    , installed 2.1.0  [Updatable]
      Adapter    "rpi2"         : 1.3.2    , installed 1.3.2
      Adapter    "simple-api"   : 2.7.0    , installed 2.6.3  [Updatable]
      Adapter    "socketio"     : 6.1.8    , installed 4.1.4  [Updatable]
      Adapter    "sonos"        : 2.2.3    , installed 2.1.7  [Updatable]
      Adapter    "sql"          : 2.1.7    , installed 1.16.2 [Updatable]
      Adapter    "telegram"     : 1.14.1   , installed 1.11.1 [Updatable]
      Adapter    "terminal"     : 0.2.6    , installed 0.1.2  [Updatable]
      Adapter    "vis"          : 1.4.15   , installed 1.4.12 [Updatable]
      Adapter    "web"          : 5.2.4    , installed 4.2.0  [Updatable]
      Adapter    "ws"           : 2.1.3    , installed 1.2.0  [Updatable]
      Adapter    "yahka"        : 0.13.1   , installed 0.13.1
      Adapter    "zigbee"       : 1.7.5    , installed 1.6.16 [Updatable]
      

      Deshalb habe ich versucht das stable repo zu nutzen, bekomme aber auch einen Fehler:

      pi@raspberrypi:/opt/iobroker/log $ iobroker update https://repo.iobroker.live/sources-dist.json -u
      Used repository: https://repo.iobroker.live/sources-dist.json
      Error: unknown repository is active - "https://repo.iobroker.live/sources-dist.json". Known: stable, beta
      pi@raspberrypi:/opt/iobroker/log $ iobroker update -u
      Server Cannot start inMem-objects on port 9001: Failed to lock DB file "/opt/iobroker/iobroker-data/objects.jsonl"!
      

      Pakete Updates habe ich gemacht, ein "iobroker fix" ausprobiert und diverse reboots.
      So langsam gehen mir die Ideen aus.

      Was kann ich noch ausprobieren?

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

        @marox

        ls -lh /opt/iobroker/iobroker-data/
        
        M 1 Reply Last reply Reply Quote 0
        • M
          marox @Thomas Braun last edited by

          @thomas-braun sagte in ioBroker failed to lock DB file:

          ls -lh /opt/iobroker/iobroker-data/

          pi@raspberrypi:/opt/iobroker/log $ ls -lh /opt/iobroker/iobroker-data/
          insgesamt 585M
          drwxrwxr-x+  2 iobroker iobroker 4,0K Mär 11 17:49 backitup
          drwxrwxrwx+  2 iobroker iobroker  12K Jul  8 20:03 backup-objects
          drwxrwxrwx+ 34 iobroker iobroker 4,0K Mär 11 17:55 files
          -rwxrwxrwx+  1 iobroker iobroker 3,6K Jul 16 13:44 iobroker.json
          -rw-rwxr--+  1 iobroker iobroker  119 Feb 25 22:55 notifications.json
          -rw-rwxr--+  1 iobroker iobroker 6,0M Feb 25 22:49 objects.json.bak.migrated
          -rw-rwxr--+  1 iobroker iobroker 563M Jul 16 16:05 objects.jsonl
          drwxrwxr-x+  2 iobroker iobroker 4,0K Jul 16 18:28 objects.jsonl.lock
          -rw-rwxr--+  1 iobroker iobroker 6,0M Feb 25 22:49 objects.json.migrated
          drwxrwxrwx+  2 iobroker iobroker 176K Jul  5 22:15 sonosCache
          drwxrwxrwx+  2 iobroker iobroker 4,0K Jan 22  2019 sqlite
          -rw-rwxr--+  1 iobroker iobroker 751K Feb 25 22:48 states.json.bak.migrated
          -rw-rwxr--+  1 iobroker iobroker 7,7M Jul 16 16:05 states.jsonl
          -rw-rwxr--+  1 iobroker iobroker 751K Feb 25 22:49 states.json.migrated
          drwxrwxr-x+  3 iobroker iobroker 4,0K Feb 26 23:10 tmp
          drwxrwxrwx+  2 iobroker iobroker 4,0K Dez 29  2018 yahka.0.hapdata
          drwxrwxr-x+  2 iobroker iobroker 4,0K Jul  8 21:04 zigbee_02
          
          Thomas Braun 1 Reply Last reply Reply Quote 0
          • Thomas Braun
            Thomas Braun Most Active @marox last edited by

            @marox

            Zuerst mal dein System von der frühen Kreidezeit in die Gegenwart holen.

            Stretch ist tot, der Nach-Nachfolger 'Bullseye' ist aktuell.

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

              @thomas-braun

              bullseye läuft jetzt. Ich würde sagen das Fehlerbild ist unverändert.

              pi@raspberrypi:/opt/iobroker/log $ iobroker status
              Server Cannot start inMem-objects on port 9001: Failed to lock DB file "/opt/iobroker/iobroker-data/objects.jsonl"!
              
              Thomas Braun 1 Reply Last reply Reply Quote 0
              • Thomas Braun
                Thomas Braun Most Active @marox last edited by Thomas Braun

                @marox

                Die objects.jsonl dürfte auch für ein 1GB RAM - System etwas sperrig sein:

                -rw-rwxr--+  1 iobroker iobroker 563M Jul 16 16:05 objects.jsonl
                

                Was könnte denn da für so viele objects sorgen?

                Der ble-Adapter ist/war da so ein Kandidat für...

                Schau dir das mal an:

                https://forum.iobroker.net/topic/56379/zu-viele-objekte/3

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

                  @thomas-braun

                  Aus den Ausgaben werde ich nicht richtig schlau:

                  pi@raspberrypi:/opt/iobroker/log $ iobroker list objects ble.0.* | wc -l
                  1
                  pi@raspberrypi:/opt/iobroker/log $ iobroker list objects hm-rpc.0.* | wc -l
                  1
                  pi@raspberrypi:/opt/iobroker/log $ iobroker list objects system.adapter.hm-rpc.0.* | wc -l
                  1
                  

                  Ich habe die objects.jsonl mal im Editor geöffnet und überflogen. Ich würde sagen, dass von 20.000 Zeilen mindestens 10.000 wie folgt beginnen:
                  {"k":"system.adapter.hm-rpc...

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

                    @marox

                    Bei mir werden da die Zeilen = Anzahl der Objekte gezählt:

                    echad@chet:/opt/iobroker $ iobroker list objects parcel.0.* | wc -l
                    365
                    echad@chet:/opt/iobroker $ iobroker list objects ble.0.* | wc -l
                    13
                    echad@chet:/opt/iobroker $ iobroker list objects admin.0.* | wc -l
                    17
                    echad@chet:/opt/iobroker $
                    
                    1 Reply Last reply Reply Quote 0
                    • M
                      marox last edited by

                      @thomas-braun

                      Dann bin ich überfragt, warum für jede Abfrage die Anzahl 1 zurückgegeben wird.

                      Ich überlege, ob ich ioBroker neu aufsetzen sollte. Über backitup habe ich ein Standard Backup, leider ist es einige Zeit alt, aber seit dem war ich nicht am System dran.
                      Oder kann ich von dem jetzigen ioBroker in dem Zustand noch ein sinnvolles Backup machen?

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

                        @marox sagte in ioBroker failed to lock DB file:

                        Über backitup habe ich ein Standard Backup, leider ist es einige Zeit alt, aber seit dem war ich nicht am System dran.

                        So alt wie das OS? Auf welchem Datenbankformat setzt das Backup auf?

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

                          @thomas-braun

                          Nein vom Februar 2022, da habe ich zuletzt alle Adapter, nodejs, etc. aktualisiert anschließend ein standard backup über backitup auf mein NAS gemacht.

                          Das OS hab ich nur nie angefasst, weil es (bis heute) keine Probleme gab.

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

                            @marox sagte in ioBroker failed to lock DB file:

                            Nein vom Februar 2022, da habe ich zuletzt alle Adapter, nodejs, etc. aktualisiert anschließend ein standard backup über backitup auf mein NAS gemacht.

                            Dann spiel das ein.

                            Das OS hab ich nur nie angefasst, weil es (bis heute) keine Probleme gab.

                            Schlechte Taktik.

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

                              @thomas-braun

                              Jetzt hab ist zumindest die Web-UI wieder erreichbar.
                              Während des restore zeigte das Terminal noch
                              clean 2603 objects...
                              clean 1940 states...

                              Ganz so viele Objekte haben sich dann in den 563MB nicht versteckt.
                              Danke soweit!

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

                              Support us

                              ioBroker
                              Community Adapters
                              Donate

                              690
                              Online

                              31.8k
                              Users

                              80.0k
                              Topics

                              1.3m
                              Posts

                              2
                              13
                              1468
                              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