Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Error/Bug
    4. Fehler bei SQL-Adapter

    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

    SOLVED Fehler bei SQL-Adapter

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

      Systemdata Bitte Ausfüllen
      Hardwaresystem: Raspberry Pi 4
      Arbeitsspeicher: 4GB
      Festplattenart: SD-Karte
      Betriebssystem: Raspian Buster Lite
      Node-Version: 10.17.0
      Nodejs-Version: 10.17.0
      NPM-Version: 6.11.3
      Installationsart: Manuell

      Hallo,
      ich bin mit meiner Installation auf den Raspberry Pi 4 umgezogen.
      Minimal Backup durchgeführt.
      Sobald ich den SQL-Adapter installiere kommen ohne Ende Fehlermeldungen.
      Auch wenn ich DANACH andere Adapter installieren möchte kommen diese Meldungen. Vor Installation des SQL-Adapters nicht!

      $ ./iobroker add sql  --host raspberrypi
      NPM version: 6.11.3npm install iobroker.sql@1.9.4 --loglevel error --prefix "/opt/iobroker" (System call)
      In file included from ../src/binding.cc:3:../../nan/nan.h: In function ‘void Nan::AsyncQueueWorker(Nan::AsyncWorker*)’:../../nan/nan.h:2298:62: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type]     , reinterpret_cast<uv_after_work_cb>(AsyncExecuteComplete)                                                              ^
      ../src/binding.cc: In static member function ‘static void Magic::DetectFile(const Nan::FunctionCallbackInfo<v8::Value>&)’:../src/binding.cc:184:59: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type]                                  (uv_after_work_cb)Magic::DetectAfter);                                                           ^~~~~~~~~~~
      ../src/binding.cc: In static member function ‘static void Magic::Detect(const Nan::FunctionCallbackInfo<v8::Value>&)’:../src/binding.cc:217:59: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type]                                  (uv_after_work_cb)Magic::DetectAfter);                                                           ^~~~~~~~~~~
      In file included from ../src/binding.cc:1:../src/binding.cc: At global scope:/home/iobroker/.cache/node-gyp/10.17.0/include/node/node.h:573:43: warning: cast between incompatible function types from ‘void (*)(v8::Local<v8::Object>)’ to ‘node::addon_register_func’ {aka ‘void (*)(v8::Local<v8::Object>, v8::Local<v8::Value>, void*)’} [-Wcast-function-type]       (node::addon_register_func) (regfunc),                          \                                           ^/home/iobroker/.cache/node-gyp/10.17.0/include/node/node.h:607:3: note: in expansion of macro ‘NODE_MODULE_X’   NODE_MODULE_X(modname, regfunc, NULL, 0)  // NOLINT (readability/null_usage)   ^~~~~~~~~~~~~../src/binding.cc:415:3: note: in expansion of macro ‘NODE_MODULE’   NODE_MODULE(magic, init);   ^~~~~~~~~~~
      In file included from /home/iobroker/.cache/node-gyp/10.17.0/include/node/node.h:63,                 from ../src/binding.cc:1:/home/iobroker/.cache/node-gyp/10.17.0/include/node/v8.h: In instantiation of ‘void v8::PersistentBase<T>::SetWeak(P*, typename v8::WeakCallbackInfo<P>::Callback, v8::WeakCallbackType) [with P = node::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo<P>::Callback = void (*)(const v8::WeakCallbackInfo<node::ObjectWrap>&)]’:/home/iobroker/.cache/node-gyp/10.17.0/include/node/node_object_wrap.h:84:78:   required from here/home/iobroker/.cache/node-gyp/10.17.0/include/node/v8.h:9502:16: warning: cast between incompatible function types from ‘v8::WeakCallbackInfo<node::ObjectWrap>::Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<node::ObjectWrap>&)’} to ‘Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<void>&)’} [-Wcast-function-type]                reinterpret_cast<Callback>(callback), type);                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      /home/iobroker/.cache/node-gyp/10.17.0/include/node/v8.h: In instantiation of ‘void v8::PersistentBase<T>::SetWeak(P*, typename v8::WeakCallbackInfo<P>::Callback, v8::WeakCallbackType) [with P = Nan::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo<P>::Callback = void (*)(const v8::WeakCallbackInfo<Nan::ObjectWrap>&)]’:../../nan/nan_object_wrap.h:65:61:   required from here/home/iobroker/.cache/node-gyp/10.17.0/include/node/v8.h:9502:16: warning: cast between incompatible function types from ‘v8::WeakCallbackInfo<Nan::ObjectWrap>::Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<Nan::ObjectWrap>&)’} to ‘Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<void>&)’} [-Wcast-function-type]
      Release/obj/gen/sqlite-autoconf-3280000/sqlite3.c: In function ‘strftimeFunc’:
      Release/obj/gen/sqlite-autoconf-3280000/sqlite3.c:14137:27: warning: cast between incompatible function types from ‘int (*)(void *)’ to ‘void (*)(void *)’ [-Wcast-function-type] #define SQLITE_DYNAMIC   ((sqlite3_destructor_type)sqlite3MallocSize)                           ^Release/obj/gen/sqlite-autoconf-3280000/sqlite3.c:22052:52: note: in expansion of macro ‘SQLITE_DYNAMIC’                       z==zBuf ? SQLITE_TRANSIENT : SQLITE_DYNAMIC);                                                    ^~~~~~~~~~~~~~
      Release/obj/gen/sqlite-autoconf-3280000/sqlite3.c: In function ‘sqlite3ErrorWithMsg’:
      Release/obj/gen/sqlite-autoconf-3280000/sqlite3.c:14137:27: warning: cast between incompatible function types from ‘int (*)(void *)’ to ‘void (*)(void *)’ [-Wcast-function-type] #define SQLITE_DYNAMIC   ((sqlite3_destructor_type)sqlite3MallocSize)                           ^Release/obj/gen/sqlite-autoconf-3280000/sqlite3.c:30393:54: note: in expansion of macro ‘SQLITE_DYNAMIC’     sqlite3ValueSetStr(db->pErr, -1, z, SQLITE_UTF8, SQLITE_DYNAMIC);                                                      ^~~~~~~~~~~~~~
      

      und so weiter.

      Später dann im Log folgendes:

      sql.0	2019-11-24 23:15:45.253	error	(17679) TypeError: Cannot read property 'borrow' of undefined
      sql.0	2019-11-24 23:15:45.252	error	(17679) Selected SQL DB was not installed properly: "sqlite". SQLite requires build tools on system. See README.md
      
      arteck 1 Reply Last reply Reply Quote 0
      • arteck
        arteck Developer Most Active @Andre 0 last edited by

        @Andre-0

        node -v
        nodejs -v
        

        asugabe posten bitte

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

          pi@raspberrypi:~ $ node -v
          v10.17.0
          pi@raspberrypi:~ $ nodejs -v
          v10.17.0
          
          1 Reply Last reply Reply Quote 0
          • apollon77
            apollon77 last edited by

            Bitte vollständiges log Posten. „Und so weiter“ ist hier leider genau nicht hilfreich.

            Scheinbar wird SQLite nicht sauber installiert. Und ja, wenn das so ist dann versucht npm das danach bei jeder weiteren Installation von etwas anderem immer zu korrigieren weil npm immer den „gesamten Abhängigkeitsbaum“ anschaut und fixen will.

            1 Reply Last reply Reply Quote 0
            • H
              heli last edited by

              Hallo zusammen,
              ich hänge mich hier mal dran da mich das gleich Problem plagt. Frische Buster Installation auf einem neuen Raspi 4, aber jede Adapter-Installation oder Update dauert ewig lange und führt, am Beispiel der Telegram-Aktualisierung zu folgenden Log-Einträgen, hier nur ein kurzer Auszug da der Post sonst zu lang und daher nicht veröffentlicht wird.

              ⁃	2019-12-13 18:17:48.244 - info: host.raspi4 iobroker NPM version: 6.13.2npm install iobroker.telegram@1.4.6 --loglevel error --prefix "/opt/iobroker" (System call)
              	⁃	2019-12-13 18:18:22.703 - info: host.raspi4 iobroker Release/obj/gen/sqlite-autoconf-3300100/sqlite3.c: In function ‘strftimeFunc’:Release/obj/gen/sqlite-autoconf-3300100/sqlite3.c:14234:27: warning: cast between incompatible function types from ‘int (*)(void *)’ to ‘void (*)(void *)’ [-Wcast-function-type] #define SQLITE_DYNAMIC ((sqlite3_destructor_type)sqlite3MallocSize) ^Release/obj/gen/sqlite-autoconf-3300100/sqlite3.c:22212:52: note: in expansion of macro ‘SQLITE_DYNAMIC’ z==zBuf ? SQLITE_TRANSIENT : SQLITE_DYNAMIC); ^~~~~~~~~~~~~~
              	⁃	2019-12-13 18:18:22.864 - info: host.raspi4 iobroker Release/obj/gen/sqlite-autoconf-3300100/sqlite3.c: In function ‘sqlite3ErrorWithMsg’:
              	⁃	2019-12-13 18:18:22.870 - info: host.raspi4 iobroker Release/obj/gen/sqlite-autoconf-3300100/sqlite3.c:14234:27: warning: cast between incompatible function types from ‘int (*)(void *)’ to ‘void (*)(void *)’ [-Wcast-function-type] #define SQLITE_DYNAMIC ((sqlite3_destructor_type)sqlite3MallocSize) ^Release/obj/gen/sqlite-autoconf-3300100/sqlite3.c:30555:54: note: in expansion of macro ‘SQLITE_DYNAMIC’ sqlite3ValueSetStr(db->pErr, -1, z, SQLITE_UTF8, SQLITE_DYNAMIC); ^~~~~~~~~~~~~~
              	⁃	2019-12-13 18:18:25.255 - info: host.raspi4 iobroker Release/obj/gen/sqlite-autoconf-3300100/sqlite3.c: In function ‘sqlite3VdbeMemSetStr’:
              	⁃	2019-12-13 18:18:25.266 - info: host.raspi4 iobroker Release/obj/gen/sqlite-autoconf-3300100/sqlite3.c:14234:27: warning: cast between incompatible function types from ‘int (*)(void *)’ to ‘void (*)(void *)’ [-Wcast-function-type] #define SQLITE_DYNAMIC ((sqlite3_destructor_type)sqlite3MallocSize) ^Release/obj/gen/sqlite-autoconf-3300100/sqlite3.c:75784:15: note: in expansion of macro ‘SQLITE_DYNAMIC’ if( xDel==SQLITE_DYNAMIC ){ ^~~~~~~~~~~~~~
              	⁃	2019-12-13 18:18:25.309 - info: host.raspi4 iobroker Release/obj/gen/sqlite-autoconf-3300100/sqlite3.c: In function ‘valueFromExpr’:
              	⁃	2019-12-13 18:18:25.320 - info: host.raspi4 iobroker Release/obj/gen/sqlite-autoconf-3300100/sqlite3.c:14234:27: warning: cast between incompatible function types from ‘int (*)(void *)’ to ‘void (*)(void *)’ [-Wcast-function-type] #define SQLITE_DYNAMIC ((sqlite3_destructor_type)sqlite3MallocSize) ^Release/obj/gen/sqlite-autoconf-3300100/sqlite3.c:76190:55: note: in expansion of macro ‘SQLITE_DYNAMIC’ sqlite3ValueSetStr(pVal, -1, zVal, SQLITE_UTF8, SQLITE_DYNAMIC); ^~~~~~~~~~~~~~
              	⁃	2019-12-13 18:18:25.361 - info: host.raspi4 iobroker Release/obj/gen/sqlite-autoconf-3300100/sqlite3.c:14234:27: warning: cast between incompatible function types from ‘int (*)(void *)’ to ‘void (*)(void *)’ [-Wcast-function-type] #define SQLITE_DYNAMIC ((sqlite3_destructor_type)sqlite3MallocSize) ^Release/obj/gen/sqlite-autoconf-3300100/sqlite3.c:76238:29: note: in expansion of macro ‘SQLITE_DYNAMIC’ 0, SQLITE_DYNAMIC); ^~~~~~~~~~~~~~
              	⁃	2019-12-13 18:18:27.819 - info: host.raspi4 iobroker Release/obj/gen/sqlite-autoconf-3300100/sqlite3.c: In function ‘sqlite3VdbeExec’:
              	⁃	2019-12-13 18:18:27.826 - info: host.raspi4 iobroker Release/obj/gen/sqlite-autoconf-3300100/sqlite3.c:91559:38: warning: cast between incompatible function types from ‘int (*)(u32, void *, void *, void *)’ {aka ‘int (*)(unsigned int, void *, void *, void *)’} to ‘void (*)(void *, const char *)’ [-Wcast-function-type] void (*x)(void*,const char*) = (void(*)(void*,const char*))db->xTrace; ^
              	⁃	2019-12-13 18:18:33.279 - info: host.raspi4 iobroker Release/obj/gen/sqlite-autoconf-3300100/sqlite3.c: In function ‘printfFunc’:
              	⁃	2019-12-13 18:18:33.297 - info: host.raspi4 iobroker Release/obj/gen/sqlite-autoconf-3300100/sqlite3.c:14234:27: warning: cast between incompatible function types from ‘int (*)(void *)’ to ‘void (*)(void *)’ [-Wcast-function-type] #define SQLITE_DYNAMIC ((sqlite3_destructor_type)sqlite3MallocSize) ^Release/obj/gen/sqlite-autoconf-3300100/sqlite3.c:114219:25: note: in expansion of macro ‘SQLITE_DYNAMIC’ SQLITE_DYNAMIC); ^~~~~~~~~~~~~~
              	⁃	2019-12-13 18:18:36.362 - info: host.raspi4 iobroker Release/obj/gen/sqlite-autoconf-3300100/sqlite3.c: In function ‘generateColumnNames’:
              	⁃	2019-12-13 18:18:36.383 - info: host.raspi4 iobroker Release/obj/gen/sqlite-autoconf-3300100/sqlite3.c:14234:27: warning: cast between incompatible function types from ‘int (*)(void *)’ to ‘void (*)(void *)’ [-Wcast-function-type] #define SQLITE_DYNAMIC ((sqlite3_destructor_type)sqlite3MallocSize) ^Release/obj/gen/sqlite-autoconf-3300100/sqlite3.c:127513:58: note: in expansion of macro ‘SQLITE_DYNAMIC’ sqlite3VdbeSetColName(v, i, COLNAME_NAME, zName, SQLITE_DYNAMIC); ^~~~~~~~~~~~~~
              	⁃	2019-12-13 18:18:36.403 - info: host.raspi4 iobroker Release/obj/gen/sqlite-autoconf-3300100/sqlite3.c:14234:27: warning: cast between incompatible function types from ‘int (*)(void *)’ to ‘void (*)(void *)’ [-Wcast-function-type] #define SQLITE_DYNAMIC ((sqlite3_destructor_type)sqlite3MallocSize) ^Release/obj/gen/sqlite-autoconf-3300100/sqlite3.c:127520:52: note: in expansion of macro ‘SQLITE_DYNAMIC’ sqlite3VdbeSetColName(v, i, COLNAME_NAME, z, SQLITE_DYNAMIC); ^~~~~~~~~~~~~~
              	⁃	2019-12-13 18:18:45.955 - info: host.raspi4 iobroker Release/obj/gen/sqlite-autoconf-3300100/sqlite3.c: In function ‘sqlite3InvokeBusyHandler’:
              	⁃	2019-12-13 18:18:45.967 - info: host.raspi4 iobroker Release/obj/gen/sqlite-autoconf-3300100/sqlite3.c:157821:12: warning: cast between incompatible function types from ‘int (*)(void *, int)’ to ‘int (*)(void *, int, sqlite3_file *)’ {aka ‘int (*)(void *, int, struct sqlite3_file *)’} [-Wcast-function-type] xTra = (int(*)(void*,int,sqlite3_file*))p->xBusyHandler; ^
              	⁃	2019-12-13 18:18:45.969 - info: host.raspi4 iobroker Release/obj/gen/sqlite-autoconf-3300100/sqlite3.c: In function ‘sqlite3_busy_timeout’:
              	⁃	2019-12-13 18:18:45.980 - info: host.raspi4 iobroker Release/obj/gen/sqlite-autoconf-3300100/sqlite3.c:157899:30: warning: cast between incompatible function types from ‘int (*)(void *, int, sqlite3_file *)’ {aka ‘int (*)(void *, int, struct sqlite3_file *)’} to ‘int (*)(void *, int)’ [-Wcast-function-type] sqlite3_busy_handler(db, (int(*)(void*,int))sqliteDefaultBusyCallback, ^
              
              

              Ausgabe von node -v und nodejs -v ergibt in beiden Fällen:

              pi@raspi4:~ $ node -v
              v10.15.2
              pi@raspi4:~ $ nodejs -v
              v10.15.2
              

              Hat zufällig jemand einen Tip oder eine Idee was ich unternehmen muss um den neuen Raspi von einer sauberen Arbeitsweise zu überzeugen? 😉

              Viele Grüße
              Norbert

              Homoran apollon77 2 Replies Last reply Reply Quote 0
              • Homoran
                Homoran Global Moderator Administrators @heli last edited by

                @heli sagte in Fehler bei SQL-Adapter:

                pi@raspi4:~ $ node -v v10.15.2

                Wie kommst du an diese Version?
                https://github.com/nodejs/help/issues/1877

                Nach aktueller Installation müsstest du 10.17.0 haben.
                Die 10.15.2 deutet auf einen Fehler bei der node.js Installation

                aguilared created this issue in nodejs/help

                closed npm does not support Node.js v10.15.2 #1877

                H 1 Reply Last reply Reply Quote 0
                • H
                  heli @Homoran last edited by

                  @Homoran said in Fehler bei SQL-Adapter:

                  10.17.0

                  Hm, keine Ahnung wie ich an die gekommen bin. Aber ich habe jetzt mal auf 10.17.0 geschubst und bin gespannt wie sich das System jetzt bei den nächsten Aktualisierungen verhält und melde mich dann wieder.

                  Danke schön!

                  Norbert

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

                    @heli sagte in Fehler bei SQL-Adapter:

                    ich habe jetzt mal auf 10.17.0 geschubst

                    Bist du sicher?
                    nicht dass du jetzt zwei node.js Versionen parallel drauf hast

                    H 1 Reply Last reply Reply Quote 0
                    • H
                      heli @Homoran last edited by

                      @Homoran

                      pi@raspi4:/opt/iobroker $ node -v
                      v10.17.0
                      pi@raspi4:/opt/iobroker $ nodejs -v
                      v10.17.0
                      pi@raspi4:/opt/iobroker $ 
                      

                      Klingt doch gut, oder?

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

                        @heli ja, und npm -v?

                        1 Reply Last reply Reply Quote 0
                        • H
                          heli last edited by Negalein

                          pi@raspi4:~ $ npm -v
                          6.13.4
                          pi@raspi4:~ $
                          
                          1 Reply Last reply Reply Quote 0
                          • apollon77
                            apollon77 @heli last edited by

                            @heli ist das log vollständig??

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

                              @apollon77 Nein, das vollständige Log passte hier nicht rein. Dann wurde die zulässige Postlänge überschritten.

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

                                Ich habe noch einmal versucht nur den relevanten Teil des Logs hier reinzuschreiben, aber ich überschreite damit immer die maximal zulässige Zeichenzahl eines Posts.....max. 10000 Zeichen möglich. Das reicht bei weitem nicht um das Log hier darzustellen.
                                Ich traue mich derzeit nicht den Admin-Adaptaper upzudaten. 😉

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

                                  @heli attache es doch als file 😉

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

                                    @apollon77 Log.txt

                                    Ich war gerade dabei es zu erstellen. 😉

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

                                      @heli said in Fehler bei SQL-Adapter:

                                      @apollon77 Log.txt

                                      Ich war gerade dabei es zu erstellen. 😉

                                      Hier ist jetzt nur der relevante Teil (Update des Telegram-Adapters) dargestellt. Das war allerdings noch vor dem node-Versionswechsel!

                                      1 Reply Last reply Reply Quote 0
                                      • H
                                        heli last edited by heli

                                        Guten Morgen,
                                        da heute wieder Updates anstanden (Backitup-Adapter) kann ich mitteilen dass das Problem leider noch nicht behoben ist. Auch nach dem node-Versionswechsel kommen immer noch die im oben angehängten Log zu sehenden Fehlermeldungen.
                                        Gibt es noch Ideen oder Lösungsansätze?
                                        Danke schön!

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

                                          Naja irgendwie scheint SQLite bei dir nicht ordentlich gebaut zu werden und deswegen macht er es immer wieder.

                                          Schau mal in /opt/iobroker/node_modules/sqlite3 oder /opt/iobroker/node_modules/iobroker.sql/node_modules/sqlite3 ( es sollte nur eins der beiden da sein)

                                          Und führe mal in dem Verzeichnis dann das Kommando „npm rebuild“ aus. Das volle log davon bitte posten.

                                          1 Reply Last reply Reply Quote 0
                                          • H
                                            heli last edited by

                                            @apollon77 said in Fehler bei SQL-Adapter:

                                            /opt/iobroker/node_modules/iobroker.sql/node_modules/s

                                            Ich glaube wir kommen der Sache näher: ich habe keines der beiden Verzeichnisse in meiner Installation.....

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

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            775
                                            Online

                                            31.7k
                                            Users

                                            79.9k
                                            Topics

                                            1.3m
                                            Posts

                                            sql
                                            8
                                            40
                                            1949
                                            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