Page 1 of 1

Paths/files missing

PostPosted: Thu Dec 31, 2015 6:28 am
by usmcguy
I am running a manual install, and followed the directions at https://github.com/nutechsoftware/alarmdecoder-webapp .

1) cameras folder
The first thing I noticed at the bottom of my nginx error log, as I was trying to configure my camera, the file path to the camera file was missing. I navigate to the path $root/alarmdecoder/ad2web/static . I notice that the "cameras" link is red to /tmp/cameras. I look inside /tmp and find the cameras directory does not exist. (At the moment, I cannot get my Y-Cam camera to work. Not sure if its related to this or not).

Example error:
Code: Select all
2015/12/31 09:44:46 [error] 2866#0: *1167 open() "/opt/alarmdecoder-webapp/ad2web/static/css/user_custom.css" failed (2: No such file or directory), client: 192.168.1.50, server: , request: "GET /static/css/user_custom.css HTTP/1.1", host: "127.0.0.1", referrer: "https://127.0.0.1/cameras/"


2.) user_custom.css
The nginx error log shows many entries trying to access the file at this path $root/alarmdecoder-webapp/ad2web/static/css/user_custom.css, however it doesnt exit. The css folder is there with several files, except for user_custom.css
Example Error:
Code: Select all
2015/12/31 09:44:06 [error] 2866#0: *1212 open() "/opt/alarmdecoder-webapp/ad2web/static/css/user_custom.css" failed (2: No such file or directory), client: 192.168.1.50, server: , request: "GET /static/css/user_custom.css HTTP/1.1", host: "127.0.0.1", referrer: "https://127.0.0.1/log/"

Re: Paths/files missing

PostPosted: Thu Dec 31, 2015 12:34 pm
by kevin
Yes, the directory /tmp/cameras needs to exist and be writable/readable by the same user as the gunicorn process - currently only supported camera formats are mjpeg - so make sure you are using mjpeg


user_custom.css is an untracked file in git that a user can create to override styles without having to edit templates

Re: Paths/files missing

PostPosted: Sat Jan 02, 2016 5:26 pm
by usmcguy
In regard to the /tmp/cameras directory, was it supposed to have been automatically created when the software was installed? Also, if I remember correctly, /tmp gets emptied after every reboot. So if the software isn't creating it automatically, I must need to script it or add it to the startup script.

For the user_custom.css, this only exists if it is created, or is there one that supposed to be there as a empty/template file?

Re: Paths/files missing

PostPosted: Sat Jan 02, 2016 9:21 pm
by kevin
I do not believe /tmp gets cleared on every reboot, at least not with our image - the directory is supposed to be automatically created with successful creation of a camera but I suppose this might not work in instances where permissions are not correct?

The user_custom.css would be a file you would create, not supplied by us.

Re: Paths/files missing

PostPosted: Mon Jan 04, 2016 2:29 am
by usmcguy
I used the manual install directions, but I'll probably switch to a raspbian install soon. Currently, it is running on my Ubuntu server. Ubuntu clears temp at every boot.

Re: Paths/files missing

PostPosted: Mon Jan 04, 2016 5:02 pm
by kevin
Well, that definitely won't work with how the software is currently written - it has raspbian in mind as it's what we use and include in our bundles. I will admit to the camera code needing work but not currently high on the priority list at this time.