Webapp setup problem

General Discussion

Webapp setup problem

Postby s2928 » Sat Sep 06, 2014 3:32 am

Any recommendations of getting my system back up and running, short of reimaging my card and starting over?

Was up and running just fine with beta version connecting my browser to RPI with AD2USB.

Was exploring menus and settings in Webapp and have gotten my system hung up.

I accidentally changed the setting in setup of the AD2USB from local to network, which took me to the screen asking about CA certificates.

The "Previous" button would not work, and the forward button would take me to a screen showing errors since i did not have the certificates on my device.

Now, whenever i enter <RPi address> or <RPi address/keypad> in the browser it redirects me to <RPi address>/setup/sslclient and i get a screen that says Forbidden Page, no permission.
s2928
newt
newt
 
Posts: 15
Joined: Wed Sep 03, 2014 8:11 pm

Re: Webapp setup problem

Postby kevin » Sat Sep 06, 2014 10:13 am

Unfortunately, you'll likely have to blow away the database for the webapp and start over there for now - not reimaging the card, but starting fresh from the webapp.

Are you comfortable with ssh? If so, ssh to the pi and do these commands:

Code: Select all
cd /opt/alarmdecoder-webapp
sudo python manage.py initdb


This will clear out all of your database settings for the webapp and take you through setup again.

If the webapp doesn't answer after this, you might have to restart the system to make sure all processes start up (easier than listing them out here to restart individually)

If you could also post the errors from the /var/log/gunicorn/alarmdecoder.log file before doing this, that will help us try to prevent things like this in the future with code :)
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: Webapp setup problem

Postby s2928 » Sun Sep 07, 2014 7:23 pm

OK, followed your directions and got everything back up and running. Thank you. log file at bottom of post. If you could highlight the section of the log file that documents the trouble, i would appreciate it.

Thank you again for your terrific responsiveness and product.

also found a few more "minor bugs" in Webapp beta, or at least items that are a bit counter to the way i would expect UI to work.

three examples...

1) At the completion of adding a new user, screen remains on the "add user form" instead of returning to the list of users. Contrast this with adding zones and descriptions which returns the user to the list of zones, as expected.

2) when adding a new user, the username field defaults to begin with a capital letter. The username field at login is set to default to begin with lower case letter. Would prefer that they both default to lowercase.

3) when viewing the list of zones, the sort order is by zone ID, but it looks to be sorting the numbers as characters, since zones 2 and higher comes after zones 10 through 19.

Log file is pretty long, and posted below...

2014-09-05 14:01:04 [2907] [INFO] 1 workers
2014-09-05 14:02:59 [2907] [INFO] 1 workers
2014-09-05 14:04:56 [2907] [INFO] 1 workers
2014-09-05 14:07:06 [2907] [INFO] 1 workers
2014-09-05 14:08:55 [2907] [CRITICAL] WORKER TIMEOUT (pid:2937)
2014-09-05 14:08:56 [2907] [INFO] 1 workers
2014-09-05 14:08:57 [2937] [INFO] Worker exiting (pid: 2937)
2014-09-05 14:08:58 [2907] [INFO] 1 workers
2014-09-05 14:09:17 [16088] [INFO] Booting worker with pid: 16088
2014-09-05 14:09:17 [2907] [INFO] 1 workers
2014-09-05 22:28:49 [2907] [INFO] 1 workers
2014-09-05 22:30:49 [2907] [INFO] 1 workers
2014-09-05 22:32:48 [2907] [INFO] 1 workers
2014-09-05 22:34:47 [2907] [INFO] 1 workers
2014-09-05 22:36:47 [2907] [INFO] 1 workers
2014-09-05 22:40:24 [2558] [INFO] Starting gunicorn 19.1.0
2014-09-05 22:40:24 [2558] [INFO] Listening at: http://127.0.0.1:8000 (2558)
2014-09-05 22:40:24 [2558] [INFO] Using worker:
socketio.sgunicorn.GeventSocketIOWorker
2014-09-05 22:40:24 [2586] [INFO] Booting worker with pid: 2586
2014-09-05 22:40:24 [2558] [INFO] 1 workers
2014-09-05 22:41:05 [2586] [ERROR] Exception in worker process:
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/gunicorn/arbiter.py",
line 507, in spawn_worker
worker.init_process()
File "/usr/local/lib/python2.7/dist-packages/gunicorn/workers/ggevent.py",
line 193, in init_process
super(GeventWorker, self).init_process()
File "/usr/local/lib/python2.7/dist-packages/gunicorn/workers/base.py",
line 120, in init_process
self.run()
File "/usr/local/lib/python2.7/dist-packages/socketio/sgunicorn.py",
line 80, in run
**ssl_args
File "/usr/local/lib/python2.7/dist-packages/socketio/server.py",
line 72, in __init__
address = args[0].cfg_addr[0]
AttributeError: 'socket' object has no attribute 'cfg_addr'
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/gunicorn/arbiter.py",
line 507, in spawn_worker
worker.init_process()
File "/usr/local/lib/python2.7/dist-packages/gunicorn/workers/ggevent.py",
line 193, in init_process
super(GeventWorker, self).init_process()
File "/usr/local/lib/python2.7/dist-packages/gunicorn/workers/base.py",
line 120, in init_process
self.run()
File "/usr/local/lib/python2.7/dist-packages/socketio/sgunicorn.py",
line 80, in run
**ssl_args
File "/usr/local/lib/python2.7/dist-packages/socketio/server.py",
line 72, in __init__
address = args[0].cfg_addr[0]
AttributeError: 'socket' object has no attribute 'cfg_addr'
2014-09-05 22:41:05 [2586] [INFO] Worker exiting (pid: 2586)
2014-09-05 22:41:05 [2595] [INFO] Booting worker with pid: 2595
2014-09-05 22:41:05 [2558] [INFO] 1 workers
2014-09-05 22:41:05 [2558] [INFO] 1 workers
2014-09-05 22:43:06 [2558] [INFO] 1 workers
2014-09-05 22:45:04 [2558] [INFO] 1 workers
2014-09-05 22:47:04 [2558] [INFO] 1 workers
2014-09-05 22:49:01 [2558] [INFO] 1 workers
2014-09-05 22:50:58 [2558] [INFO] 1 workers
2014-09-06 13:26:56 [2558] [INFO] 1 workers
2014-09-06 13:28:55 [2558] [INFO] 1 workers
2014-09-06 13:30:52 [2558] [INFO] 1 workers
2014-09-06 13:32:49 [2558] [INFO] 1 workers
2014-09-07 15:01:36 [2467] [INFO] Starting gunicorn 19.1.0
2014-09-07 15:01:36 [2467] [INFO] Listening at: http://127.0.0.1:8000 (2467)
2014-09-07 15:01:36 [2467] [INFO] Using worker:
socketio.sgunicorn.GeventSocketIOWorker
2014-09-07 15:01:36 [2467] [INFO] 1 workers
2014-09-07 15:01:36 [2495] [INFO] Booting worker with pid: 2495
2014-09-07 15:02:29 [2495] [ERROR] Exception in worker process:
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/gunicorn/arbiter.py",
line 507, in spawn_worker
worker.init_process()
File "/usr/local/lib/python2.7/dist-packages/gunicorn/workers/ggevent.py",
line 193, in init_process
super(GeventWorker, self).init_process()
File "/usr/local/lib/python2.7/dist-packages/gunicorn/workers/base.py",
line 120, in init_process
self.run()
File "/usr/local/lib/python2.7/dist-packages/socketio/sgunicorn.py",
line 80, in run
**ssl_args
File "/usr/local/lib/python2.7/dist-packages/socketio/server.py",
line 72, in __init__
address = args[0].cfg_addr[0]
AttributeError: 'socket' object has no attribute 'cfg_addr'
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/gunicorn/arbiter.py",
line 507, in spawn_worker
worker.init_process()
File "/usr/local/lib/python2.7/dist-packages/gunicorn/workers/ggevent.py",
line 193, in init_process
super(GeventWorker, self).init_process()
File "/usr/local/lib/python2.7/dist-packages/gunicorn/workers/base.py",
line 120, in init_process
self.run()
File "/usr/local/lib/python2.7/dist-packages/socketio/sgunicorn.py",
line 80, in run
**ssl_args
File "/usr/local/lib/python2.7/dist-packages/socketio/server.py",
line 72, in __init__
address = args[0].cfg_addr[0]
AttributeError: 'socket' object has no attribute 'cfg_addr'
2014-09-07 15:02:29 [2495] [INFO] Worker exiting (pid: 2495)
2014-09-07 15:02:31 [2668] [INFO] Booting worker with pid: 2668
2014-09-07 15:02:31 [2467] [INFO] 1 workers
2014-09-07 15:02:31 [2467] [INFO] 1 workers
2014-09-07 15:04:31 [2467] [INFO] 1 workers
2014-09-07 15:06:30 [2467] [INFO] 1 workers
2014-09-07 15:08:29 [2467] [INFO] 1 workers
2014-09-07 15:10:28 [2467] [INFO] 1 workers
2014-09-07 15:12:27 [2467] [INFO] 1 workers
2014-09-07 15:14:26 [2467] [INFO] 1 workers
2014-09-07 15:16:26 [2467] [INFO] 1 workers
2014-09-07 15:18:25 [2467] [INFO] 1 workers
2014-09-07 15:20:24 [2467] [INFO] 1 workers
Last edited by s2928 on Sat Sep 13, 2014 6:57 am, edited 1 time in total.
s2928
newt
newt
 
Posts: 15
Joined: Wed Sep 03, 2014 8:11 pm

Re: Webapp setup problem

Postby kevin » Sun Sep 07, 2014 10:23 pm

2014-09-05 22:41:05 [2586] [ERROR] Exception in worker process:
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/gunicorn/arbiter.py",
line 507, in spawn_worker
worker.init_process()
File "/usr/local/lib/python2.7/dist-packages/gunicorn/workers/ggevent.py",
line 193, in init_process
super(GeventWorker, self).init_process()
File "/usr/local/lib/python2.7/dist-packages/gunicorn/workers/base.py",
line 120, in init_process
self.run()
File "/usr/local/lib/python2.7/dist-packages/socketio/sgunicorn.py",
line 80, in run
**ssl_args
File "/usr/local/lib/python2.7/dist-packages/socketio/server.py",
line 72, in __init__
address = args[0].cfg_addr[0]
AttributeError: 'socket' object has no attribute 'cfg_addr'
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/gunicorn/arbiter.py",
line 507, in spawn_worker
worker.init_process()
File "/usr/local/lib/python2.7/dist-packages/gunicorn/workers/ggevent.py",
line 193, in init_process
super(GeventWorker, self).init_process()
File "/usr/local/lib/python2.7/dist-packages/gunicorn/workers/base.py",
line 120, in init_process
self.run()
File "/usr/local/lib/python2.7/dist-packages/socketio/sgunicorn.py",
line 80, in run
**ssl_args
File "/usr/local/lib/python2.7/dist-packages/socketio/server.py",
line 72, in __init__
address = args[0].cfg_addr[0]
AttributeError: 'socket' object has no attribute 'cfg_addr'


That's the error - have not investigated it any yet but thanks for the log. Also will take your reports into consideration and will see what can be done.
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: Webapp setup problem

Postby kevin » Mon Sep 08, 2014 2:15 pm

1) At the completion of adding a new user, screen remains on the "add user form" instead of returning to the list of users. Contrast this with adding zones and descriptions which returns the user to the list of zones, as expected.

2) when adding a new user, the username field defaults to begin with a capital letter. The username field at login is set to default to begin with lower case letter. Would prefer that they both default to lowercase.

3) when viewing the list of zones, the sort order is by zone ID, but it looks to be sorting the numbers as characters, since zones 2 and higher comes after zones 10 through 19.


As for #1, this has been addressed and will return to the user list after creation

As for #2, I am unsure specifically what you are referencing - screenshots are helpful

As for #3, It is now sorted by name by default, not ID.
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: Webapp setup problem

Postby s2928 » Sat Sep 13, 2014 4:38 am

Thanks for updates.

Here are screenshots that illustrate what i meant in my suggestion #2...
Attachments
image.jpg
Set up new user... User Name begins with capital letter by default
image.jpg (127.63 KiB) Viewed 8007 times
image.jpg
Login screen username begins with lower case by default
image.jpg (87.45 KiB) Viewed 8007 times
s2928
newt
newt
 
Posts: 15
Joined: Wed Sep 03, 2014 8:11 pm

Re: Webapp setup problem

Postby kevin » Sat Sep 13, 2014 1:24 pm

That's interesting - there's no difference in the controls used for the forms... I'll look into it. Hopefully not a browser issue!
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


Return to General

Who is online

Users browsing this forum: No registered users and 38 guests

cron