Comments (16)
Permission issue
"iobroker fix" is your friend
from iobroker.amazon-dash.
Which I already tried hundreds of times to no avail (btw. meant this with "iobroker fixing").
from iobroker.amazon-dash.
Really? Please post the output of "iobroker fix" command
from iobroker.amazon-dash.
Maybe it has to do with this:
Error: The module '/opt/iobroker/node_modules/pcap/build/Release/pcap_binding.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 72. This version of Node.js requires
NODE_MODULE_VERSION 64. Please try re-compiling or re-installing
the module (for instance, using npm rebuild
or npm install
).
at Object.Module._extensions..node (internal/modules/cjs/loader.js:807:18)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object. (/opt/iobroker/node_modules/pcap/pcap.js:3:21)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
But all attempts to fix I made fail :-(
from iobroker.amazon-dash.
iobroker fix:
==========================================================================
Installing prerequisites (1/3)
OK:1 http://archive.ubuntu.com/ubuntu bionic InRelease
OK:2 http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu bionic InRelease
Holen:3 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88,7 kB]
Holen:4 http://archive.ubuntu.com/ubuntu bionic-backports InRelease [74,6 kB]
Holen:5 http://archive.ubuntu.com/ubuntu bionic-security InRelease [88,7 kB]
OK:6 https://deb.nodesource.com/node_10.x bionic InRelease
Holen:7 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages [1.883 kB]
Holen:8 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages [1.718 kB]
Holen:9 http://archive.ubuntu.com/ubuntu bionic-updates/universe Translation-en [363 kB]
Holen:10 http://archive.ubuntu.com/ubuntu bionic-security/main amd64 Packages [1.543 kB]
Holen:11 http://archive.ubuntu.com/ubuntu bionic-security/universe amd64 Packages [1.109 kB]
Holen:12 http://archive.ubuntu.com/ubuntu bionic-security/universe Translation-en [248 kB]
Es wurden 7.114 kB in 3 s geholt (2.696 kB/s).
Paketlisten werden gelesen... Fertig
Installed gcc-c++
==========================================================================
Checking ioBroker user and directory permissions (2/3)
Created /etc/sudoers.d/iobroker
Fixing directory permissions...
==========================================================================
Checking autostart (3/3)
Enabling autostart...
Autostart enabled!
==========================================================================
Your installation was fixed successfully
Run iobroker start to start ioBroker again!
==========================================================================
from iobroker.amazon-dash.
Yes also the compile erro migh be a reason.
do:
cd /opt/iobroker/node_modules/pcap/
npm i
from iobroker.amazon-dash.
Thanks .. did so and another fix afterwards.
node /opt/iobroker/node_modules/pcap/examples/network_grep.js
now gives me:
Listening on ens18
But the adapter still won't work:
amazon-dash.0 | 2021-02-11 17:57:41.977 | warn | (9088) Terminated (UNCAUGHT_EXCEPTION): Without reason |
---|---|---|---|
amazon-dash.0 | 2021-02-11 17:57:41.977 | info | (9088) terminating |
amazon-dash.0 | 2021-02-11 17:57:41.976 | info | (9088) cleaned everything up... |
amazon-dash.0 | 2021-02-11 17:57:41.915 | error | (9088) socket: Operation not permitted |
amazon-dash.0 | 2021-02-11 17:57:41.915 | error | at promiseReadSecret.then.then (/opt/iobroker/node_modules/iobroker.js-controller/lib/adapter.js:8479:34) |
amazon-dash.0 | 2021-02-11 17:57:41.915 | error | at Adapter.emit (events.js:198:13) |
amazon-dash.0 | 2021-02-11 17:57:41.915 | error | at Adapter. (/opt/iobroker/node_modules/iobroker.amazon-dash/main.js:53:9) |
amazon-dash.0 | 2021-02-11 17:57:41.915 | error | at main (/opt/iobroker/node_modules/iobroker.amazon-dash/main.js:90:29) |
amazon-dash.0 | 2021-02-11 17:57:41.915 | error | at Object.exports.createSession (/opt/iobroker/node_modules/iobroker.amazon-dash/node_modules/pcap/pcap.js:131:12) |
amazon-dash.0 | 2021-02-11 17:57:41.915 | error | at new PcapSession (/opt/iobroker/node_modules/iobroker.amazon-dash/node_modules/pcap/pcap.js:60:39) |
amazon-dash.0 | 2021-02-11 17:57:41.915 | error | (9088) Error: socket: Operation not permitted |
amazon-dash.0 | 2021-02-11 17:57:41.914 | error | (9088) unhandled promise rejection: socket: Operation not permitted |
amazon-dash.0 | 2021-02-11 17:57:41.913 | error | (9088) Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). |
amazon-dash.0 | 2021-02-11 17:57:41.910 | info | (9088) starting pcap session on default interface |
amazon-dash.0 | 2021-02-11 17:57:41.890 | info | (9088) starting. Version 1.1.0 in /opt/iobroker/node_modules/iobroker.amazon-dash, node: v10.23.3, js-controller: 3.2.16 |
amazon-dash.0 | 2021-02-11 17:57:12.800 | warn | (8547) Terminated (UNCAUGHT_EXCEPTION): Without reason |
from iobroker.amazon-dash.
then still permissions are not right.
please post output of
sudo getcap $(eval readlink -f `which node`)
from iobroker.amazon-dash.
/home/daniel/.nvm/versions/node/v10.23.3/bin/node = cap_net_bind_service,cap_net_admin,cap_net_raw+eip
from iobroker.amazon-dash.
sorry .. complete:
/home/daniel/.nvm/versions/node/v10.23.3/bin/node = cap_net_bind_service,cap_net_admin,cap_net_raw+eip
internal/modules/cjs/loader.js:638
throw err;
^
Error: Cannot find module '/home/daniel/='
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
at Function.Module._load (internal/modules/cjs/loader.js:562:25)
at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)
from iobroker.amazon-dash.
You use nvm?? This is kind of unsupported because the installation fixer will NOT do all hist tasks correctly.
iobroker runs as user iobroker ... so you need to check the permissions for that user because with nvm (see also your nodejs path) your nodejsversion and so also permissions are user specific.
so you need to execute the crrect setcap commands for iobroker user ...
from iobroker.amazon-dash.
I remember I did something that isn't favorable for iobroker .. but I am not a linux person knowing enough about how to roll this back or fix this. Is there maybe a tut you can point me to? (I don't even know why I use nvm .. probably some former tut I followed made me do this).
from iobroker.amazon-dash.
honestly ... I also have no idea . never used nvm. Maybe start a threadin iobroker forum to get support from some users on how to fix that
from iobroker.amazon-dash.
I log on with my username with root rights and when I try to su to iobroker it asks me for a password which I don't know. How can I install setcap via iobroker user when I am logged in as daniel? Do you know?
from iobroker.amazon-dash.
should be
sudo setcap 'cap_net_admin,cap_net_bind_service,cap_net_raw+eip' $(eval readlink -f `which node`)
from iobroker.amazon-dash.
perfekt! green! thanks!
from iobroker.amazon-dash.
Related Issues (20)
- Add Support for Compact mode (js-Controller 2.0 Feature)
- Think about to fix the issues found by adapter checker HOT 2
- How to setup Dash Button Adapter without iobroker running as root HOT 1
- Error: socket: Operation not permitted HOT 1
- Please check ioBroker.amazon-dash with js-controller 2.0 HOT 1
- Adapter does not work with Node.js v10 HOT 14
- Please add your adapter to ioBroker.discovery
- IMPORTANT: Add Bluefox to npm, so that we can continue to maintain this adapter if needed
- Problems after restore on other machine HOT 15
- Gerät taucht ohne states auf HOT 2
- Socket Operation not permitted HOT 6
- Activate Adapter testing
- Compatibility check to js-controller 3.3 and Admin5 React UI
- Compatibility check and testing for Node.js 14 and 16
- restart loop detected HOT 2
- Adapter lässt sich nicht Starten HOT 2
- Compatibility check to js-controller 4.0
- Update stable version in repo from 1.1.0 to 1.2.0
- pcap is listed as optional dependency, but is required HOT 14
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from iobroker.amazon-dash.