Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No suitable Lua script, fallback to keys #71

Closed
SebastianSchultz opened this issue Aug 11, 2020 · 11 comments
Closed

No suitable Lua script, fallback to keys #71

SebastianSchultz opened this issue Aug 11, 2020 · 11 comments

Comments

@SebastianSchultz
Copy link

Hallo zusammen,

was kann der Fehler

No suitable Lua script, fallback to keys!: function(doc) { if (doc.type=='state') emit(doc._id, doc) }

bei einem Adapter bedeuten, wenn folgende Codezeile in einem Adapter ausgeführt wird:

adapter.getStates(adapter.namespace + ".eNet.*.*.*.*eventUID", function (err, states)

@Apollon77
Copy link
Contributor

Bei welchem Adapter passiert das denn?

@SebastianSchultz
Copy link
Author

Hallo Apollon,

das passiert bei einer neuen Version des eNet Adapters. Ich habe Dir die neue main.js mal hier hochgeladen: https://we.tl/t-Moqf42jUsY
Der Fehler erscheint seitdem ich die Zeilen 747-754 eingefügt habe.

@Apollon77
Copy link
Contributor

Zuerst einmal, es ist kein Fehler :-) Ist ja auch nur ein Debug logund sagt das er keine Optimierte Selektion vornehmen kann, sondern es unperformanter macht.

Lass mal bitte "iobroker setup first" laufen. Da scheint in deinem System irgendwas nicht sauber zu laufen.

Nutzt du Redis? Oder File DB?
entferne mal in Admin - Objekte alle filter und schaue nach dem Objekt mit dem Namen "_design/system" und poste das mal bitte.

@SebastianSchultz
Copy link
Author

Ja, aber wenn mans optimieren kann, umso besser :)
"iobroker setup" first ist ohne Fehlermeldung ausgeführt worden.
Ich nutze Redis.

Hier der Inhalt von "_design/system":

{ "language": "javascript", "views": { "host": { "map": "function(doc) { if (doc.type=='host') emit(doc._id, doc) }" }, "adapter": { "map": "function(doc) { if (doc.type=='adapter') emit(doc._id, doc) }" }, "instance": { "map": "function(doc) { if (doc.type=='instance') emit(doc._id, doc) }" }, "instanceStats": { "map": "function(doc) { if (doc.type=='instance') emit(doc._id, parseInt(doc._id.split('.').pop(), 10)) }", "reduce": "_stats" }, "meta": { "map": "function(doc) { if (doc.type=='meta') emit(doc._id, doc) }" }, "device": { "map": "function(doc) { if (doc.type=='device') emit(doc._id, doc) }" }, "channel": { "map": "function(doc) { if (doc.type=='channel') emit(doc._id, doc) }" }, "state": { "map": "function(doc) { if (doc.type=='state') emit(doc._id, doc) }" }, "enum": { "map": "function(doc) { if (doc.type=='enum') emit(doc._id, doc) }" }, "script": { "map": "function(doc) { if (doc.type=='script') emit(doc._id, doc) }" }, "group": { "map": "function(doc) { if (doc.type=='group') emit(doc.common.name, doc) }" }, "user": { "map": "function(doc) { if (doc.type=='user') emit(doc.common.name, doc) }" }, "config": { "map": "function(doc) { if (doc.type=='config') emit(doc.common.name, doc) }" } }, "common": { "name": "" }, "native": {}, "acl": { "object": 1636, "owner": "system.user.admin", "ownerGroup": "system.group.administrator" }, "_id": "_design/system", "type": null }

@Apollon77
Copy link
Contributor

Das sieht ok aus kommt es immer noch? Bitte schau malerische Version von objects-redis lib installiert ist. Bzw Controller aktuell? 3.1.6?

@SebastianSchultz
Copy link
Author

Hallo Ingo,

Controller ist die 3.1.6
Was meinst Du mit "Bitte schau malerische Version von objects-redis lib installiert ist"???

@Apollon77
Copy link
Contributor

Das modul heisst iobroker.objects-redis ... also schau mal wo das in deinem npm baum liegt ... zB
/opt/iobroker/node_modules/iobroker.objects-redis/

und was steht in package.json?

@SebastianSchultz
Copy link
Author

Hallo Ingo,

hier der Inhalt der /opt/iobroker/node_modules/iobroker.objects-redis/package.json:

{ "_from": "iobroker.objects-redis@^3.3.8", "_id": "iobroker.objects-redis@3.3.9", "_inBundle": false, "_integrity": "sha512-h6eNiN0Imyr+L5m6zr0kpdRdJegnjBR8XezVdnn7vQPtrpKQKQ+32yvvwTqMpQZmIl9trZRaSN7DmbLmv5HnBA==", "_location": "/iobroker.objects-redis", "_phantomChildren": {}, "_requested": { "type": "range", "registry": true, "raw": "iobroker.objects-redis@^3.3.8", "name": "iobroker.objects-redis", "escapedName": "iobroker.objects-redis", "rawSpec": "^3.3.8", "saveSpec": null, "fetchSpec": "^3.3.8" }, "_requiredBy": [ "/iobroker.js-controller" ], "_resolved": "https://registry.npmjs.org/iobroker.objects-redis/-/iobroker.objects-redis-3.3.9.tgz", "_shasum": "5d7cc863b64deeb1a52d174c6e8d370909b8d017", "_spec": "iobroker.objects-redis@^3.3.8", "_where": "/opt/iobroker/node_modules/iobroker.js-controller", "author": { "name": "bluefox", "email": "dogafox@gmail.com" }, "bugs": { "url": "https://github.com/ioBroker/ioBroker.objects-redis/issues" }, "bundleDependencies": false, "contributors": [ { "name": "bluefox", "email": "dogafox@gmail.com" }, { "name": "Apollon77", "email": "iobroker@fischer-ka.de" } ], "dependencies": { "deep-clone": "^3.0.3", "ioredis": "^4.16.3", "node.extend": "^2.0.2", "vinyl-sourcemaps-apply": "^0.2.1" }, "deprecated": false, "description": "This is not an Adapter for ioBroker, but part of js-controller to enable the storage of objects in REDIS.", "engines": { "node": ">=8.0.0" }, "homepage": "https://github.com/ioBroker/ioBroker.objects-redis#readme", "keywords": [ "ioBroker", "redis", "redundancy" ], "license": "SEE LICENSE IN", "licenses": [ { "type": "SEE LICENSE IN", "url": "https://github.com/ioBroker/ioBroker.objects-redis/blob/master/LICENSE" } ], "main": "index.js", "name": "iobroker.objects-redis", "repository": { "type": "git", "url": "git+https://github.com/ioBroker/ioBroker.objects-redis.git" }, "version": "3.3.9" }

@Apollon77
Copy link
Contributor

sieht an sich alles korrekt aus.

starte mal den controller neu ... und dann bitte mal den adapter mit "silly" log starten und posten

@Apollon77
Copy link
Contributor

Ahhhhhh @foxriver76 hat den entscheidenden Wink gegeben:

Die ganzen optimierten Abfragen (und optimierungen in LUA) gehen nur wenn der Wildcard NUR am Ende ist, weil auch nur das Redis nativ kann. Für alles andere muss er das ganze "Unperformanter" machen . Daher die Meldung. ALso passt die und alles ist korrekt.
Es liegt an deiner Abfrage

@SebastianSchultz
Copy link
Author

Alles klar. Danke für die Info. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants