Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Einsteigerfragen
    4. Nodejs Problem

    NEWS

    • Monatsrückblick – September 2025

    • Neues Video "KI im Smart Home" - ioBroker plus n8n

    • Neues Video über Aliase, virtuelle Geräte und Kategorien

    Nodejs Problem

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

      Hallo,

      meine bisher funktionierende Javascript-Datei startet nicht mehr mit der Fehlermeldung "instanz ist deaktiviert. Ein iob-diag zeigte aber ein Problem mit nodejs.

      ======== Start marking the full check here =========
      
      
      Skript v.2023-10-10
      
      *** BASE SYSTEM ***
         Static hostname: RaspiEnergie
         Pretty hostname: Raspi_Energie
               Icon name: computer
        Operating System: Debian GNU/Linux 11 (bullseye)
                  Kernel: Linux 6.1.21-v8+
            Architecture: arm64
      
      Model           : Raspberry Pi 4 Model B Rev 1.5
      Docker          : false
      Virtualization  : none
      Kernel          : aarch64
      Userland        : arm64
      
      Systemuptime and Load:
       22:41:43 up 15 min,  1 user,  load average: 0.81, 0.62, 0.49
      CPU threads: 4
      
      
      *** RASPBERRY THROTTLING ***
      Current issues:
      No throttling issues detected.
      
      Previously detected issues:
      No throttling issues detected.
      
      *** Time and Time Zones ***
                     Local time: Mon 2024-01-29 22:41:44 CET
                 Universal time: Mon 2024-01-29 21:41:44 UTC
                       RTC time: n/a
                      Time zone: Europe/Berlin (CET, +0100)
      System clock synchronized: yes
                    NTP service: active
                RTC in local TZ: no
      
      *** User and Groups ***
      ip
      /home/ip
      ip adm dialout cdrom sudo audio video plugdev games users input render netdev lpadmin gpio i2c spi iobroker
      
      *** X-Server-Setup ***
      X-Server:       false
      Desktop:
      Terminal:       tty
      Boot Target:    multi-user.target
      
      *** MEMORY ***
                     total        used        free      shared  buff/cache   available
      Mem:            3.8G        1.3G        1.1G        1.0M        1.4G        2.4G
      Swap:             0B          0B          0B
      Total:          3.8G        1.3G        1.1G
      
               3793 M total memory
               1349 M used memory
               2408 M active memory
                187 M inactive memory
               1065 M free memory
                 48 M buffer memory
               1329 M swap cache
                  0 M total swap
                  0 M used swap
                  0 M free swap
      
      Raspberry only:
      oom events: 0
      lifetime oom required: 0 Mbytes
      total time in oom handler: 0 ms
      max time spent in oom handler: 0 ms
      
      *** FAILED SERVICES ***
      
        UNIT                   LOAD   ACTIVE SUB    DESCRIPTION
      * dphys-swapfile.service loaded failed failed dphys-swapfile - set up, mount/unmount, and delete a swap file
      
      LOAD   = Reflects whether the unit definition was properly loaded.
      ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
      SUB    = The low-level unit activation state, values depend on unit type.
      1 loaded units listed.
      
      *** FILESYSTEM ***
      Filesystem     Type      Size  Used Avail Use% Mounted on
      /dev/root      ext4      118G   40G   73G  36% /
      devtmpfs       devtmpfs  1.7G     0  1.7G   0% /dev
      tmpfs          tmpfs     1.9G     0  1.9G   0% /dev/shm
      tmpfs          tmpfs     759M  1.2M  758M   1% /run
      tmpfs          tmpfs     5.0M  4.0K  5.0M   1% /run/lock
      /dev/sda1      vfat      255M   31M  225M  13% /boot
      tmpfs          tmpfs     380M   16K  380M   1% /run/user/1000
      
      Messages concerning ext4 filesystem in dmesg:
      [Mon Jan 29 22:26:38 2024] Kernel command line: coherent_pool=1M 8250.nr_uarts=1 snd_bcm2835.enable_headphones=0 snd_bcm2835.enable_headphones=1 snd_bcm2835.enable_hdmi=1 snd_bcm2835.enable_hdmi=0  smsc95xx.macaddr=D8:3A:DD:55:53:E5 vc_mem.mem_base=0x3eb00000 vc_mem.mem_size=0x3ff00000  console=tty1 root=PARTUUID=1b96fbb9-02 rootfstype=ext4 fsck.repair=yes rootwait
      [Mon Jan 29 22:26:40 2024] EXT4-fs (sda2): mounted filesystem with ordered data mode. Quota mode: none.
      [Mon Jan 29 22:26:40 2024] VFS: Mounted root (ext4 filesystem) readonly on device 8:2.
      [Mon Jan 29 22:26:43 2024] EXT4-fs (sda2): re-mounted. Quota mode: none.
      
      Show mounted filesystems \(real ones only\):
      TARGET  SOURCE    FSTYPE OPTIONS
      /       /dev/sda2 ext4   rw,noatime
      `-/boot /dev/sda1 vfat   rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,errors=remount-ro
      
      Files in neuralgic directories:
      
      /var:
      7.8G    /var/
      6.2G    /var/lib
      6.0G    /var/lib/influxdb/engine
      6.0G    /var/lib/influxdb
      5.9G    /var/lib/influxdb/engine/data/ca870feeb67efca8/autogen
      
      Archived and active journals take up 1.1G in the file system.
      
      /opt/iobroker/backups:
      27G     /opt/iobroker/backups/
      
      /opt/iobroker/iobroker-data:
      223M    /opt/iobroker/iobroker-data/
      149M    /opt/iobroker/iobroker-data/files
      52M     /opt/iobroker/iobroker-data/files/javascript.admin
      45M     /opt/iobroker/iobroker-data/files/devices.admin/static
      45M     /opt/iobroker/iobroker-data/files/devices.admin
      
      The five largest files in iobroker-data are:
      35M     /opt/iobroker/iobroker-data/objects.jsonl
      35M     /opt/iobroker/iobroker-data/files/devices.admin/static/js/main.24f2bb56.js.map
      22M     /opt/iobroker/iobroker-data/files/modbus.admin/static/js/main.b5f6766c.js.map
      8.9M    /opt/iobroker/iobroker-data/files/modbus.admin/static/js/main.b5f6766c.js
      8.6M    /opt/iobroker/iobroker-data/files/devices.admin/static/js/main.24f2bb56.js
      
      USB-Devices by-id:
      USB-Sticks -  Avoid direct links to /dev/* in your adapter setups, please always prefer the links 'by-id':
      
      find: '/dev/serial/by-id/': No such file or directory
      
      *** NodeJS-Installation ***
      
      /home/iobroker/.diag.sh: line 277: nodejs: command not found
      
      /usr/bin/node           v18.17.1
      /usr/bin/npm            9.6.7
      /usr/bin/npx            9.6.7
      /usr/bin/corepack       0.18.0
      /home/iobroker/.diag.sh: line 288: nodejs: command not found
      *** nodejs is NOT correctly installed ***
      
      nodejs:
        Installed: 18.17.1-deb-1nodesource1
        Candidate: 18.17.1-deb-1nodesource1
        Version table:
       *** 18.17.1-deb-1nodesource1 500
              500 https://deb.nodesource.com/node_18.x bullseye/main arm64 Packages
              100 /var/lib/dpkg/status
           12.22.12~dfsg-1~deb11u4 500
              500 http://deb.debian.org/debian bullseye/main arm64 Packages
              500 http://security.debian.org/debian-security bullseye-security/main arm64 Packages
      
      Temp directories causing npm8 problem: 0
      No problems detected
      
      Errors in npm tree:
      
      *** ioBroker-Installation ***
      
      ioBroker Status
      iobroker is running on this host.
      
      
      Objects type: jsonl
      States  type: jsonl
      
      Core adapters versions
      js-controller:  5.0.17
      admin:          6.12.0
      javascript:     7.1.5
      
      Adapters from github:   0
      
      Adapter State
      + system.adapter.admin.0                  : admin                 : RaspiEnergie                             -  enabled, port: 8081, bind: 0.0.0.0, run as: admin
      + system.adapter.backitup.0               : backitup              : RaspiEnergie                             -  enabled
      + system.adapter.ble.0                    : ble                   : RaspiEnergie                             -  enabled
        system.adapter.devices.0                : devices               : RaspiEnergie                             -  enabled
      + system.adapter.discovery.0              : discovery             : RaspiEnergie                             -  enabled
      + system.adapter.email.0                  : email                 : RaspiEnergie                             -  enabled
      + system.adapter.fritzdect.0              : fritzdect             : RaspiEnergie                             -  enabled
      + system.adapter.influxdb.0               : influxdb              : RaspiEnergie                             -  enabled, port: 8086
      + system.adapter.info.0                   : info                  : RaspiEnergie                             -  enabled
        system.adapter.javascript.0             : javascript            : RaspiEnergie                             - disabled
      + system.adapter.modbus.0                 : modbus                : RaspiEnergie                             -  enabled
      + system.adapter.modbus.1                 : modbus                : RaspiEnergie                             -  enabled
      + system.adapter.modbus.2                 : modbus                : RaspiEnergie                             -  enabled
      + system.adapter.mqtt.0                   : mqtt                  : RaspiEnergie                             -  enabled, port: 1884, bind: 0.0.0.0
      + system.adapter.net-tools.0              : net-tools             : RaspiEnergie                             -  enabled
      + system.adapter.opendtu.0                : opendtu               : RaspiEnergie                             -  enabled
      + system.adapter.ping.0                   : ping                  : RaspiEnergie                             -  enabled
      + system.adapter.pvforecast.0             : pvforecast            : RaspiEnergie                             -  enabled
      + system.adapter.shelly.0                 : shelly                : RaspiEnergie                             -  enabled, port: 1882, bind: 0.0.0.0
      + system.adapter.socketio.0               : socketio              : RaspiEnergie                             -  enabled, port: 8084, bind: 127.0.0.1, run as: admin
        system.adapter.sonoff.0                 : sonoff                : RaspiEnergie                             - disabled, port: 1883, bind: 0.0.0.0
      
      + instance is alive
      
      Enabled adapters with bindings
      + system.adapter.admin.0                  : admin                 : RaspiEnergie                             -  enabled, port: 8081, bind: 0.0.0.0, run as: admin
      + system.adapter.influxdb.0               : influxdb              : RaspiEnergie                             -  enabled, port: 8086
      + system.adapter.mqtt.0                   : mqtt                  : RaspiEnergie                             -  enabled, port: 1884, bind: 0.0.0.0
      + system.adapter.shelly.0                 : shelly                : RaspiEnergie                             -  enabled, port: 1882, bind: 0.0.0.0
      + system.adapter.socketio.0               : socketio              : RaspiEnergie                             -  enabled, port: 8084, bind: 127.0.0.1, run as: admin
      
      ioBroker-Repositories
      stable        : http://download.iobroker.net/sources-dist.json
      beta          : http://download.iobroker.net/sources-dist-latest.json
      
      Active repo(s): stable
      
      Installed ioBroker-Instances
      Used repository: stable
      Adapter    "admin"        : 6.12.0   , installed 6.12.0
      Adapter    "backitup"     : 2.9.8    , installed 2.9.8
      Adapter    "ble"          : 0.13.4   , installed 0.13.4
      Adapter    "devices"      : 1.1.5    , installed 1.1.5
      Adapter    "discovery"    : 4.2.0    , installed 4.2.0
      Adapter    "email"        : 1.2.2    , installed 1.2.2
      Adapter    "fritzdect"    : 2.5.9    , installed 2.5.9
      Adapter    "influxdb"     : 3.2.0    , installed 3.2.0
      Adapter    "info"         : 2.0.0    , installed 2.0.0
      Adapter    "javascript"   : 7.1.6    , installed 7.1.5  [Updatable]
      Controller "js-controller": 5.0.17   , installed 5.0.17
      Adapter    "modbus"       : 6.0.1    , installed 6.0.1
      Adapter    "mqtt"         : 5.1.0    , installed 5.1.0
      Adapter    "net-tools"    : 0.2.0    , installed 0.2.0
      Adapter    "opendtu"      : 1.0.1    , installed 1.0.1
      Adapter    "ping"         : 1.6.2    , installed 1.6.2
      Adapter    "pvforecast"   : 2.9.1    , installed 2.9.1
      Adapter    "shelly"       : 6.6.1    , installed 6.6.1
      Adapter    "socketio"     : 6.6.0    , installed 6.6.0
      Adapter    "sonoff"       : 3.0.3    , installed 3.0.3
      Adapter    "vis-materialdesign": 0.5.9, installed 0.5.9
      
      Objects and States
      Please stand by - This may take a while
      Objects:        1416
      States:         1150
      
      *** OS-Repositories and Updates ***
      Hit:1 http://archive.raspberrypi.org/debian bullseye InRelease
      Hit:2 http://deb.debian.org/debian bullseye InRelease
      Hit:3 http://security.debian.org/debian-security bullseye-security InRelease
      Hit:4 http://giteduberger.fr rpimonitor/ InRelease
      Hit:5 http://deb.debian.org/debian bullseye-updates InRelease
      Hit:6 https://apt.grafana.com stable InRelease
      Hit:7 https://repos.influxdata.com/debian stable InRelease
      Get:8 https://deb.nodesource.com/node_18.x bullseye InRelease [4586 B]
      Update rpimonitor Packages Status
      Fetched 4586 B in 2s (2049 B/s)
      Reading package lists...
      Pending Updates: 0
      
      *** Listening Ports ***
      Active Internet connections (only servers)
      Proto Recv-Q Send-Q Local Address           Foreign Address         State       User       Inode      PID/Program name
      tcp        0      0 0.0.0.0:60025           0.0.0.0:*               LISTEN      0          14562      623/sshd: /usr/sbin
      tcp        0      0 0.0.0.0:8888            0.0.0.0:*               LISTEN      0          14705      758/perl
      tcp        0      0 127.0.0.1:8084          0.0.0.0:*               LISTEN      1001       18366      1701/io.socketio.0
      tcp        0      0 0.0.0.0:5900            0.0.0.0:*               LISTEN      0          15501      618/vncserver-x11-c
      tcp        0      0 0.0.0.0:1885            0.0.0.0:*               LISTEN      1001       14992      1037/io.mqtt.0
      tcp        0      0 0.0.0.0:1884            0.0.0.0:*               LISTEN      1001       14991      1037/io.mqtt.0
      tcp        0      0 0.0.0.0:1882            0.0.0.0:*               LISTEN      1001       16633      994/io.shelly.0
      tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN      0          14595      562/cupsd
      tcp        0      0 127.0.0.1:9001          0.0.0.0:*               LISTEN      1001       14824      874/iobroker.js-con
      tcp        0      0 127.0.0.1:9000          0.0.0.0:*               LISTEN      1001       14831      874/iobroker.js-con
      tcp6       0      0 :::3000                 :::*                    LISTEN      116        15743      873/grafana
      tcp6       0      0 :::60025                :::*                    LISTEN      0          14564      623/sshd: /usr/sbin
      tcp6       0      0 :::5900                 :::*                    LISTEN      0          15500      618/vncserver-x11-c
      tcp6       0      0 ::1:631                 :::*                    LISTEN      0          14594      562/cupsd
      tcp6       0      0 :::8086                 :::*                    LISTEN      999        17424      578/influxd
      tcp6       0      0 :::8081                 :::*                    LISTEN      1001       17497      922/io.admin.0
      udp        0      0 0.0.0.0:631             0.0.0.0:*                           0          13169      695/cups-browsed
      udp        0      0 0.0.0.0:5353            0.0.0.0:*                           108        15398      431/avahi-daemon: r
      udp        0      0 0.0.0.0:68              0.0.0.0:*                           0          14638      505/dhcpcd
      udp        0      0 0.0.0.0:41066           0.0.0.0:*                           108        15400      431/avahi-daemon: r
      udp6       0      0 :::5353                 :::*                                108        15399      431/avahi-daemon: r
      udp6       0      0 :::38439                :::*                                108        15401      431/avahi-daemon: r
      
      *** Log File - Last 25 Lines ***
      
      2024-01-29 22:28:36.891  - info: pvforecast.0 (1437) Starting internal update cron (every 15 Minutes) for timezone: Europe/Berlin
      2024-01-29 22:28:37.620  - info: fritzdect.0 (1465) starting. Version 2.5.9 in /opt/iobroker/node_modules/iobroker.fritzdect, node: v18.17.1, js-controller: 5.0.17
      2024-01-29 22:28:37.675  - info: fritzdect.0 (1465) fritzdect entered ready
      2024-01-29 22:28:37.734  - info: fritzdect.0 (1465) fritzdect uses USER: admin
      2024-01-29 22:28:37.868  - error: fritzdect.0 (1465) --------------- error calling the fritzbox -----------
      2024-01-29 22:28:37.871  - error: fritzdect.0 (1465) API msg   => error calling executeCommand
      2024-01-29 22:28:37.872  - error: fritzdect.0 (1465) API funct => login_SID
      2024-01-29 22:28:37.874  - error: fritzdect.0 (1465) no response part in returned error message
      2024-01-29 22:28:37.876  - error: fritzdect.0 (1465) API  err  => {"msg":"failed to get challenge","function":"get_sid","error":{"msg":"error http.request","function":"get_login_state","error":{"errno":-3008,"code":"ENOTFOUND","syscall":"getaddrinfo","hostname":"192.168.x.x"}}}
      2024-01-29 22:28:37.879  - error: fritzdect.0 (1465) login not possible, check user and permissions
      2024-01-29 22:28:38.155  - info: host.RaspiEnergie instance system.adapter.socketio.0 started with pid 1701
      2024-01-29 22:28:41.169  - info: socketio.0 (1701) starting. Version 6.6.0 in /opt/iobroker/node_modules/iobroker.socketio, node: v18.17.1, js-controller: 5.0.17
      2024-01-29 22:28:41.249  - warn: socketio.0 (1701) Information for Developer: Using the direct "Let's encrypt" module import is deprecated and will be removed in the next js-controller version, use @iobroker/webserver instead
      2024-01-29 22:28:41.336  - info: socketio.0 (1701) socket.io server listening on port 8084
      2024-01-29 22:28:41.759  - info: shelly.0 (994) [MQTT] Device with client id "shellyem-485519D9E523" connected!
      2024-01-29 22:28:43.918  - info: opendtu.0 (1256) Connect to OpenDTU over websocket connection.
      2024-01-29 22:28:52.968  - info: admin.0 (922) <== Disconnect system.user.admin from ::ffff:192.168.198.201 javascript
      2024-01-29 22:28:52.975  - info: admin.0 (922) <== Disconnect system.user.admin from ::ffff:192.168.198.201 admin
      2024-01-29 22:28:53.176  - info: admin.0 (922) ==> Connected system.user.admin from ::ffff:192.168.198.201
      2024-01-29 22:28:53.913  - info: admin.0 (922) <== Disconnect system.user.admin from ::ffff:192.168.198.201 javascript
      2024-01-29 22:28:54.733  - info: admin.0 (922) ==> Connected system.user.admin from ::ffff:192.168.198.201
      2024-01-29 22:29:02.899  - info: admin.0 (922) ==> Connected system.user.admin from ::ffff:192.168.198.201
      2024-01-29 22:38:25.227  - info: admin.0 (922) <== Disconnect system.user.admin from ::ffff:192.168.198.201 javascript
      2024-01-29 22:39:27.194  - info: admin.0 (922) ==> Connected system.user.admin from ::ffff:192.168.198.201
      2024-01-29 22:41:08.501  - info: admin.0 (922) <== Disconnect system.user.admin from ::ffff:192.168.198.201 javascript
      
      
      
      ============ Mark until here for C&P =============
      
      iob diag has finished.
      
      
      Press any key for a summary
      
      
      

      Da ich mehrfach gelesen habe, dass man keinesfalls manuell etwas installieren soll, ist

      sudo apt install nodejs=WUNSCHVERSION

      der richtige Weg?

      Ich bitte um eure Unterstützung. (den Javascript-Adapter habe ich um eine Version zurückgesetzt, um zu sehen, ob das Instanzproblem verschwindet, leider ohne Erfolg)

      Andreas

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

        @andi_grafa

        Es gibt mittlerweile ein Kommando dafür:

        iob nodejs-update
        

        Wenn das nicht direkt funktioniert den

        iob fix
        

        zuvor ausführen.

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

          @andi_grafa

          Dein username ip ist ungünstig, es gibt nämlich auch einen Befehl 'ip'
          Dann würde ich d´swap wieder einschalten. Ein wenig swap ist erforderlich.

          27G     /opt/iobroker/backups/
          

          warum hältst du da das Wissen der Menschheit vor?

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

            @thomas-braun sagte in Nodejs Problem:

            Dein username ip ist ungünstig, es gibt nämlich auch einen Befehl 'ip'

            warum sollte das ungünstig sein?
            Es gibt ja auch einen "Befehl" nginx, und einen User nginx, einen Befehl sshd, und einen User sshd, usw usf...

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

              @jleg

              Ja. Aber das sind auch systemuser.

              ip@hostname:~ $ sudo -u ip ip a
              

              ist halt 'ungünstig' und schwerer zu lesen.
              Gleiches gilt für ähnliches wie

              iobroker@iobroker:~ $ sudo -u iobroker iobroker commando
              

              Wenn du dann auf der Konsole nicht sattelfest bist können da viel leichter ungewollte Befehle draus werden.

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

              Support us

              ioBroker
              Community Adapters
              Donate

              526
              Online

              32.1k
              Users

              80.8k
              Topics

              1.3m
              Posts

              3
              5
              388
              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