Page 1 of 1

[RESOLVED] Packages installed but still needed

Published: September 29, 2022 - 3:39 PM
by chaudebault
Good morning,
With the following configurations:
Server: 2.2.2.12405
agent: 2.2.2.12405
console: 2.2.2.12405

On some machines, the packages install without any problems, but the machines remain in the "To-upgrade" state and the packages still appear as "need-install":
Untitled.png
Untitled.png (2.96 KB) Viewed 4046 times
If I delete the post, it reappears without any visible packages:
Untitled2.png
Untitled2.png (1.44 KB) Viewed 4046 times
Do you have any ideas on how to restore normal operation?

Thank you in advance for your answers

Re: Packages installed but still needed

Published: October 3, 2022 - 9:55 AM
by chaudebault
Okay, so I had a database running on PostgreSQL version 9.4, which I updated to version 13 (Debian 10.12). Unfortunately, there's no change... I've noticed that the workstation inventory is no longer updating. For example, when installing Firefox 105, it's fine on the workstation, but in the console inventory, it remains at version 102 with "Need-upgrade".
In waptserver.log I have this looping output:

Code: Select all

Oct  3 09:50:10 scd-wapt waptserver[1995]: 2022-10-03 09:50:10,478 [waptdb         ] CRITICAL Unable to update installed_softwares for 64BC2342-DE32-4536-0C40-2EE0F3B48AB0: ProgrammingError: ERREUR:  il n'existe aucune contrainte unique ou contrainte d'exclusion correspondant à la spécification ON CONFLICT
Oct  3 09:50:10 scd-wapt waptserver[1995]: 2022-10-03 09:50:10,481 [waptdb         ] CRITICAL Unable to update installed_packages for 64BC2342-DE32-4536-0C40-2EE0F3B48AB0: ProgrammingError: ERREUR:  il n'existe aucune contrainte unique ou contrainte d'exclusion correspondant à la spécification ON CONFLICT
Do you have any ideas?

Re: Packages installed but still needed

Published: October 3, 2022 - 10:35 AM
by sfonteneau
Good morning

To check which version of PostgreSQL is running, can you do the following:

Code: Select all

ps aux |grep postgres
Also, what version of the database is displayed on the web interface?

Simon

Re: Packages installed but still needed

Published: October 3, 2022 - 11:02 AM
by chaudebault
Good morning,

Here is the version of PostgreSQL that is running:

Code: Select all

postgres    2377  0.0  2.9 256440 58076 ?        Ss   09:27   0:00 /usr/lib/postgresql/13/bin/postgres -D /var/lib/postgresql/13/main -c config_file=/etc/postgresql/13/main/postgresql.conf
postgres    2379  0.0  2.5 256852 51160 ?        Ss   09:27   0:03 postgres: checkpointer 
postgres    2380  0.0  0.5 256700 10004 ?        Ss   09:27   0:00 postgres: background writer 
postgres    2381  0.0  0.5 256440 10280 ?        Ss   09:27   0:01 postgres: walwriter 
postgres    2382  0.0  0.4 257712  8876 ?        Ss   09:27   0:00 postgres: autovacuum launcher 
postgres    2383  0.0  0.2  68824  5760 ?        Ss   09:27   0:01 postgres: stats collector 
postgres    2384  0.0  0.3 257560  6816 ?        Ss   09:27   0:00 postgres: logical replication launcher 
postgres    3638  0.2  3.0 262256 60204 ?        Ss   10:54   0:00 postgres: wapt wapt [local] idle
And here are the versions on the web interface:
WAPT Server version: 2.2.3
WAPT Agent version: 2.2.3.12463
WAPT Setup version: 2.2.3.12463
WAPT Deploy version: 2.2.3.12463
Base status: OK (2.2.6.2)

Re: Packages installed but still needed

Published: October 3, 2022 - 11:30 AM
by dcardon
Good morning,

Are you using Debian 10 or Debian 11? The version of Samba that comes with Debian 10 is version 11, not version 13.

What version were you using before upgrading to 2.2? Did you go through version 1.8.2?

Could you run the following command to see where the database upgrade is failing?

Code: Select all

cd /opt/wapt
sudo -u wapt PYTHONPATH=/opt/wapt /opt/wapt/bin/python -c "from waptserver.model import *; logging.basicConfig(format='%(asctime)s %(levelname)s %(message)s'); logger.setLevel(logging.DEBUG); load_db_config(); set_db_version('2.1.0'); print(upgrade_db_structure())"
Sincerely,

Denis

Re: Packages installed but still needed

Published: October 3, 2022 - 1:36 PM
by chaudebault
Good morning,

Sorry Debian 11, I forgot that I had updated the server according to the documentation for the transition from 1.8.2 to 2.2.

Here is the order confirmation:

Code: Select all

2022-10-03 13:33:37,297 INFO Initializing a DB connection pool for db host None:5432 db_name:wapt. Size:90
2022-10-03 13:33:37,297 INFO Connecting to waptdb explicitely. Count: 0
2022-10-03 13:33:37,306 DEBUG Disconnecting from waptdb explicitely. Count: 1
2022-10-03 13:33:37,308 INFO Connecting to waptdb explicitely. Count: 0
2022-10-03 13:33:37,309 DEBUG Disconnecting from waptdb explicitely. Count: 1
2022-10-03 13:33:37,309 INFO Current DB: {'host': None, 'port': 5432, 'user': 'wapt', 'password': None} version: 2.1.0.0
2022-10-03 13:33:37,309 INFO Connecting to waptdb explicitely. Count: 0
2022-10-03 13:33:37,310 DEBUG Disconnecting from waptdb explicitely. Count: 1
2022-10-03 13:33:37,310 INFO Connecting to waptdb explicitely. Count: 0
2022-10-03 13:33:37,311 DEBUG Disconnecting from waptdb explicitely. Count: 1
2022-10-03 13:33:37,311 INFO Connecting to waptdb explicitely. Count: 0
2022-10-03 13:33:37,312 DEBUG Disconnecting from waptdb explicitely. Count: 1
2022-10-03 13:33:37,312 INFO Connecting to waptdb explicitely. Count: 0
2022-10-03 13:33:37,313 DEBUG Disconnecting from waptdb explicitely. Count: 1
2022-10-03 13:33:37,313 INFO Connecting to waptdb explicitely. Count: 0
2022-10-03 13:33:37,314 DEBUG Disconnecting from waptdb explicitely. Count: 1
2022-10-03 13:33:37,314 INFO Connecting to waptdb explicitely. Count: 0
2022-10-03 13:33:37,315 DEBUG Disconnecting from waptdb explicitely. Count: 1
2022-10-03 13:33:37,315 INFO Connecting to waptdb explicitely. Count: 0
2022-10-03 13:33:37,316 DEBUG Disconnecting from waptdb explicitely. Count: 1
2022-10-03 13:33:37,316 INFO Connecting to waptdb explicitely. Count: 0
2022-10-03 13:33:37,317 DEBUG Disconnecting from waptdb explicitely. Count: 1
2022-10-03 13:33:37,317 INFO Connecting to waptdb explicitely. Count: 0
2022-10-03 13:33:37,317 DEBUG Disconnecting from waptdb explicitely. Count: 1
2022-10-03 13:33:37,318 INFO Connecting to waptdb explicitely. Count: 0
2022-10-03 13:33:37,318 DEBUG Disconnecting from waptdb explicitely. Count: 1
2022-10-03 13:33:37,318 INFO Connecting to waptdb explicitely. Count: 0
2022-10-03 13:33:37,319 DEBUG Disconnecting from waptdb explicitely. Count: 1
2022-10-03 13:33:37,319 INFO Connecting to waptdb explicitely. Count: 0
2022-10-03 13:33:37,320 DEBUG Disconnecting from waptdb explicitely. Count: 1
2022-10-03 13:33:37,320 INFO Connecting to waptdb explicitely. Count: 0
2022-10-03 13:33:37,321 DEBUG Disconnecting from waptdb explicitely. Count: 1
2022-10-03 13:33:37,321 INFO Connecting to waptdb explicitely. Count: 0
2022-10-03 13:33:37,323 DEBUG Disconnecting from waptdb explicitely. Count: 1
2022-10-03 13:33:37,323 INFO Connecting to waptdb explicitely. Count: 0
2022-10-03 13:33:37,324 DEBUG Disconnecting from waptdb explicitely. Count: 1
2022-10-03 13:33:37,324 INFO Connecting to waptdb explicitely. Count: 0
2022-10-03 13:33:37,326 DEBUG Disconnecting from waptdb explicitely. Count: 1
2022-10-03 13:33:37,326 INFO Connecting to waptdb explicitely. Count: 0
2022-10-03 13:33:37,326 DEBUG Disconnecting from waptdb explicitely. Count: 1
2022-10-03 13:33:37,327 INFO Connecting to waptdb explicitely. Count: 0
2022-10-03 13:33:37,327 DEBUG Disconnecting from waptdb explicitely. Count: 1
2022-10-03 13:33:37,328 INFO Migrating from 2.1.0.0 to 2.1.0.1
2022-10-03 13:33:37,328 INFO Switch column type (CharField -> TextField) for normalization table
2022-10-03 13:33:37,344 INFO Migrating from 2.1.0.1 to 2.2.3.0
2022-10-03 13:33:37,349 INFO Migrating from 2.2.3.0 to 2.2.3.7
2022-10-03 13:33:37,355 INFO Migrating from 2.2.3.7 to 2.2.4.3
2022-10-03 13:33:37,355 INFO Switch column type (CharField -> TextField) for reporting table
2022-10-03 13:33:37,361 INFO Migrating from 2.2.4.3 to 2.2.4.6
2022-10-03 13:33:37,402 INFO Migrating from 2.2.4.6 to 2.2.4.7
2022-10-03 13:33:37,406 INFO Migrating from 2.2.4.7 to 2.2.4.10
2022-10-03 13:33:37,426 INFO Migrating from 2.2.4.10 to 2.2.5.1
2022-10-03 13:33:37,469 INFO Migrating from 2.2.5.1 to 2.2.5.2
2022-10-03 13:33:37,479 INFO Migrating from 2.2.5.2 to 2.2.6.0
2022-10-03 13:33:37,479 INFO Switch column type (TextField -> BinaryJsonField) for audit data
2022-10-03 13:33:37,498 INFO Migrating from 2.2.6.0 to 2.2.6.1
2022-10-03 13:33:37,504 INFO Migrating from 2.2.6.1 to 2.2.6.2
None
The database update seems to have resolved the issue; the inventories are updating!

Thank you very much for your help.

Sincerely