-
Platform information: AWS
-
Issue of the topic:
I was trying to setup a openhab cloud instance in a AWS (ubuntu-bionic-18.04-amd64-server) following quick start guide given here. Did required configurations to ngnix default file and config.json. However, I get 404 Not found message when trying to access this instance.
When I try to run the app.js (sudo node app.js), I get following error:error: uncaughtException: Cannot find module ‘bcrypt’
Tried rebuilding package after changing the bcrypt reference to bcryptjs, but didn’t resolve the problem. Any help on this would be appreciated.
Here’s the full log when I tried to start app.js
2018-11-17T18:35:49.840Z - info: openHAB-cloud: Backend service is starting up...
2018-11-17T18:35:49.842Z - info: openHAB-cloud: Backend logging initialized…
2018-11-17T18:35:50.009Z - error: uncaughtException: Cannot find module ‘bcrypt’ date=Sat Nov 17 2018 18:35:50 GMT+0000 (UTC), pid=19582, uid=0, gid=0, cwd=/opt/openhab-cloud, execPath=/usr/bin/node, version=v8.10.0, argv=[/usr/bin/node, /opt/openhab-cloud/app.js], rss=44445696, heapTotal=19398656, heapUsed=12507320, external=18130346, loadavg=[0.00390625, 0.0673828125, 0.115234375], uptime=4122, trace=[column=15, file=module.js, function=Module._resolveFilename, line=547, method=_resolveFilename, native=false, column=25, file=module.js, function=Module._load, line=474, method=_load, native=false, column=17, file=module.js, function=Module.require, line=596, method=require, native=false, column=18, file=internal/module.js, function=require, line=11, method=null, native=false, column=14, file=/opt/openhab-cloud/models/userdevice.js, function=null, line=3, method=null, native=false, column=30, file=module.js, function=Module._compile, line=652, method=_compile, native=false, column=10, file=module.js, function=Module._extensions…js, line=663, method=.js, native=false, column=32, file=module.js, function=Module.load, line=565, method=load, native=false, column=12, file=module.js, function=tryModuleLoad, line=505, method=null, native=false, column=3, file=module.js, function=Module._load, line=497, method=_load, native=false, column=17, file=module.js, function=Module.require, line=596, method=require, native=false, column=18, file=internal/module.js, function=require, line=11, method=null, native=false, column=18, file=/opt/openhab-cloud/gcm-xmpp.js, function=null, line=8, method=null, native=false, column=30, file=module.js, function=Module._compile, line=652, method=_compile, native=false, column=10, file=module.js, function=Module._extensions…js, line=663, method=.js, native=false, column=32, file=module.js, function=Module.load, line=565, method=load, native=false], stack=[Error: Cannot find module ‘bcrypt’, at Function.Module._resolveFilename (module.js:547:15), at Function.Module._load (module.js:474:25), at Module.require (module.js:596:17), at require (internal/module.js:11:18), at Object. (/opt/openhab-cloud/models/userdevice.js:3:14), at Module._compile (module.js:652:30), at Object.Module._extensions…js (module.js:663:10), at Module.load (module.js:565:32), at tryModuleLoad (module.js:505:12), at Function.Module._load (module.js:497:3), at Module.require (module.js:596:17), at require (internal/module.js:11:18), at Object. (/opt/openhab-cloud/gcm-xmpp.js:8:18), at Module._compile (module.js:652:30), at Object.Module._extensions…js (module.js:663:10), at Module.load (module.js:565:32)]
2018-11-17T18:35:50.010Z - error: code=MODULE_NOT_FOUND
Here’s the last lines in openhab-cloud.org-error.log
2018/11/17 18:28:53 [error] 18699#18699: *1 connect() failed (111: Connection refused) while connecting to upstream, client: xx:xx:xx:xx, server: xx:xx:xx:xx
2018/11/17 18:28:53 [error] 18699#18699: *1 open() “/usr/share/nginx/html/50x.html” failed (2: No such file or directory), client: xx:xx:xx:xx, server: xx:xx:xx:xx
Any help on this is really appreciated!