Errors during the installation of openhab-cloud

Tags: #<Tag:0x00007faee5e9e3c8> #<Tag:0x00007faee5e9e210> #<Tag:0x00007faee5e9df68>

Hi guys,

I’m trying to install the openhab-cloud using this Quick-start Guide and I have some troubles. Maybe someone can help me.

during the install process I have theses warnings and errors

Warnings

npm WARN deprecated mongodb@1.4.40: Please upgrade to 2.2.19 or higher
npm WARN deprecated native-or-bluebird@1.1.2: 'native-or-bluebird' is deprecated. Please use 'any-promise' instead.
npm WARN deprecated mongodb@2.1.8: Please upgrade to 2.2.19 or higher
loadDep:qs → request      ▀ ╢██████████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
npm WARN deprecated node-uuid@1.4.8: Use uuid module instead
loadDep:sntp → request    ▀ ╢██████████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
WARN engine hoek@0.7.6: wanted: {"node":"0.8.x"} (current: {"node":"4.2.6","npm":"3.5.2"})
WARN engine sntp@0.1.4: wanted: {"node":"0.8.x"} (current: {"node":"4.2.6","npm":"3.5.2"})
WARN engine boom@0.3.8: wanted: {"node":"0.8.x"} (current: {"node":"4.2.6","npm":"3.5.2"})
npm WARN prefer global mimer@0.2.1 should be installed with -g
npm WARN prefer global node-gyp@3.6.0 should be installed with -g
npm WARN lifecycle bcrypt@0.8.7~install: cannot run in wd %s %s (wd=%s) bcrypt@0.8.7 node-gyp rebuild /home/ubuntu/openhabcloud/node_modules/bcrypt-cache/node_modules/bcrypt

Errors

node-pre-gyp ERR! Tried to download(404): https://github.com/kelektiv/node.bcrypt.js/releases/download/v1.0.2/bcrypt_lib-v1.0.2-node-v46-linux-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for bcrypt@1.0.2 and node@4.2.6 (node-v46 ABI) (falling back to source compile with node-gyp)   

And when I try to start node app.js

ubuntu@ip-172-31-30-104:~/openhabcloud$ sudo node app.js
2017-03-29T08:43:52.091Z - info: openHAB-cloud: Backend service is starting up...
2017-03-29T08:43:52.099Z - info: openHAB-cloud: Backend logging initialized...
2017-03-29T08:43:52.771Z - info: openHAB-cloud: Initializing XMPP connection to GCM
2017-03-29T08:43:53.002Z - error: uncaughtException: Could not locate the bindings file. Tried:
 → /home/ubuntu/openhabcloud/node_modules/bcrypt-cache/node_modules/bcrypt/build/bcrypt_lib.node
 → /home/ubuntu/openhabcloud/node_modules/bcrypt-cache/node_modules/bcrypt/build/Debug/bcrypt_lib.node
 → /home/ubuntu/openhabcloud/node_modules/bcrypt-cache/node_modules/bcrypt/build/Release/bcrypt_lib.node
 → /home/ubuntu/openhabcloud/node_modules/bcrypt-cache/node_modules/bcrypt/out/Debug/bcrypt_lib.node
 → /home/ubuntu/openhabcloud/node_modules/bcrypt-cache/node_modules/bcrypt/Debug/bcrypt_lib.node
 → /home/ubuntu/openhabcloud/node_modules/bcrypt-cache/node_modules/bcrypt/out/Release/bcrypt_lib.node
 → /home/ubuntu/openhabcloud/node_modules/bcrypt-cache/node_modules/bcrypt/Release/bcrypt_lib.node
 → /home/ubuntu/openhabcloud/node_modules/bcrypt-cache/node_modules/bcrypt/build/default/bcrypt_lib.node
 → /home/ubuntu/openhabcloud/node_modules/bcrypt-cache/node_modules/bcrypt/compiled/4.2.6/linux/x64/bcrypt_lib.node date=Wed Mar 29 2017 08:43:52 GMT+0000 (UTC), pid=3040, uid=0, gid=0, cwd=/home/ubuntu/openhabcloud, execPath=/usr/bin/nodejs, version=v4.2.6, argv=[/usr/bin/nodejs, /home/ubuntu/openhabcloud/app.js], rss=64380928, heapTotal=41463648, heapUsed=29050136, loadavg=[0.1875, 0.1845703125, 0.13671875], uptime=4311, trace=[column=9, file=/home/ubuntu/openhabcloud/node_modules/bindings/bindings.js, function=bindings, line=88, method=null, native=false, column=35, file=/home/ubuntu/openhabcloud/node_modules/bcrypt-cache/node_modules/bcrypt/bcrypt.js, function=, line=3, method=null, native=false, column=26, file=module.js, function=Module._compile, line=410, method=_compile, native=false, column=10, file=module.js, function=Object.Module._extensions..js, line=417, method=Module._extensions..js, native=false, column=32, file=module.js, function=Module.load, line=344, method=load, native=false, column=12, file=module.js, function=Function.Module._load, line=301, method=Module._load, native=false, column=17, file=module.js, function=Module.require, line=354, method=require, native=false, column=17, file=internal/module.js, function=require, line=12, method=null, native=false, column=14, file=/home/ubuntu/openhabcloud/node_modules/bcrypt-cache/lib/bcrypt.js, function=null, line=7, method=null, native=false, column=3, file=/home/ubuntu/openhabcloud/node_modules/bcrypt-cache/lib/bcrypt.js, function=, line=18, method=null, native=false, column=26, file=module.js, function=Module._compile, line=410, method=_compile, native=false, column=10, file=module.js, function=Object.Module._extensions..js, line=417, method=Module._extensions..js, native=false, column=32, file=module.js, function=Module.load, line=344, method=load, native=false, column=12, file=module.js, function=Function.Module._load, line=301, method=Module._load, native=false, column=17, file=module.js, function=Module.require, line=354, method=require, native=false, column=17, file=internal/module.js, function=require, line=12, method=null, native=false], stack=[Error: Could not locate the bindings file. Tried:,  → /home/ubuntu/openhabcloud/node_modules/bcrypt-cache/node_modules/bcrypt/build/bcrypt_lib.node,  → /home/ubuntu/openhabcloud/node_modules/bcrypt-cache/node_modules/bcrypt/build/Debug/bcrypt_lib.node,  → /home/ubuntu/openhabcloud/node_modules/bcrypt-cache/node_modules/bcrypt/build/Release/bcrypt_lib.node,  → /home/ubuntu/openhabcloud/node_modules/bcrypt-cache/node_modules/bcrypt/out/Debug/bcrypt_lib.node,  → /home/ubuntu/openhabcloud/node_modules/bcrypt-cache/node_modules/bcrypt/Debug/bcrypt_lib.node,  → /home/ubuntu/openhabcloud/node_modules/bcrypt-cache/node_modules/bcrypt/out/Release/bcrypt_lib.node,  → /home/ubuntu/openhabcloud/node_modules/bcrypt-cache/node_modules/bcrypt/Release/bcrypt_lib.node,  → /home/ubuntu/openhabcloud/node_modules/bcrypt-cache/node_modules/bcrypt/build/default/bcrypt_lib.node,  → /home/ubuntu/openhabcloud/node_modules/bcrypt-cache/node_modules/bcrypt/compiled/4.2.6/linux/x64/bcrypt_lib.node,     at bindings (/home/ubuntu/openhabcloud/node_modules/bindings/bindings.js:88:9),     at Object.<anonymous> (/home/ubuntu/openhabcloud/node_modules/bcrypt-cache/node_modules/bcrypt/bcrypt.js:3:35),     at Module._compile (module.js:410:26),     at Object.Module._extensions..js (module.js:417:10),     at Module.load (module.js:344:32),     at Function.Module._load (module.js:301:12),     at Module.require (module.js:354:17),     at require (internal/module.js:12:17),     at /home/ubuntu/openhabcloud/node_modules/bcrypt-cache/lib/bcrypt.js:7:14,     at Object.<anonymous> (/home/ubuntu/openhabcloud/node_modules/bcrypt-cache/lib/bcrypt.js:18:3),     at Module._compile (module.js:410:26),     at Object.Module._extensions..js (module.js:417:10),     at Module.load (module.js:344:32),     at Function.Module._load (module.js:301:12),     at Module.require (module.js:354:17),     at require (internal/module.js:12:17)]
2017-03-29T08:43:53.004Z - error:  tries=[/home/ubuntu/openhabcloud/node_modules/bcrypt-cache/node_modules/bcrypt/build/bcrypt_lib.node, /home/ubuntu/openhabcloud/node_modules/bcrypt-cache/node_modules/bcrypt/build/Debug/bcrypt_lib.node, /home/ubuntu/openhabcloud/node_modules/bcrypt-cache/node_modules/bcrypt/build/Release/bcrypt_lib.node, /home/ubuntu/openhabcloud/node_modules/bcrypt-cache/node_modules/bcrypt/out/Debug/bcrypt_lib.node, /home/ubuntu/openhabcloud/node_modules/bcrypt-cache/node_modules/bcrypt/Debug/bcrypt_lib.node, /home/ubuntu/openhabcloud/node_modules/bcrypt-cache/node_modules/bcrypt/out/Release/bcrypt_lib.node, /home/ubuntu/openhabcloud/node_modules/bcrypt-cache/node_modules/bcrypt/Release/bcrypt_lib.node, /home/ubuntu/openhabcloud/node_modules/bcrypt-cache/node_modules/bcrypt/build/default/bcrypt_lib.node, /home/ubuntu/openhabcloud/node_modules/bcrypt-cache/node_modules/bcrypt/compiled/4.2.6/linux/x64/bcrypt_lib.node]
2017-03-29T08:43:53.748Z - warn: openHAB-cloud: GCM XMPP error: XMPP authentication failure

Is it some possible to do some quick fix?

Big thanks in advance,

Ivan

EDIT:

Finally I’ve got the sweet spot !!!

So, it’s a known issue with bcrypt. https://github.com/kelektiv/node.bcrypt.js/issues/432

Like they said I replace bcrypt with bcrypt-nodejs in the package.json and finally no errors on installation process.

I’m using AWS and I have to say something, in the tutorial, when we are on the “Security Group” we have to add the port 3000 as well as the others one.

And then you can reach your installation with http://<<>your AWS DNS or IP>:3000

EDIT 2:

After diging a while to login in the login area, I could create many users with fake UUID and secrets

but when I try to use the makeadmin.js script it’s impossible. I have some errors with mongoose.

It would be nice to have a little bit more documentation :wink:

@ouranos6,

ok cool to read you made it. If you need support let us know.
Yes we will extend Docu, but it is always a time thing.
But I got you…

bcrypt-nodejs caused a lot of trouble regarding CPU and performance, so we switched away…

br Mehmet

Hi Mehmet,

Ok but i didnt manage to have a clean install with bcrypt, have you sone advices?

Ivan

@ouranos6,

what node version are you using? Could you try to go to latest node 7.5 version? Cause it works currently with node 7.5 and bcrypt 1.0.2
Let me know. If not I would need to set up same versions state setup as you have.

Ok, I was with the old node version v4.2.6 (The one how was installed by default by ubuntu).

Maybe you can add that to the starting guide :wink:

curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash -
sudo apt-get install -y nodejs

Then I re do the install and the config file!!!

And tada!!!

It’s working now thank’s!!

1 Like

you re welcome :slightly_smiling_face:
Yes, true I gonna add that info.

Hi,
I still have this problem:
GCM XMPP error: XMPP authentication failure

I don’t have this row: “registration_enabled”: true… someone solved this issue changing this row:
“registration_enabled”: true

but i don’t have that row.

Below my config.json
{
“system”: {
“host”: “www.myhost.com”,
“port”: “443”,
“protocol”: “https”,
“logging”: “debug”
},
“express”:{
“key” : “some express key”
},
“mongodb”: {
“hosts”: [“127.0.0.1”],
“db”: “openhab”
},
“redis”: {
“host”: “127.0.0.1”,
“port”: “6379”,
“password”: “secret”
},
“mailer”: {
“host” : “somehost”,
“port”: 465,
“secureConnection”: true,
“user”: “someuser”,
“password”: “somepass”,
“from”: “”
},
“gcm” : {
“jid”: "something@gcm.googleapis.com",
“password”: “password”
},
“ifttt” : {
“iftttChannelKey” : “key”,
“iftttTestToken” : “token”
},
“legal”: {
“terms” : “”,
“policy”: “”
}
}

Thank you for your cooperation in advance.

Andrea

I think you can ignore that. Is it working for you now?
Let me know if i can support.

@MARZIMA

I followed the instructions numerous times on github, this link openHAB Cloud setup on Google Cloud Platform and others.

ALL of them fail with nodejs, missing the bycrpt.

Thats with node 7 and node 8.

Are you able to update the documentation so that this works?


0|Netsecure Cloud  | { Error: Could not locate the bindings file. Tried:
0|Netsecure Cloud  |  → /opt/openhab-cloud/node_modules/bcrypt-cache/node_modules/bcrypt/build/bcrypt_lib.node
0|Netsecure Cloud  |  → /opt/openhab-cloud/node_modules/bcrypt-cache/node_modules/bcrypt/build/Debug/bcrypt_lib.node
0|Netsecure Cloud  |  → /opt/openhab-cloud/node_modules/bcrypt-cache/node_modules/bcrypt/build/Release/bcrypt_lib.node
0|Netsecure Cloud  |  → /opt/openhab-cloud/node_modules/bcrypt-cache/node_modules/bcrypt/out/Debug/bcrypt_lib.node
0|Netsecure Cloud  |  → /opt/openhab-cloud/node_modules/bcrypt-cache/node_modules/bcrypt/Debug/bcrypt_lib.node
0|Netsecure Cloud  |  → /opt/openhab-cloud/node_modules/bcrypt-cache/node_modules/bcrypt/out/Release/bcrypt_lib.node
0|Netsecure Cloud  |  → /opt/openhab-cloud/node_modules/bcrypt-cache/node_modules/bcrypt/Release/bcrypt_lib.node
0|Netsecure Cloud  |  → /opt/openhab-cloud/node_modules/bcrypt-cache/node_modules/bcrypt/build/default/bcrypt_lib.node
0|Netsecure Cloud  |  → /opt/openhab-cloud/node_modules/bcrypt-cache/node_modules/bcrypt/compiled/8.10.0/linux/x64/bcrypt_lib.node
0|Netsecure Cloud  |     at bindings (/opt/openhab-cloud/node_modules/bindings/bindings.js:88:9)
0|Netsecure Cloud  |     at Object.<anonymous> (/opt/openhab-cloud/node_modules/bcrypt-cache/node_modules/bcrypt/bcrypt.js:3:35)
0|Netsecure Cloud  |     at Module._compile (module.js:652:30)
0|Netsecure Cloud  |     at Object.Module._extensions..js (module.js:663:10)
0|Netsecure Cloud  |     at Module.load (module.js:565:32)
0|Netsecure Cloud  |     at tryModuleLoad (module.js:505:12)
0|Netsecure Cloud  |     at Function.Module._load (module.js:497:3)
0|Netsecure Cloud  |     at Module.require (module.js:596:17)
0|Netsecure Cloud  |     at require (internal/module.js:11:18)
0|Netsecure Cloud  |     at /opt/openhab-cloud/node_modules/bcrypt-cache/lib/bcrypt.js:7:14
0|Netsecure Cloud  |     at Object.<anonymous> (/opt/openhab-cloud/node_modules/bcrypt-cache/lib/bcrypt.js:18:3)
0|Netsecure Cloud  |     at Module._compile (module.js:652:30)
0|Netsecure Cloud  |     at Object.Module._extensions..js (module.js:663:10)
0|Netsecure Cloud  |     at Module.load (module.js:565:32)
0|Netsecure Cloud  |     at tryModuleLoad (module.js:505:12)
0|Netsecure Cloud  |     at Function.Module._load (module.js:497:3)
0|Netsecure Cloud  |   tries:
0|Netsecure Cloud  |    [ '/opt/openhab-cloud/node_modules/bcrypt-cache/node_modules/bcrypt/build/bcrypt_lib.node',
0|Netsecure Cloud  |      '/opt/openhab-cloud/node_modules/bcrypt-cache/node_modules/bcrypt/build/Debug/bcrypt_lib.node',
0|Netsecure Cloud  |      '/opt/openhab-cloud/node_modules/bcrypt-cache/node_modules/bcrypt/build/Release/bcrypt_lib.node',
0|Netsecure Cloud  |      '/opt/openhab-cloud/node_modules/bcrypt-cache/node_modules/bcrypt/out/Debug/bcrypt_lib.node',
0|Netsecure Cloud  |      '/opt/openhab-cloud/node_modules/bcrypt-cache/node_modules/bcrypt/Debug/bcrypt_lib.node',
0|Netsecure Cloud  |      '/opt/openhab-cloud/node_modules/bcrypt-cache/node_modules/bcrypt/out/Release/bcrypt_lib.node',
0|Netsecure Cloud  |      '/opt/openhab-cloud/node_modules/bcrypt-cache/node_modules/bcrypt/Release/bcrypt_lib.node',
0|Netsecure Cloud  |      '/opt/openhab-cloud/node_modules/bcrypt-cache/node_modules/bcrypt/build/default/bcrypt_lib.node',
0|Netsecure Cloud  |      '/opt/openhab-cloud/node_modules/bcrypt-cache/node_modules/bcrypt/compiled/8.10.0/linux/x64/bcrypt_lib.node' ] }
PM2                | App [Netsecure Cloud:0] exited with code [1] via signal [SIGINT]
PM2                | App [Netsecure Cloud:0] starting in -fork mode-
PM2                | App [Netsecure Cloud:0] online

Anyone???

Install a new node version, fails with bcrypt issues. Install a node 7 version, part success but then the openhab alexa needs node 10

The documentation of these products needs some HEAVY reworking. Id be happy to do it if I could find a combination that actually works.

Just tried installing openhab-cloud and getting lots of errors as well (see some examples below).
I installed Node version 7.10 on Debian 10 and then openhab-cloud with command: sudo npm install.

  ...
> node-gyp rebuild

gyp WARN EACCES user "root" does not have permission to access the dev dir "/root/.node-gyp/7.10.1"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/var/www/openhab.moerman.online/openhab-cloud/node_modules/memwatch-next/.node-gyp"
make: Entering directory '/var/www/openhab.moerman.online/openhab-cloud/node_modules/memwatch-next/build'
  CXX(target) Release/obj.target/memwatch/src/heapdiff.o
In file included from ../src/heapdiff.hh:8,
                 from ../src/heapdiff.cc:12:
/var/www/openhab.moerman.online/openhab-cloud/node_modules/memwatch-next/.node-gyp/7.10.1/include/node/v8.h: In static member function ‘static void v8::V8::RemoveGCPrologueCallback(v8::GCCallback)’:
/var/www/openhab.moerman.online/openhab-cloud/node_modules/memwatch-next/.node-gyp/7.10.1/include/node/v8.h:9547:57: warning: cast between incompatible function types from ‘v8::GCCallback’ {aka ‘void (*)(v8::GCType, v8::GCCallbackFlags)’} to ‘v8::Isolate::GCCallback’ {aka ‘void (*)(v8::Isolate*, v8::GCType, v8::GCCallbackFlags)’} [-Wcast-function-type]
       reinterpret_cast<v8::Isolate::GCCallback>(callback));
                                                         ^
/var/www/openhab.moerman.online/openhab-cloud/node_modules/memwatch-next/.node-gyp/7.10.1/include/node/v8.h: In static member function ‘static void v8::V8::RemoveGCEpilogueCallback(v8::GCCallback)’:
/var/www/openhab.moerman.online/openhab-cloud/node_modules/memwatch-next/.node-gyp/7.10.1/include/node/v8.h:9554:57: warning: cast between incompatible function types from ‘v8::GCCallback’ {aka ‘void (*)(v8::GCType, v8::GCCallbackFlags)’} to ‘v8::Isolate::GCCallback’ {aka ‘void (*)(v8::Isolate*, v8::GCType, v8::GCCallbackFlags)’} [-Wcast-function-type]
       reinterpret_cast<v8::Isolate::GCCallback>(callback));
   ...

There are lots and lots of similar errors. And the last message is:

npm WARN grunt-qunit-node@0.1.0 requires a peer of qunitjs@^2.0.0 but none was installed.

The access error is weird since I run this command as root and the .node-gyp directory is not created at all.
When starting the app (sudo node app.js) after copying the sample config and changing the hostname:

Option polling duration is not valid. Please refer to the README.
node_redis: Warning: Redis server does not require a password, but a password was supplied.

and it returns to the command prompt.

I read about issues with node 8 as well and I tried version 10 before without luck. What node version should be used?

BTW: Node 7 is quite old with lot’s of security issues…