ArchiveSW - Display & Data Archive Storage

ok, log files deleted
then
pi@wfarchivepi:~/wfarchive $ node server

the only file in \log is now Server.log
with content
====================
2018-09-18 13:35:24 Starting Server v1.6.12.015 on port: 8080

with the error message on browser at http://192.168.1.234:8080/
“The connection to the server was reset while the page was loading.”

1 Like

I am running out of items to check for.

What files are in wfarchive/views?

Is there any output in the terminal window when you run:

node server

while you try to load the web page?

pi@wfarchivepi:~/wfarchive/views $ ls -l
total 52
-rw-r–r-- 1 pi pi 365 Sep 12 15:00 about.ejs
-rw-r–r-- 1 pi pi 14133 Sep 14 21:26 config.ejs
drwxr-xr-x 2 pi pi 4096 Sep 18 09:22 files
-rw-r–r-- 1 pi pi 97 Sep 9 09:14 footer.ejs
-rw-r–r-- 1 pi pi 1455 Sep 13 14:46 head.ejs
-rw-r–r-- 1 pi pi 423 Sep 16 13:06 header.ejs
-rw-r–r-- 1 pi pi 1618 Sep 14 23:37 index.ejs
-rw-r–r-- 1 pi pi 1092 Sep 10 09:31 logs.ejs
-rw-r–r-- 1 pi pi 1114 Sep 17 12:55 piio.ejs
-rw-r–r-- 1 pi pi 2222 Sep 16 05:37 process.ejs

Thre is no output in the terminal window … it just sits there until I do a -c

Sorry to cause problems! :wink:I’m happy to try again from scratch … maybe I missed something.

1 Like

look at config.json and see what the server port is set to.

it’s the seventh line from the top.

“server”:
{
“port”: 8080,
“updatefiles”: “yes”
},

1 Like

And you confirmed the IP address on the RPi.

Okay, reboot the RPi and see if you can connect.

ok.

Rebooted.
pm2 start
tried to connect to web server from browser.
No change - not working

One thing I have noticed is that I can’t get Chromium web browser to work … everything else seems ok.
I’m using firefox. I wonder if there’s something weird with the SD card … maybe I should try from scratch with another one?

1 Like

Wait, are you using a browser on the RPi or an external device?

both … RPi (firefox) and Mac (Safari).
Both similar errors

1 Like

On the RPi. Try http://localhost:8080/about

Also. Try

http://ipaddress:8080/about

http://ipaddress:8080/about gives Firefox can’t find the server at ipaddress

but http://localhost:8080/about works!
and config works, but
http://localhost:8080/ (as in the “Home” link) does not work (times out as before)

1 Like

That’s good news. It’s actually something on the index page that is causing you an issue. Now I just need to figure out what it is.

Thanks very much for your help and time Gary! Yes … so it all seems to be working other than whatever’s on the Home page.
Thanks again
regards

Wayne

1 Like

It’s looking for data from the database and there is none. So, I need to either move this from the index page and fix it so it won’t look up another page.

Configure the rest of the data, then run

node updatefiles

then change crontab so the reboot reads:

@reboot node /home/pi/wfarchive/start.js

ok. Thanks again! Most appreciated

w

1 Like

It is I that appreciate all the time you took to find the real issue.

This was a big oversight on my part. I will have new files online in a few minutes. You can get them by running

node updatefiles

That will take care of everything except you will need to restart Server

New files are online.

The ‘bug’ is still in the code (maybe) but I have moved the output to it’s own page, so the web server will not lock up on a new installation. I will work on a better fix to account for a fresh database.

2 Likes

except with @peter 's script and a basic install of the raspberry, node is not installed so it can’t be executed on a standard node install

1 Like

You will have to translate the call and start.js to python.

However, the theory works on all platforms.

1 Like

Installed node.js so that is ok, now trying to figure out how to use your code snippet :wink:
edit : this goes way over my knowledge lol. → I abandon this path. I’m not a coder

1 Like