502 Bad Gateway - Services might still be starting

General Discussion

Re: 502 Bad Gateway - Services might still be starting

Postby wilsonb » Tue Nov 14, 2017 4:44 pm

[ser2sock]
daemonize = 1
device = /dev/ttyAMA0
baudrate = 115200
port = 10000
raw_device_mode = 1
preserve_connections = 1
bind_ip = 0.0.0.0
send_terminal_init = 0
device_open_delay = 5000
encrypted = 0
ca_certificate =
ssl_certificate =
ssl_key =
ssl_crl = /etc/ser2sock/ser2sock.crl
wilsonb
Senior Nut
Senior Nut
 
Posts: 77
Joined: Sun Jul 26, 2015 4:14 pm

Re: 502 Bad Gateway - Services might still be starting

Postby kevin » Tue Nov 14, 2017 4:45 pm

wilsonb wrote:daemonize = 1
device = /dev/ttyS0
baudrate = 115200
port = 10000
raw_device_mode = 1
preserve_connections = 1
bind_ip = 0.0.0.0
send_terminal_init = 0
device_open_delay = 5000
encrypted = 0
ca_certificate =
ssl_certificate =
ssl_key =
ssl_crl = /etc/ser2sock/ser2sock.crl
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: 502 Bad Gateway - Services might still be starting

Postby wilsonb » Tue Nov 14, 2017 4:46 pm

Looks like the device is still ttyAMA0 :evil:



[ser2sock]
daemonize = 1
device = /dev/ttyAMA0
baudrate = 115200
port = 10000
raw_device_mode = 1
preserve_connections = 1
bind_ip = 0.0.0.0
send_terminal_init = 0
device_open_delay = 5000
encrypted = 0
ca_certificate =
ssl_certificate =
ssl_key =
ssl_crl = /etc/ser2sock/ser2sock.crl
wilsonb
Senior Nut
Senior Nut
 
Posts: 77
Joined: Sun Jul 26, 2015 4:14 pm

Re: 502 Bad Gateway - Services might still be starting

Postby kevin » Tue Nov 14, 2017 4:49 pm

Yes, I'm saying you need to manually edit that and change it now that you've done a raspi update.

You will also want to run these commands to make sure the serial console is disabled still


echo "enable_uart=1" | sudo tee -a /boot/config.txt
sudo sed -i 's/console=serial0,115200/ /g' /boot/cmdline.txt
sudo sed -i 's/kgdbog=ttyAMA0,115200/ /g' /boot/cmdline.txt
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: 502 Bad Gateway - Services might still be starting

Postby wilsonb » Tue Nov 14, 2017 5:21 pm

Ok, now I have to assume again. :evil: :evil: :roll:

Do I change it from ;
device = /dev/ttyAMA0

to;
device = /dev/ser2sock


?
wilsonb
Senior Nut
Senior Nut
 
Posts: 77
Joined: Sun Jul 26, 2015 4:14 pm

Re: 502 Bad Gateway - Services might still be starting

Postby kevin » Tue Nov 14, 2017 5:22 pm

As said several times in the thread, you will change it to /dev/ttyS0
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: 502 Bad Gateway - Services might still be starting

Postby wilsonb » Tue Nov 14, 2017 9:45 pm

Nope.. still no joy.


device = /dev/ttyS0
[ser2sock]
daemonize = 1
device = /dev/ttyS0
baudrate = 115200
port = 10000
raw_device_mode = 1
preserve_connections = 1
bind_ip = 0.0.0.0
send_terminal_init = 0
device_open_delay = 5000
encrypted = 0
ca_certificate =
ssl_certificate =
ssl_key =
ssl_crl = /etc/ser2sock/ser2sock.crl
wilsonb
Senior Nut
Senior Nut
 
Posts: 77
Joined: Sun Jul 26, 2015 4:14 pm

Re: 502 Bad Gateway - Services might still be starting

Postby kevin » Tue Nov 14, 2017 9:53 pm

Well, all I can suggest is starting over with a fresh image, and NOT doing those things again. They aren't in our instructions anywhere, and obviously will break things if you do them.

The good thing is, you can backup your database - it is located at /opt/alarmdecoder-webapp/instance/db.sqlite

If you really want to avoid starting over, I'm sure the guys at Nu Tech can help you out somehow, try emailing support and see what they say.
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: 502 Bad Gateway - Services might still be starting

Postby timlegge » Wed Nov 15, 2017 7:33 pm

I just did a full upgrade tonight.

apt-get update
apt-get upgrade
apt-get dist-upgrade

pip install pip --upgrade
pip install gunicorn --upgrade

grabbed the latest ser2sock and installed it

Couple of reboots

So, I went in stages:

get ser2sock working again . see viewtopic.php?f=3&t=288 but look at the lower part of the thread where the new updates are listed.

test as listed by telneting to 127.0.0.1 10000 (remember to reboot)

updated alarmdecoder-webapp (followed the instructions on https://github.com/nutechsoftware/alarmdecoder-webapp but DID NOT initialize the database (sudo python manage.py initdb)

I had missed
Code: Select all
sudo ln -s /usr/local/bin/gunicorn /usr/bin/gunicorn
that prevented gunicorn from restarting

Tim
timlegge
Junior Nut
Junior Nut
 
Posts: 31
Joined: Sat Apr 09, 2016 5:33 pm

Re: 502 Bad Gateway - Services might still be starting

Postby wilsonb » Fri Nov 17, 2017 7:57 am

OK, this is frustrating..

I started fresh..
It happened again. Now we know it has nothing to do with raspi-config or anything I DID OUT of ordinary.

Was working for days..
The only things changes I just did was, select Dev as a source from main in repository in Advanced. That's what I did last time before this image.

Could that be the problem.?
502 Bad Gateway - Services might still be starting
wilsonb
Senior Nut
Senior Nut
 
Posts: 77
Joined: Sun Jul 26, 2015 4:14 pm

PreviousNext

Return to General

Who is online

Users browsing this forum: No registered users and 49 guests

cron