manual setup fails

General Discussion

Re: manual setup fails

Postby brada » Fri Oct 02, 2015 6:00 am

sudo cp contrib/gunicorn.d/alarmdecoder /etc/gunicorn.d/
Edit /etc/gunicorn.d/alarmdecoder and change the user/group you'd like it to run as.
Change permissions on /opt/alarmdecoder-webapp to grant permissions for your chosen user.


these 3 steps? yeah. heres the current contents of /etc/gunicorn.d/alarmdecoder:

Code: Select all
CONFIG = {
    'working_dir': '/opt/alarmdecoder-webapp',
    'user': 'pi',
    'group': 'dialout',
    'args': (
        '--worker-class=socketio.sgunicorn.GeventSocketIOWorker',
        '--timeout=120',
        '--env=POLICY_SERVER=0',
        #'--debug',
        #'--log-level=debug',
        'wsgi:application',
    ),
}
brada
newt
newt
 
Posts: 13
Joined: Mon Sep 28, 2015 10:40 pm

Re: manual setup fails

Postby kevin » Fri Oct 02, 2015 10:07 am

I'm kind of at a loss here, the app is hardcoded to run at port 5000, so I can only assume that gunicorn isn't launching the app in /opt/alarmdecoder-webapp properly - do your gunicorn logs provide any information?
Not an employee of the company. Just here to help and keep things clean.
kevin
Platinum Nut
Platinum Nut
 
Posts: 994
Joined: Fri Aug 16, 2013 10:10 am

Re: manual setup fails

Postby brada » Sun Oct 04, 2015 5:24 pm

theres a whole lot of this:

[2015-10-04 18:22:43 +0000] [18182] [INFO] Booting worker with pid: 18182

once or twice a second. looks like its not starting up and restarting for some reason.

i get this when enabling log-level-debug:

[2015-10-04 18:23:39 +0000] [19080] [INFO] Booting worker with pid: 19080
[2015-10-04 18:23:39 +0000] [18938] [DEBUG] 1 workers
[2015-10-04 18:23:39 +0000] [18938] [DEBUG] 1 workers
brada
newt
newt
 
Posts: 13
Joined: Mon Sep 28, 2015 10:40 pm

Re: manual setup fails

Postby kevin » Sun Oct 04, 2015 6:26 pm

Is there any info in the /opt/alarmdecoder-webapp/instance/logs/ that say anything with regard to errors? Do also make sure that gunicorn is actually loading the alarmdecoder config

Code: Select all
gunicorn --check-config


If it's not loading the alarmdecoder config you may have to force it:
Code: Select all
gunicorn --config /etc/gunicorn.d/alarmdecoder


I'm sure there's a "config dir" parameter in /etc/init.d/gunicorn - see if it's pointed to /etc/gunicorn.d/* if not, make sure it is
Not an employee of the company. Just here to help and keep things clean.
kevin
Platinum Nut
Platinum Nut
 
Posts: 994
Joined: Fri Aug 16, 2013 10:10 am

Re: manual setup fails

Postby brada » Sun Oct 04, 2015 9:21 pm

got it running. looks like the first time i ran the db init, it didnt like it. re-running it fixed the problem.

still having some trouble - its not interfacing properly with the device. it will open the device fine, but times out on backing up. even tried starting gunicorn up as root, and it wouldnt do it, so theres something pretty wrong. i can run screen as root and interface with the port/device just fine.
brada
newt
newt
 
Posts: 13
Joined: Mon Sep 28, 2015 10:40 pm

Re: manual setup fails

Postby kevin » Mon Oct 05, 2015 9:48 am

Please describe what "times out on backing up" means? What step of the process is this? If you can communicate with the device properly over screen on the com port then it's not a faulty device, so we can rule that out.
Not an employee of the company. Just here to help and keep things clean.
kevin
Platinum Nut
Platinum Nut
 
Posts: 994
Joined: Fri Aug 16, 2013 10:10 am

Re: manual setup fails

Postby brada » Mon Oct 05, 2015 6:35 pm

during the web based setup:

Device Testing
Opening device ✔
Saving device configuration ⚠ Test timed out.
Keypad communication (Send) ⚠ Test timed out.
Keypad communication (Receive) ⚠ Test timed out.
brada
newt
newt
 
Posts: 13
Joined: Mon Sep 28, 2015 10:40 pm

Re: manual setup fails

Postby brada » Mon Oct 05, 2015 6:38 pm

also strange, but not the end of the world - it doesnt seem to consistently get user_custom.css. firebug says its 404ing, but the other css and js files seem to be getting downloaded just fine.
brada
newt
newt
 
Posts: 13
Joined: Mon Sep 28, 2015 10:40 pm

Re: manual setup fails

Postby kevin » Mon Oct 05, 2015 7:34 pm

The tests timing out are a sign that the device is not communicating with the panel correctly. You have verified that you are able to arm and disarm your panel talking to the device directly with screen? The errors presented are usually a sign of a miswiring of the DI and DO lines, or in some cases the device address, but if you are seeing messages and able to arm and disarm, then it is perhaps one of the configuration options you went through setup.

The user_custom.css is an untracked file in git for users who wish to override the display with their own css - it is purposefully missing but included in the project - so if you create the file and want to override some of the css easily, that's how you would do it.
Not an employee of the company. Just here to help and keep things clean.
kevin
Platinum Nut
Platinum Nut
 
Posts: 994
Joined: Fri Aug 16, 2013 10:10 am

Re: manual setup fails

Postby brada » Mon Oct 05, 2015 8:01 pm

i think it was the USB cable getting lose. for whatever reason its not seating very well. its working now.

thanks for your help!
brada
newt
newt
 
Posts: 13
Joined: Mon Sep 28, 2015 10:40 pm

PreviousNext

Return to General

Who is online

Users browsing this forum: No registered users and 13 guests

cron