[SOLVED] PC appears disconnected since update to 2.2

Share your tips or issues concerning the WAPT Console or WAPT Agent here
Forum Rules
Community Forum Rules
* English support on www.reddit.com/r/wapt
* French community support is available on this forum
* Please prefix the topic title with [RESOLVED] if it is resolved.
* Please do not edit a topic that is tagged [RESOLVED]. Open a new topic referencing the old one.
* Specify the installed WAPT version, full version, and build number (2.2.1.11957 / 2.2.2.12337 / etc.) as well as the Enterprise/Discovery edition.
* Versions 1.8.2 and earlier are no longer supported. The only questions accepted regarding version 1.8.2 are related to upgrading to a supported version (2.1, 2.2, etc.).
* Specify the server OS (Linux/Windows) and version (Debian Buster/Bullseye - CentOS 7 - Windows Server 2012/2016/2019).
* Specify the OS of the administration/package creation machine and the machine with the problematic agent, if applicable (Windows 7/10/11/Debian 11/etc.).
* Avoid asking multiple questions when opening a topic, otherwise it may be ignored. If there are multiple topics, open separate topics, preferably one after the other and not all at the same time (i.e., do not spam the forum).
* Include code snippets, screenshots, and other images directly in the post. Links to Pastebin, Bitly, and other third-party sites will be systematically removed.
* As with any community forum, support is provided voluntarily by members. If you require commercial support, you can contact Tranquil IT's sales department at 02.40.97.57.55
User avatar
dcardon
WAPT Expert
Messages: 1929
Registration: June 18, 2014 - 09:58
Location: Saint Sébastien sur Loire
Contact :

July 6, 2022 - 2:26 PM

What version of PostgreSQL is currently running (not the installed versions)?

Code: Select all

sudo -u postgres psql template1 -c "SELECT version();"
Could you retrieve the exception corresponding to the error returned ("ERROR: syntax error on or near...") in /var/log/waptserver.log.

By the way, it seems your server is installed in a French locale, which doesn't meet the documentation requirements... It's not best practice...

Sincerely,

Denis
Denis Cardon - Tranquil IT
Share your experiences on WAPT! Send us your blog and article URLs in the "Your Opinion of the forum, and we'll feature them on the WAPT
Alex
Messages: 12
Registration: Apr 26, 2016 - 09:49

July 7, 2022 - 09:11

- The version is PostgreSQL 9.4.19

- Here's what I retrieved from the logs:

Code: Select all

Jul  3 00:04:05 EOS waptserver[1047]: 2022-07-03 00:04:05,930 [waptserver     ] CRITICAL Get_websocket_auth_token failed ProgrammingError("ERREUR:  erreur de syntaxe sur ou près de « ON »\nLINE 1: ...519b9b0-d697-11e7-8d03-000c2954dc5e', 1656799445) ON CONFLIC...\n                                                             ^\n")
Jul  3 00:04:06 EOS waptserver[1047]: 2022-07-03 00:04:06,936 [waptserver     ] CRITICAL Get_websocket_auth_token failed ProgrammingError("ERREUR:  erreur de syntaxe sur ou près de « ON »\nLINE 1: ...519b9b0-d697-11e7-8d03-000c2954dc5e', 1656799446) ON CONFLIC...\n                                                             ^\n")
Jul  3 00:04:07 EOS waptserver[1047]: 2022-07-03 00:04:07,399 [waptdb         ] CRITICAL Unable to update installed_softwares for 4C4C4544-0053-5210-804C-B6C04F32344A: ProgrammingError: ERREUR:  erreur de syntaxe sur ou près de « on »
Jul  3 00:04:07 EOS waptserver[1047]: LINE 3:               on conflict (host_id,software_id) do update
- Regarding the language, I just switched back to LANG=en_US.UTF-8
User avatar
dcardon
WAPT Expert
Messages: 1929
Registration: June 18, 2014 - 09:58
Location: Saint Sébastien sur Loire
Contact :

July 7, 2022 - 6:11 PM

You need at least PostgreSQL 9.6. Please upgrade PostgreSQL (by default, Debian installs the new version during a major distribution upgrade but doesn't switch over and keeps the old version in production on port 5432).

Regards,

Denis
Denis Cardon - Tranquil IT
Share your experiences on WAPT! Send us your blog and article URLs in the "Your Opinion of the forum, and we'll feature them on the WAPT
Alex
Messages: 12
Registration: Apr 26, 2016 - 09:49

July 8, 2022 - 11:32

Like this?

Code: Select all

9.4 main    5432 online postgres /var/lib/postgresql/9.4/main /var/log/postgresql/postgresql-9.4-main.log
11  main    5433 online postgres /var/lib/postgresql/11/main  /var/log/postgresql/postgresql-11-main.log
But that doesn't change anything... is there a specific procedure to follow?
User avatar
dcardon
WAPT Expert
Messages: 1929
Registration: June 18, 2014 - 09:58
Location: Saint Sébastien sur Loire
Contact :

July 8, 2022 - 7:28 PM

The problem doesn't depend on wapt, but on the Debian upgrade process. You need to use the `pg_upgradecluster` command to update the data to version 11.

You can refer to:

https://gist.github.com/dmitrykustov/27 ... c830910019.

At the end of the process, it should be PostgreSQL 11 listening on port 5432 with the wapt database, and you can then remove the PostgreSQL 9.4 packages.

Denis
Denis Cardon - Tranquil IT
Share your experiences on WAPT! Send us your blog and article URLs in the "Your Opinion of the forum, and we'll feature them on the WAPT
Alex
Messages: 12
Registration: Apr 26, 2016 - 09:49

July 11, 2022 - 09:21

Ah, after that, it's much better! The upgraded machines are now showing as OK!

Thank you so much.
Have a good day.
User avatar
dcardon
WAPT Expert
Messages: 1929
Registration: June 18, 2014 - 09:58
Location: Saint Sébastien sur Loire
Contact :

July 11, 2022 - 09:28

Okay, good news. So the problem was that the Postgres database hadn't been upgraded during the Debian distribution upgrade. As a reminder, you need Postgres version 9.6 or higher to run the WAPT server.

I'm marking this as resolved.

Regards,

Denis
Denis Cardon - Tranquil IT
Share your experiences on WAPT! Send us your blog and article URLs in the "Your Opinion of the forum, and we'll feature them on the WAPT
Locked