Need to run setup after every pi reboot

General Discussion

Need to run setup after every pi reboot

Postby lencia » Sun Aug 16, 2015 1:40 pm

After I run setup via the webapp everything works perfectly. But if I reboot the raspberry pi the webapp no longer functions, until I run setup again. Also, I've checked the ad2pi manually after reboot (via screen) and the config is correct for my 10SE.

My logs after a reboot are as follows:

2015-08-16 17:04:01,362 INFO: AlarmDecoder Webapp booting up - v0.4.3-0-gd798073 [in /opt/alarmdecoder-webapp/ad2web/decoder.py:151]
2015-08-16 17:04:01,513 INFO: Attempting to reconnect to the AlarmDecoder [in /opt/alarmdecoder-webapp/ad2web/decoder.py:396]
2015-08-16 17:04:21,975 INFO: AlarmDecoder Webapp booting up - v0.4.3-0-gd798073 [in /opt/alarmdecoder-webapp/ad2web/decoder.py:151]
2015-08-16 17:04:22,113 INFO: Attempting to reconnect to the AlarmDecoder [in /opt/alarmdecoder-webapp/ad2web/decoder.py:396]
2015-08-16 17:04:22,258 INFO: AlarmDecoder device was opened. [in /opt/alarmdecoder-webapp/ad2web/decoder.py:262]
2015-08-16 17:04:38,451 INFO: AlarmDecoder device was closed. [in /opt/alarmdecoder-webapp/ad2web/decoder.py:274]
2015-08-16 17:04:42,271 INFO: Attempting to reconnect to the AlarmDecoder [in /opt/alarmdecoder-webapp/ad2web/decoder.py:396]
2015-08-16 17:04:42,334 INFO: AlarmDecoder device was opened. [in /opt/alarmdecoder-webapp/ad2web/decoder.py:262]
2015-08-16 17:04:49,489 INFO: AlarmDecoder device was closed. [in /opt/alarmdecoder-webapp/ad2web/decoder.py:274]
2015-08-16 17:04:58,116 INFO: Attempting to reconnect to the AlarmDecoder [in /opt/alarmdecoder-webapp/ad2web/decoder.py:396]
2015-08-16 17:04:58,244 INFO: AlarmDecoder device was opened. [in /opt/alarmdecoder-webapp/ad2web/decoder.py:262]
2015-08-16 17:05:00,625 INFO: AlarmDecoder device was closed. [in /opt/alarmdecoder-webapp/ad2web/decoder.py:274]
2015-08-16 17:05:03,251 INFO: Attempting to reconnect to the AlarmDecoder [in /opt/alarmdecoder-webapp/ad2web/decoder.py:396]
2015-08-16 17:05:03,321 INFO: AlarmDecoder device was opened. [in /opt/alarmdecoder-webapp/ad2web/decoder.py:262]
2015-08-16 17:05:22,786 INFO: AlarmDecoder device was closed. [in /opt/alarmdecoder-webapp/ad2web/decoder.py:274]
...

[2015-08-16 17:01:07 +0000] [2690] [INFO] Handling signal: term
[2015-08-16 17:01:07 +0000] [2727] [INFO] Worker exiting (pid: 2727)
[2015-08-16 17:01:08 +0000] [2690] [INFO] Shutting down: Master
[2015-08-16 17:03:33 +0000] [2709] [INFO] Starting gunicorn 19.3.0
[2015-08-16 17:03:33 +0000] [2709] [INFO] Listening at: http://127.0.0.1:8000 (2709)
[2015-08-16 17:03:33 +0000] [2709] [INFO] Using worker: socketio.sgunicorn.GeventSocketIOWorker
[2015-08-16 17:03:33 +0000] [2737] [INFO] Booting worker with pid: 2737
[2015-08-16 17:04:01 +0000] [2737] [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 192, in init_process
super(GeventWorker, self).init_process()
File "/usr/local/lib/python2.7/dist-packages/gunicorn/workers/base.py", line 124, 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 192, in init_process
super(GeventWorker, self).init_process()
File "/usr/local/lib/python2.7/dist-packages/gunicorn/workers/base.py", line 124, 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'
[2015-08-16 17:04:01 +0000] [2737] [INFO] Worker exiting (pid: 2737)
[2015-08-16 17:04:02 +0000] [2746] [INFO] Booting worker with pid: 2746

Any suggestions would be appreciated. Thanks...
lencia
newt
newt
 
Posts: 3
Joined: Sun Jul 26, 2015 10:19 am

Re: Need to run setup after every pi reboot

Postby kevin » Sun Aug 16, 2015 5:56 pm

This is the first time I have seen this behavior - the settings for your device wouldn't likely change every reboot as the webapp doesn't send a new configuration command at that point so I would expect ser2sock and the ad2pi itself to continue working properly.

That said, it sounds like the database itself is being reset or not written properly as this is where the settings for the webapp are stored. I would verify that the /opt/alarmdecoder-webapp/instance/db.sqlite is being written properly, and I would also make sure that an "initdb" command is not being issued anywhere - which would be odd. It really sounds like a database permissions/filesystem thing.
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: Need to run setup after every pi reboot

Postby kevin » Mon Aug 17, 2015 2:31 pm

Are you using our image, or are you doing this manually? Have you made sure to reserve /dev/ttyAMA0 strictly for the AD2PI device?
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: Need to run setup after every pi reboot

Postby lencia » Mon Aug 17, 2015 8:09 pm

I am using the bundled image and I haven't made any significant changes that would account for something like that. But, if you haven't heard of anything like this before I'll try reburning the image on the SD again in a couple days - maybe I fat fingered something. Thx
lencia
newt
newt
 
Posts: 3
Joined: Sun Jul 26, 2015 10:19 am


Return to General

Who is online

Users browsing this forum: No registered users and 45 guests

cron