NEWS
javascript bleibt rot bei iob Neustart
-
Hallo,
wenn ich iob komplett neu starten, wird die Instanz von javascript nicht grün. Die Folge ist, dass meine ganzen Scripte nicht starten.
Im log steht folgendes:host.iobroker 2023-03-04 08:36:54.584 info Rebuild for adapter system.adapter.javascript.0 not successful in 3 tries. Adapter will not be restarted again. Please execute "npm install --production" in adapter directory manually. host.iobroker 2023-03-04 08:36:54.584 error instance system.adapter.javascript.0 terminated with code 1 (JS_CONTROLLER_STOPPED) host.iobroker 2023-03-04 08:36:54.584 error Caught by controller[0]: } host.iobroker 2023-03-04 08:36:54.584 error Caught by controller[0]: ] host.iobroker 2023-03-04 08:36:54.584 error Caught by controller[0]: '/opt/iobroker/node_modules/iobroker.javascript/main.js' host.iobroker 2023-03-04 08:36:54.583 error Caught by controller[0]: '/opt/iobroker/node_modules/iobroker.javascript/node_modules/coffeescript/lib/coffee-script/coffee-script.js', host.iobroker 2023-03-04 08:36:54.583 error Caught by controller[0]: requireStack: [ host.iobroker 2023-03-04 08:36:54.583 error Caught by controller[0]: code: 'MODULE_NOT_FOUND', host.iobroker 2023-03-04 08:36:54.583 error Caught by controller[0]: at Function.Module._load (node:internal/modules/cjs/loader:878:12) { host.iobroker 2023-03-04 08:36:54.582 error Caught by controller[0]: at Module.load (node:internal/modules/cjs/loader:1043:32) host.iobroker 2023-03-04 08:36:54.582 error Caught by controller[0]: at Object.Module._extensions..js (node:internal/modules/cjs/loader:1219:10) host.iobroker 2023-03-04 08:36:54.582 error Caught by controller[0]: at Module._compile (node:internal/modules/cjs/loader:1165:14) host.iobroker 2023-03-04 08:36:54.582 error Caught by controller[0]: at Object.<anonymous> (/opt/iobroker/node_modules/iobroker.javascript/node_modules/coffeescript/lib/coffee-script/coffee-script.js:426:4) host.iobroker 2023-03-04 08:36:54.582 error Caught by controller[0]: at Object.<anonymous> (/opt/iobroker/node_modules/iobroker.javascript/node_modules/coffeescript/lib/coffee-script/coffee-script.js:18:15) host.iobroker 2023-03-04 08:36:54.581 error Caught by controller[0]: at require (node:internal/modules/cjs/helpers:103:18) host.iobroker 2023-03-04 08:36:54.581 error Caught by controller[0]: at Module.require (node:internal/modules/cjs/loader:1067:19) host.iobroker 2023-03-04 08:36:54.581 error Caught by controller[0]: at Function.Module._load (node:internal/modules/cjs/loader:841:27) host.iobroker 2023-03-04 08:36:54.581 error Caught by controller[0]: at Function.Module._resolveFilename (node:internal/modules/cjs/loader:995:15) host.iobroker 2023-03-04 08:36:54.581 error Caught by controller[0]: - /opt/iobroker/node_modules/iobroker.javascript/main.js host.iobroker 2023-03-04 08:36:54.580 error Caught by controller[0]: - /opt/iobroker/node_modules/iobroker.javascript/node_modules/coffeescript/lib/coffee-script/coffee-script.js host.iobroker 2023-03-04 08:36:54.580 error Caught by controller[0]: Require stack: host.iobroker 2023-03-04 08:36:54.580 error Caught by controller[0]: Error: Cannot find module './sourcemap' host.iobroker 2023-03-04 08:36:54.580 error Caught by controller[0]: ^ host.iobroker 2023-03-04 08:36:54.579 error Caught by controller[0]: throw err; host.iobroker 2023-03-04 08:36:54.579 error Caught by controller[0]: node:internal/modules/cjs/loader:998 host.iobroker 2023-03-04 08:36:54.221 info instance system.adapter.javascript.0 started with pid 13204
Dort steht zum Schluss dann:
Please execute "npm install --production" in adapter directory manually.
Also in putty ausgeführt:
cd /opt/iobroker/ npm install javascript --production
Danach die Intanz wieder neu gestartet und alles läuft wieder.
Frage:
Warum ist das so?
und warum wird die Instanz nicht bei einem iob Neustart gleich grün ?Und: Wie kann ich dies beheben.
Achja: überall auf stable; mit 1 oder 2 Ausnahmen (web, ws) wg. dort ws problem. Dort bin ich auf beta.
mfg
Dieter -
@bahnuhr sagte in javascript bleibt rot bei iob Neustart:
Also in putty ausgeführt:
ich bin jetzt nicht ganz sicher, ob du damit das
@bahnuhr sagte in javascript bleibt rot bei iob Neustart:
Please execute "npm install --production" in adapter directory manually.
wirklich umgesetzt hast.
ich verstehe das so, dass du noch tiefer in die Struktur bis zum js-Adapter musst, und dort nicht@bahnuhr sagte in javascript bleibt rot bei iob Neustart:
npm install javascript --production
eingeben sollst
-
@bahnuhr sagte in javascript bleibt rot bei iob Neustart:
warum wird die Instanz nicht bei einem iob Neustart gleich grün ?
hattest du ein node Update gemacht?
@bahnuhr sagte in javascript bleibt rot bei iob Neustart:
Rebuild for adapter system.adapter.javascript.0 not successful in 3 tries
wird eigentlich nach einer node Änderung angestoßen.
-
@homoran sagte in javascript bleibt rot bei iob Neustart:
hattest du ein node Update gemacht?
Ne, das ist mir schon öfters passiert mit dem js adapter
heute nacht um 03:00 iob neu getartet und dann ging nichts mehrnach
npm install javascript --production
ging es ja wieder (kann doch dann nicht ganz falsch gewesen sein) -
@bahnuhr sagte in javascript bleibt rot bei iob Neustart:
kann doch dann nicht ganz falsch gewesen sein
vielleicht sogar besser, und der Adapter hat es auf dem "richtigen" Weg nicht geschafft
-
-
@bahnuhr sagte in javascript bleibt rot bei iob Neustart:
npm install --production
@homoran
Danke, hatte das gleiche Problem mit der 7.01 -
@bahnuhr sagte in javascript bleibt rot bei iob Neustart:
npm install --production
Ist obsolet mit aktuellen npm Versionen.
Es soll nunnpm install --omit=dev
verwendet werden.
-
@thomas-braun
Das kann man aber nicht wissen.
Zumal im log ja was anderes stand.Aber Danke für die Info.
Muss ich mir mal aufschreiben. -
@bahnuhr sagte in javascript bleibt rot bei iob Neustart:
Zumal im log ja was anderes stand.
Im Log steht eigentlich genau das drin, wenn man
--production
verwendet. -
@Thomas-Braun
das stand im log@bahnuhr sagte in javascript bleibt rot bei iob Neustart:
Dort steht zum Schluss dann:
Please execute "npm install --production" in adapter directory manually. -
@thomas-braun
Was ist die empfohlene npm und nodejs Version aktuell ?
Ist das irgendwo immer aktuell beshrieben ? Hab leider nichts gefunden -
@gargano sagte in javascript bleibt rot bei iob Neustart:
@thomas-braun
Was ist die empfohlene npm und nodejs Version aktuell ?
Ist das irgendwo immer aktuell beshrieben ? Hab leider nichts gefundensteht doch bei Info drin:
-
Nodejs@16, die bringt die passende npm@8 gleich richtig mit.
Wenn nodejs denn richtig installiert wurde. -
@thomas-braun
@bahnuhr
Danke , dann habe ich die aktuellsteManchmal sieht man halt den Wald vor lauter Bäumen nicht.
-
-
======================= SUMMARY ======================= v.2023-01-02 Operatingsystem: Debian GNU/Linux 11 (bullseye) Installation: Native Timezone: Europe/Berlin User-ID: 1000 X-Server: false Boot Target: graphical.target Pending OS-Updates: 0 Nodejs-Installation: /usr/bin/nodejs v16.19.1 /usr/bin/node v16.19.1 /usr/bin/npm 8.19.3 /usr/bin/npx 8.19.3 ioBroker Core: js-controller 4.0.24 admin 6.3.6 ioBroker Status: iobroker is running on this host. At least one iobroker host is running. Objects type: redis States type: redis Status admin: + system.adapter.admin.0 : admin : raspberrypi - enabled, port: 8081, bind: 0.0.0.0, run as: admin Pending iob updates: 1 Active repo(s): Beta (latest) Objects: 19917 States: 18221 Size of iob-Database: 5.2M /opt/iobroker/iobroker-data/objects.json.bak 5.2M /opt/iobroker/iobroker-data/objects.json 40K /opt/iobroker/iobroker-data/states.json.bak 40K /opt/iobroker/iobroker-data/states.json =================== END OF SUMMARY ====================
-
Passt grundsätzlich.
Schaufel das Update beim iobroker noch rein und stell das RunLevel / Boot Target auf Multi-User um. -
@thomas-braun
Das pending Update ist der Gerätemanager, der ist noch auf 1.1.1 , weil der 1.1.2 buggy ist und nicht funktioniert.
Warum boot Target auf multi User ? -
Weil Multi-User/ RunLevel 3 für den Betrieb als Server die richtige Einstellung ist.