How to restart WebApp

General Discussion

How to restart WebApp

Postby jeffwu » Wed Jul 25, 2018 3:24 pm

Hi

I use AD2PI and run WebApp using the beta image on Jessie. What is the proper command line to restart web app?


thanks

Jeff
jeffwu
Senior Nut
Senior Nut
 
Posts: 40
Joined: Fri Mar 17, 2017 6:24 pm

Re: How to restart WebApp

Postby jeffwu » Sun Jul 29, 2018 4:31 am

almost every Saturday morning I noticed keypad (web app) stuck in "Please wait. Loading.." state. rebooting pi would recover from it.

Is there a way I can restart web app instead of rebooting Pi as a whole?
jeffwu
Senior Nut
Senior Nut
 
Posts: 40
Joined: Fri Mar 17, 2017 6:24 pm

Re: How to restart WebApp

Postby jeffwu » Sun Jul 29, 2018 4:47 am

after a reboot, I find below Errors in logs. were they expected?

2018-07-29 08:39:34,955 INFO: AlarmDecoder Webapp booting up - v0.8.2-0-g0664184 [in /opt/alarmdecoder-webapp/ad2web/decoder.py:222]
2018-07-29 08:39:35,627 INFO: Discovery running: loc=10.10.0.6:5000, uuid=a8e9cb16-50dd-11e8-9189-b827ebbd5cba [in /opt/alarmdecoder-webapp/ad2web/discovery.py:70]
2018-07-29 08:39:36,127 INFO: Set export parameters to: server smtp.gmail.com port 587 tls 1 auth 0 from xxxx@gmail.com frequency 604800 store files 1 storage path /opt/alarmdecoder-webapp/instance/exports days to keep files 7 email enable 0 [in /opt/alarmdecoder-webapp/ad2web/decoder.py:709]
2018-07-29 08:39:36,240 INFO: Attempting to reconnect to the AlarmDecoder [in /opt/alarmdecoder-webapp/ad2web/decoder.py:533]
2018-07-29 08:39:36,543 INFO: AlarmDecoder device was opened. [in /opt/alarmdecoder-webapp/ad2web/decoder.py:391]
2018-07-29 08:39:40,120 INFO: Event: There is a fire! [in /opt/alarmdecoder-webapp/ad2web/notifications/types.py:371]
2018-07-29 08:39:44,375 INFO: Event: The alarm system has been armed. [in /opt/alarmdecoder-webapp/ad2web/notifications/types.py:371]
2018-07-29 08:39:47,285 INFO: Event: There is a fire! [in /opt/alarmdecoder-webapp/ad2web/notifications/types.py:371]
2018-07-29 08:39:48,753 INFO: Event: The alarm system has been armed. [in /opt/alarmdecoder-webapp/ad2web/notifications/types.py:371]
2018-07-29 08:39:48,848 ERROR: Error sending notification for Alarm: No JSON object could be decoded [in /opt/alarmdecoder-webapp/ad2web/decoder.py:451]
2018-07-29 08:39:53,083 INFO: Event: Power status has changed to False. [in /opt/alarmdecoder-webapp/ad2web/notifications/types.py:371]
2018-07-29 08:39:53,216 INFO: Event: Chime status has changed to False [in /opt/alarmdecoder-webapp/ad2web/notifications/types.py:371]
2018-07-29 08:39:55,925 INFO: Event: There is a fire! [in /opt/alarmdecoder-webapp/ad2web/notifications/types.py:371]
2018-07-29 08:39:58,055 INFO: Event: The alarm system has been armed. [in /opt/alarmdecoder-webapp/ad2web/notifications/types.py:371]
2018-07-29 08:39:59,735 INFO: Event: Power status has changed to True. [in /opt/alarmdecoder-webapp/ad2web/notifications/types.py:371]
2018-07-29 08:39:59,814 ERROR: Error sending notification for Alarm: No JSON object could be decoded [in /opt/alarmdecoder-webapp/ad2web/decoder.py:451]
2018-07-29 08:39:59,882 INFO: Event: Chime status has changed to True [in /opt/alarmdecoder-webapp/ad2web/notifications/types.py:371]
2018-07-29 08:40:02,444 INFO: Event: There is a fire! [in /opt/alarmdecoder-webapp/ad2web/notifications/types.py:371]
2018-07-29 08:40:02,521 ERROR: Error sending notification for Alarm: No JSON object could be decoded [in /opt/alarmdecoder-webapp/ad2web/decoder.py:451]
2018-07-29 08:40:09,379 INFO: Event: Ready status has changed to True [in /opt/alarmdecoder-webapp/ad2web/notifications/types.py:371]
2018-07-29 08:40:20,655 INFO: Event: The alarm system has been disarmed. [in /opt/alarmdecoder-webapp/ad2web/notifications/types.py:371]
jeffwu
Senior Nut
Senior Nut
 
Posts: 40
Joined: Fri Mar 17, 2017 6:24 pm

Re: How to restart WebApp

Postby jeffwu » Sun Aug 12, 2018 4:16 am

hi

everyone to help out? after AlarmDecoder booting every Sunday, it stopped working. log on to web interface, the keypad in "Please wait. Loading.." state.

below is the last msg in /opt/alarmdecoder-webapp/instance/logs/info.log


2018-08-12 07:22:52,703 INFO: Event: Ready status has changed to True [in /opt/alarmdecoder-webapp/ad2web/notifications/types.py:371]
2018-08-12 07:23:30,887 INFO: Event: The AlarmDecoder has finished booting. [in /opt/alarmdecoder-webapp/ad2web/notifications/types.py:371]
jeffwu
Senior Nut
Senior Nut
 
Posts: 40
Joined: Fri Mar 17, 2017 6:24 pm

Re: How to restart WebApp

Postby jeffwu » Sun Aug 19, 2018 4:05 am

Very frustrated. Webapp restarted again every Sunday morning. When this happens, the keypad no longer function.

Anyone can shed some lights here.
Either show me a way how to disable weekly restart,. Or fix this bug.
jeffwu
Senior Nut
Senior Nut
 
Posts: 40
Joined: Fri Mar 17, 2017 6:24 pm

Re: How to restart WebApp

Postby kevin » Thu Sep 06, 2018 5:02 pm

Suggest emailing support directly
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: How to restart WebApp

Postby wilsonb » Mon Oct 22, 2018 7:37 pm

Actually this should be public. I just did a fresh install Raspberry ISO / download , setup and update. Spent a lot of time setting up. Was working./
Then after a few reboots, web server not working. This happened on previous builds for years now.

I can SSH fine.
Now going to website , it just times out.
When it does come up, it just says;
" :evil: Services might still be starting - please wait and try again. If this continues, please let us know on GitHub. You can also email us at Support. "

How to reset alarmdecoder web app to default?
Last edited by wilsonb on Tue Oct 23, 2018 6:59 am, edited 1 time in total.
wilsonb
Senior Nut
Senior Nut
 
Posts: 77
Joined: Sun Jul 26, 2015 4:14 pm

Re: How to restart WebApp

Postby wilsonb » Mon Oct 22, 2018 8:07 pm

It works for a few minutes by resetting..
Broke again.. Please fix. :twisted:

cd /opt/alarmdecoder-webapp
sudo rm instance/db.sqlite
python manage.py initdb
sudo reboot
wilsonb
Senior Nut
Senior Nut
 
Posts: 77
Joined: Sun Jul 26, 2015 4:14 pm

Re: How to restart WebApp

Postby wilsonb » Tue Oct 23, 2018 6:56 am

Seems this python script is outdated;
python manage.py initdb

Result
ExtDeprecationWarning: Importing flask.ext.script is deprecated, use flask_script instead.
wilsonb
Senior Nut
Senior Nut
 
Posts: 77
Joined: Sun Jul 26, 2015 4:14 pm

Re: How to restart WebApp

Postby mathewss » Mon Oct 29, 2018 11:14 am

AFAIK this is a warning and did not effect the results but at some point it will break so lets get it fixed now.
I put this change in "dev" branch till I get a chance to tests it on older images.
https://github.com/nutechsoftware/alarm ... d7eb0aa5ea
mathewss
Moderator
Moderator
 
Posts: 188
Joined: Fri Dec 06, 2013 11:14 am

Next

Return to General

Who is online

Users browsing this forum: No registered users and 3 guests

cron