I was running a own openhabcloud since ages on a Strato Ubuntu 16.04 64bit system. Now I try to reinstall the cloud on a fresh Strato server with Ubuntu 18.04 64bit system.
Unfortunately without luck.
Here is what I did:
sudo apt-get update
sudo apt-get upgrade
sudo adduser openhabclouduser
usermod -aG sudo openhabclouduser
su - openhabclouduser
sudo apt-get install software-properties-common
sudo apt-get install curl
sudo apt install nginx
sudo apt install ufw
sudo add-apt-repository ppa:certbot/certbot
sudo apt-get install python-certbot-nginx
sudo certbot --nginx
sudo rm /etc/nginx/sites-enabled/default
sudo vim /etc/nginx/sites-enabled/hostname.de
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name hostname.de ;
root /var/www/hostname.de;
index index.html index.htm;
location ~ /.well-known {
allow all;
}
}
sudo mkdir /var/www/hostname.de
sudo vim /var/www/hostname.de/index.html
<h1>Test</h1>
sudo nginx -t
sudo systemctl reload nginx
sudo ufw allow 'Nginx Full'
sudo ufw delete allow 'Nginx HTTP'
sudo ufw enable
sudo certbot --nginx -d hostname.de -d www.hostname.de
sudo apt-get install letsencrypt
sudo letsencrypt certonly -a webroot --webroot-path=/var/www/hostname.de -d hostname.de
sudo apt-get install build-essential redis-server mongodb python git
sudo apt install npm
cd /home/openhabclouduser
wget https://nodejs.org/download/release/v7.10.1/node-v7.10.1-linux-x64.tar.gz
sudo mkdir -p /opt/nodejs
sudo tar -xvzf node-v7.10.1-linux-x64.tar.gz -C /opt/nodejs/
cd /opt/nodejs
sudo mv node-v7.10.1-linux-x64 7.10.1
sudo ln -s 7.10.1 current
sudo ln -s /opt/nodejs/current/bin/node /usr/bin/node
# This is to verify the node version
node -v
# It should say 7.10.1 now
# After that just clone the repo
cd /var/www/hostname.de
sudo git clone https://github.com/openhab/openhab-cloud.git
sudo chmod 777 openhab-cloud/
cd openhab-cloud/
sudo npm install
2020-09-24 17:45:05:055 error: uncaughtException: Cannot find module ‘bcrypt’
Error: Cannot find module ‘bcrypt’
at Function.Module._resolveFilename (module.js:470:15)
at Function.Module._load (module.js:418:25)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at Object. (/var/www/hostname.de/openhab-cloud/models/userdevice.js:3:14)
at Module._compile (module.js:571:32)
at Object.Module._extensions…js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at Object. (/var/www/hostname.de/openhab-cloud/fcm-xmpp.js:8:20)
at Module._compile (module.js:571:32)
at Object.Module._extensions…js (module.js:580:10)
at Module.load (module.js:488:32)
2020-09-24 17:45:05:055 error: undefined
Maybe there is another clever idea for me.
Found this
Is that error message triggered again by running the installer after fixing the first problem ?
When I look into the node_modules directory located in openhab-cloud then besides others I see these directories:
bcrypt/ bcrypt-cache/ bcrypt-pbkdf/
With these versions ( command started from within the openhab-cloud directory )
I installed the cloud a couple of years ago without major problems. But now the file system of my server crashed and I was forced into a fresh install.
What a mess!
It seems the cloud is no longer maintained.
If you have any hints to get beyond the unavailable bcrypt package, please let us know.
Thx
-bernie
PS: in an earlier version of this post I falsely addressed Wolfgang: sorry!
According to the server headers nginx/1.10.3 is running on myopenhab.org.
The header also states that Ubuntu is running on it.
So according to the nginx version my conclusion would be that Ubuntu 16.04.X is running on that server.
Standard support ends in April 2021.
The only changes I see on git belong to updates related to OH3 although there are several users reporting back the same issues like those you have.
as already reported in reply #201, due to SD-card crash I lost my private cloud instance. After days of digging through this forum and Github, I have finally (!) managed to get the cloud back online. The time I invested to reinstall openhab-cloud was almost unbearable and if I hadn’t managed to install the cloud a couple of years ago, I would have given up by now and switched to different automation software.
HOWEVER, I did not. So, in case someone else runs into the same problem depicted in this post (and its replies), here’s my guide to saving precious live time .
Preface: Ryan’s installation guide is still pretty comprehensive but needs a couple of adaptions, almost three years after the intial post. The steps below have been tested on following platform (and most likely will work on different setups, as well):
OH Version: 2.4 HW: RPi Zero + ENC28J60 OS : dietpi v6.33.3 & nginx 1.14.2
Make yourself familiar with Ryan’s post (this one).
Step #7: Make sure, that you really DO install build-essential and python. Some users (including me) have reported that the installation process npm install broke, because the precompiled package bcrypt@1.0.2 was unavailable! According to bcrypt@github, this is not a problem: if a precompiled version of a package is unavailable for a specific platform, npm install falls back to compile from source automagically.
Step #7: do not pull the master trunk of openhab-cloud at GitHub - I wasn’t able to get that one running. Instead, pull tag 1.0.10: git clone --depth 1 --branch 1.0.10 https://github.com/openhab/openhab-cloud.git
Step #7: Make sure that you install NodeJS, no other than v7.10.1, the install process will fail otherwise. If there is no setup-script for your architecture, don’t worry! You can follow the manual install instructions on GitHub - no problem.
Step #7: When I first tried to run the cloud with node app.js, the console log reported “unmet dependencies”. After a while of googling I found this on GitHub. If the cloud does not start after the first npm install, try at least npm install bcryptjs@^2.4.3 qunitjs@^2.0.0 npm install node-time
which will post-install 3 more packages.
Reply #28 suggests using Unitech’s Process Manager PM2 to have app.js run as a system service. As openhab-cloud is tied to NodeJS v7.10.1, cloning the github repository from the latest branch is again no option. I found that PM2 versions below 4.x.x actually work with NodeJS v7.10.1 npm install pm2@3.5.0 -g (as root) and then pm2 startup
Consult Readme.MD for details on PM2!
Hope this helps!
Good luck & Best regards,
-bernie
Has anyone launched a cloud on OH3?
Everything worked fine for me on OH2.5, but on OH3 I can’t go further than the HOME page.
A similar problem and its solution are described here https://github.com/openhab/openhab-cloud/issues/313, but nothing works for me.
Adding <“proxyHost”: home.openhab.mydomain.co> to config.json does not solve the problem. Apparently you need to implement all the actions described in the penultimate post, but here my knowledge is not enough.
i tried to install the cloud server with the steps described at the first post.
At the point i have to start “app.js” i get the following error:
sudo node app.js
{"errno":-2,"syscall":"open","code":"ENOENT","path":"certs/aps/AuthKey.p8"}
(node:43041) Warning: Accessing non-existent property 'MongoError' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
node_redis: Warning: Redis server does not require a password, but a password was supplied.
I am trying to install it on a “fresh” vserver (ubuntu 20.04).
I found a similar issue. This seems to be due to the APN config. I do not use it, so I have a dummy config for it (oh-cloud won’t seem to start without it), but the file referred to in the signingKey parameter still neds to exist even if empty.
I have this in my config:
"apn" : {
[... rest of apm config here, even if "dummy" ...]
"signingKey": "aps.p8"
},
And then just created an empty “aps.p8” file in the same directory as the config.js.
Thank you!
I created the path /certs/aps/AuthKey.p8 with an empty file.
Also i removed the password line from config.json for redis.
After these two changed i only get one error message:
(node:43041) Warning: Accessing non-existent property 'MongoError' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
I’m also having the same issues. When I moved from S2300 to S2306 my cloud connector started to have some issues. I attempted to update and now I’m down with the same errors.
I have removed the apn section and the node just crashes. Doesn’t write any logs either.
# node app.js
(node:12469) Warning: Accessing non-existent property 'MongoError' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
#