NEWS
[gelöst] JavasScript Instanz lässt sich nicht mehr starten.
-
Hallo,
iobroker läuft seit langen einwandfrei. nun wollte ich im javascript via root eine global function hinzufügen. der adapter/instanz hat dann versucht neu zu laden. Seither startet diese nicht mehr.
ich habe bereits ein iob fix und nochmaliges upgrade versucht.
erst hat der log etwas von fehlendem coffeescript gesagt und nun folgendes:
das ganze läuft unter proxmox. npm, iobroker 6.3.5. usw sind aktuell stable.
javascript 6.1.4
npm: 8.19.2
node.js: 16.18.1hoffe mir kann jemand helfen.
host.ioBroker 2023-03-11 23:57:06.831 error instance system.adapter.javascript.0 terminated with code 1 (JS_CONTROLLER_STOPPED) host.ioBroker 2023-03-11 23:57:06.830 error Caught by controller[0]: at node:internal/main/run_main_module:22:47 host.ioBroker 2023-03-11 23:57:06.830 error Caught by controller[0]: at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) host.ioBroker 2023-03-11 23:57:06.830 error Caught by controller[0]: at Function.Module._load (node:internal/modules/cjs/loader:868:12) host.ioBroker 2023-03-11 23:57:06.829 error Caught by controller[0]: at Module.load (node:internal/modules/cjs/loader:1033:32) host.ioBroker 2023-03-11 23:57:06.829 error Caught by controller[0]: at Object.Module._extensions..js (node:internal/modules/cjs/loader:1209:10) host.ioBroker 2023-03-11 23:57:06.829 error Caught by controller[0]: at Module._compile (node:internal/modules/cjs/loader:1155:14) host.ioBroker 2023-03-11 23:57:06.829 error Caught by controller[0]: at Object.<anonymous> (/opt/iobroker/node_modules/iobroker.javascript/main.js:66:19) host.ioBroker 2023-03-11 23:57:06.829 error Caught by controller[0]: at require (node:internal/modules/cjs/helpers:103:18) host.ioBroker 2023-03-11 23:57:06.829 error Caught by controller[0]: at Module.require (node:internal/modules/cjs/loader:1057:19) host.ioBroker 2023-03-11 23:57:06.829 error Caught by controller[0]: at Function.Module._load (node:internal/modules/cjs/loader:868:12) host.ioBroker 2023-03-11 23:57:06.828 error Caught by controller[0]: at Module.load (node:internal/modules/cjs/loader:1033:32) host.ioBroker 2023-03-11 23:57:06.828 error Caught by controller[0]: at Object.Module._extensions..js (node:internal/modules/cjs/loader:1209:10) host.ioBroker 2023-03-11 23:57:06.828 error Caught by controller[0]: at Module._compile (node:internal/modules/cjs/loader:1155:14) host.ioBroker 2023-03-11 23:57:06.828 error Caught by controller[0]: at Object.<anonymous> (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:9:41) host.ioBroker 2023-03-11 23:57:06.828 error Caught by controller[0]: TypeError: Cannot read properties of undefined (reading 'pattern2RegEx') host.ioBroker 2023-03-11 23:57:06.828 error Caught by controller[0]: ^ host.ioBroker 2023-03-11 23:57:06.827 error Caught by controller[0]: const pattern2RegEx = utils.commonTools.pattern2RegEx; host.ioBroker 2023-03-11 23:57:06.827 error Caught by controller[0]: /opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:9
-
@mariva sagte in JavasScript Instanz lässt sich nicht mehr starten.:
nun wollte ich im javascript via root eine global function hinzufügen.
Was hast du gemacht? Ich kann anhand der Beschreibung nicht nachvollziehen was du da jetzt wie gemacht hast.
-
ich hatte nur eine globale js function hinzugefügt.
daraufhin startet die instanz neu.scheinbar hat dann dieses coffeescript gefehlt.
ich habe das nun wie folgt gelöst:
vielleicht hilft es ja jemanden.
danke für die schnelle response.
gruss
-
Bitte Konsolentext nie als Screenshot sondern in CodeTags eingebettet posten.
Und NIE als root herumkaspern.
Als user:iob stop iob fix iob start
-
@thomas-braun das hat leider nicht funktioniert.
-
@mariva sagte in JavasScript Instanz lässt sich nicht mehr starten.:
das hat leider nicht funktioniert.
Was hat nicht funktioniert?
-
@thomas-braun der iob fix sowie alles mit user rechten. mir blieb dann nur den node_modules ordner umzubennen und npm des javascript adapters. anschliessend ein reboot und nun scheint wieder alles zu funktionieren.
ich hatte den
- iob fix versucht
- iob upgrade
- reboot
- su
lediglich die von mir beschriebene vorgehensweise hat zum ziel geführt.
-
Du sollst ja auch jetzt den
iob fix
ausführen, nachdem du da mit dem root herumgepflügt bist.
Und das ganze natürlich NICHT als root sondern mit deinem Standarduser (der im übrigen in /opt/iobroker natürlich volle Rechte hat, wenn der der Gruppe 'iobroker' angehört).Zusätzliche nodejs-Module fügt man davon abgesehen im javascript-Adapter hinzu.
-
@thomas-braun done, danke dir.