Page 2 of 2

Re: Bad gateway following Debian update

Published: April 8, 2020 - 11:12 AM
by dcardon
Hi Mich,

I must admit I don't understand your problem at all. There are probably some cases not covered in the documentation. Since you're in the community and don't have support, you can contribute by researching what's wrong in your case and submitting a pull request to the online documentation on GitHub. This could help others. Basically, the pg_upgrade script is supposed to transfer the database from version 9.6 to version 11, shut down version 9.6, and move the listening port for version 11 to 5432.

Regards,

Denis

Re: Bad gateway following Debian update

Published: April 15, 2020 - 8:17 PM
by gaelds
Hello, I also tried updating Debian 9 to 10, then wapt server from 1.7.4 to 1.8.1 (Community), but I'm still getting the "502 Bad Gateway" error on the wapt interface. The only issue I noticed during the updates is the message:

"Error: target cluster 11/main already exists" after running the command: pg_upgradecluster -v 11 9.6 main

Re: Bad gateway following Debian update

Published: April 16, 2020 - 09:57
by gaelds
Starting from scratch, I read that the solution appears during the update installation:
Picture
You just need to run the command "pg_dropcluster --stop 11 main" before "pg_upgradecluster -v 11 9.6 main".
Could you add this to your update procedure if you'd like?

Re: Bad gateway following Debian update

Published: April 16, 2020 - 10:20 AM
by vcardon
gaelds wrote: Apr 16, 2020 - 9:57 AM You just need to run the command "pg_dropcluster --stop 11 main" before "pg_upgradecluster -v 11 9.6 main".
Could you add this to your update procedure if you'd like?
Done, to be published in a new version of the documentation coming very soon.

By default the PostgreSQL is not upgraded to PostgreSQL 11.
One needs to manually request the upgrade.
After upgrading, it is possible to remove the old PostgreSQL 9.6 database.

.. code-block:: bash

sed -i 's/stretch/buster/g' /etc/apt/sources.list
sed -i 's/stretch/buster/g' /etc/apt/sources.list.d/wapt.list
apt-get update
apt-get update && apt-get dist-upgrade
pg_dropcluster --stop 11 main
pg_upgradecluster -v 11 9.6 main
apt-get remove postgresql*-9.6
apt-get autoremove
/opt/wapt/waptserver/scripts/postconf.sh