I am going through a new installation of v7 using the manual approach. I was at the step where you create a self-signed SSL certificate. The instruction is given as:
sudo mkdir /home/pi/gateway/data/secure
This fails because there is no "/home/pi/gateway/data" directory. At this point in the installation the only directory in "/home/pi/gateway" is "www". I got it to work by adding the "-p" option to mkdir which creates any necessary parent directories, ie:
sudo mkdir -p /home/pi/gateway/data/secure
Quote from: syrinxtech on December 29, 2015, 10:29:13 PM
I am going through a new installation of v7 using the manual approach. I was at the step where you create a self-signed SSL certificate. The instruction is given as:
sudo mkdir /home/pi/gateway/data/secure
This fails because there is no "/home/pi/gateway/data" directory. At this point in the installation the only directory in "/home/pi/gateway" is "www". I got it to work by adding the "-p" option to mkdir which creates any necessary parent directories, ie:
sudo mkdir -p /home/pi/gateway/data/secure
I found one more slight issue when getting ready to install socket.io:
The line of code in the instructions reads:
sudo mkdir /home/pi/gateway
But this also fails because the "/home/pi/gateway" directory was created earlier during the creation of the directories for the nginx installation. You can just skip this one step.
Thanks for the heads up, it's fixed now, please proof read for me :)
Looks good Felix....now that's what I call quick service!
Thanks! ;)
Just found another issue when configuring the "Gateway App":
When creating the "gateway.conf" file, there are references to the following files:
/home/pi/moteino/gateway.js
/home/pi/moteino/gateway.sys.log
If I'm not mistaken the "/home/pi/moteino" directory was moved to "/home/pi/gateway"?
So, these files should look like:
/home/pi/gateway/gateway.js
/home/pi/gateway/gateway.sys.log
Now that the gateway.conf file is correct and the script will start, as soon as it does I get the following error messages in the "gateway.sys.log" file:
/home/pi/gateway/node_modules/nedb/lib/datastore.js:69
if (err) { throw err; }
^
Error: ENOENT, open '/home/pi/gateway/data/db/gateway.db'
[2015-12-30T05:11:46.076Z] (sys) Starting
/home/pi/gateway/node_modules/nedb/lib/datastore.js:69
if (err) { throw err; }
^
Error: ENOENT, open '/home/pi/gateway/data/db/gateway.db'
I looked in the "home/pi/gateway/data" directory and there is no "db" directory and obviously no gateway.db file. Should this directory and file have been created during the install process or does it happen at some other time? Is this something that changed since the v7 upgrade?
Well, at long last I have a working v7!!
I fixed the ENOSPC issue by doing the following, not necessarily in this order:
1. chgrp and chown to pi on /home/pi/gateway/data directory
2. created db directory in /home/pi/gateway/data and then chgrp and chown to pi
3. ran touch to create gateway.db file in /home/pi/gateway/data/db directory, followed by chgrp and chown to pi
4. stopped and restarted gateway and web browser.....and it worked.
I added the missing mkdir /home/pi/gateway/data/db -p
You shouldn't have to do all that chowning.
Good catch, fixed.
Thanks.
I wasn't sure but at the early hour I was working on it I figured what the heck.
If it will cause problems I'll change it back to root.
Thanks, glad to help.