Page 1 of 2
Bad gateway suite Debian update
Published: April 6, 2020 - 12:33 PM
by Mich
Good morning,
This morning I upgraded my WAPT server from Debian 9 to Debian 10. During this upgrade, the WAPT server was also updated (I was on version 1.8.0.6641 before the upgrade).
Everything worked perfectly during this update (I didn't get any errors) and I successfully installed PostgreSQL 11 and deleted the old PostgreSQL 9.6 database.
But, when I try to access my server's web interface I get the following error: 502 Bad Gateway.
I tried restarting the waptserver and nginx services as well as the server, but the error persists.
When I run the command
systemctl status waptserver I am getting the following error:

- WAPT.PNG error (29.15 KB) Viewed 8061 times
Thank you in advance for your help.
Re: Bad gateway following Debian update
Published: April 6, 2020 - 1:28 PM
by sfonteneau
Has the file /etc/apt/sources.list.d/wapt.list been modified to switch to Buster?
Re: Bad gateway following Debian update
Published: April 6, 2020 - 2:03 PM
by Mich
Yes, the file was modified before the update (here is its content: deb
https://wapt.tranquil.it/debian/wapt-1.8/ buster main)
Re: Bad gateway following Debian update
Published: April 6, 2020 - 3:11 PM
by sfonteneau
Code: Select all
apt-get remove tis-waptserver
apt-get update
apt-get install tis-waptserver
systemctl restart waptserver
And it still doesn't work:
Code: Select all
/opt/wapt/runwaptserver.sh -ldebug
Re: Bad gateway following Debian update
Published: April 6, 2020 - 3:31 PM
by Mich
The concern remains.
Here is the output of the command /opt/wapt/runwaptserver.sh -ldebug
Code: Select all
/opt/wapt/runwaptserver.sh -ldebug
2020-04-06 15:30:22,958 [waptserver ] INFO Using config file /opt/wapt/conf/waptserver.ini
2020-04-06 15:30:22,972 [waptws ] INFO Server initialized for eventlet.
2020-04-06 15:30:22,973 [waptserver ] INFO Load database configuration
2020-04-06 15:30:22,973 [waptdb ] INFO Initializing a DB connection pool for db host None:5432 db_name:wapt. Size:90
2020-04-06 15:30:22,973 [waptdb ] INFO Connecting to waptdb explicitely. Count: 0
2020-04-06 15:30:22,973 [peewee.pool ] DEBUG No connection available in pool.
2020-04-06 15:30:22,974 [waptserver ] CRITICAL Unable to upgrade DB structure, init instead: OperationalError('could not connect to server: No such file or directory\n\tIs the server running locally and accepting\n\tconnections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?\n',)
2020-04-06 15:30:22,974 [waptdb ] INFO Connecting to waptdb explicitely. Count: 0
2020-04-06 15:30:22,974 [peewee.pool ] DEBUG No connection available in pool.
Traceback (most recent call last):
File "/opt/wapt/waptserver/server.py", line 2523, in <module>
init_db()
File "/opt/wapt/waptserver/model.py", line 1519, in init_db
with WaptDB():
File "/opt/wapt/waptserver/model.py", line 126, in __enter__
self.must_close = wapt_db_connect()
File "/opt/wapt/waptserver/model.py", line 103, in wapt_db_connect
wapt_db.connect()
File "/opt/wapt/lib/python2.7/site-packages/playhouse/pool.py", line 114, in connect
ret = super(PooledDatabase, self).connect(reuse_if_open)
File "/opt/wapt/lib/python2.7/site-packages/peewee.py", line 2947, in connect
self._initialize_connection(self._state.conn)
File "/opt/wapt/lib/python2.7/site-packages/peewee.py", line 2783, in __exit__
reraise(new_type, new_type(*exc_args), traceback)
File "/opt/wapt/lib/python2.7/site-packages/peewee.py", line 2944, in connect
self._state.set_connection(self._connect())
File "/opt/wapt/lib/python2.7/site-packages/playhouse/pool.py", line 156, in _connect
conn = super(PooledDatabase, self)._connect()
File "/opt/wapt/lib/python2.7/site-packages/playhouse/postgres_ext.py", line 448, in _connect
conn = super(PostgresqlExtDatabase, self)._connect()
File "/opt/wapt/lib/python2.7/site-packages/peewee.py", line 3637, in _connect
conn = psycopg2.connect(database=self.database, **self.connect_params)
File "/opt/wapt/lib/python2.7/site-packages/psycopg2/__init__.py", line 130, in connect
conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
peewee.OperationalError: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
Re: Bad gateway following Debian update
Published: April 6, 2020 - 4:26 PM
by sfonteneau
Re: Bad gateway following Debian update
Published: April 6, 2020 - 4:45 PM
by Mich
Yes, that's the procedure I used.
Re: Bad gateway following Debian update
Published: April 6, 2020 - 5:36 PM
by dcardon
connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
The database isn't running. Could you please verify that the Debian Postgres upgrade scripts actually ran correctly? When the Postgres11 database is installed, it's placed in parallel with the Postgres9 database (pg11 on port 5433 and pg9 on the standard port 5432). After the pg_upgrade command, Postgres11 should listen on port 5432, and pg9 should no longer be running.
There was a problem during the execution of the Debian PGSL upgrade procedure.
Denis
Re: Bad gateway following Debian update
Published: April 7, 2020 - 8:18 AM
by Mich
No problem checking on the server, but how do I do it then?
Re: Bad gateway following Debian update
Published: April 7, 2020 - 4:00 PM
by Mich
Good morning,
I restored a backup of my WAPT server (it's an ESXi VM) and repeated the update procedure (
https://www.wapt.fr/fr/doc/waptserver-u ... -10-buster) and the problem is the same.
I tested access to the WAPT server's web page during the various stages of the update commands: I have access to the page the entire time except after the WAPT server configuration command
Code: Select all
/opt/wapt/waptserver/scripts/postconf.sh
After the order
I have access to the web page but the database status is ERROR.
So I checked the PostgreSQL version on the server before the update and it's 9.6.16
For now, I have restored a backup of my server running Debian 9 Stretch so that I can use it.
NBI wanted to update this server because I have a remote site that I'm connecting to my main site, and I want to put a WAPT server on this remote site. So I wanted both servers to be on the latest version