View Issue Details

IDProjectCategoryView StatusLast Update
0008472Kali LinuxTool Upgrade Requestpublic2024-01-24 06:11
Reportermicsec Assigned Tosbrun  
PrioritynormalSeverityminorReproducibilityhave not tried
Status resolvedResolutionfixed 
Summary0008472: Greenbone - Openvas - GVMD - incompatible library "/usr/lib/libgvm-pg-server.so": version mismatch
Description

After upgrading to postgresql 16, gvmd requires pg_upgradecluster from v15 to v16.

So I run
pg_dropcluster --stop 16 main
pg_upgradecluster 15 main /var/lib/postgresql/16/main

But I get some errors

ERROR: extension "pg-gvm" is not available
DETAIL: Could not open extension control file "/usr/share/postgresql/16/extension/pg-gvm.control": No such file or directory.
HINT: The extension must first be installed on the system where PostgreSQL is running.
ERROR: extension "pg-gvm" does not exist
ERROR: incompatible library "/usr/lib/libgvm-pg-server.so": version mismatch
DETAIL: Server is version 16, library is version 15.

It seems that some packages required for gvmd are not yet migrated.

Activities

AlexSN

AlexSN

2023-09-24 15:48

reporter   ~0018503

I'm seeing the errors below trying to install a new machine. Probably related.
The error appears when we do:
sudo gvm-setup

[*] Creating extension pg-gvm
ERROR: extension "pg-gvm" is not available
DETAIL: Could not open extension control file "/usr/share/postgresql/16/extension/pg-gvm.control": No such file or directory.
HINT: The extension must first be installed on the system where PostgreSQL is running.
[>] Migrating database
md manage-Message: 17:17:21.750: db_extension_available: Extension 'pg-gvm' is not available.

(gvmd:1610): md manage-WARNING **: 17:17:21.751: check_db_extensions: A required extension is not available.

(gvmd:1610): md manage-WARNING *: 17:17:21.751: init_manage_create_functions: failed to create functions
[>] Checking for GVM admin user
[
] Creating user admin for gvm
[] Please note the generated admin password
[
]
[*] Configure Feed Import Owner
ERROR: relation "settings" does not exist
LINE 1: SELECT value FROM settings WHERE uuid =

sbrun

sbrun

2023-09-25 17:04

manager   ~0018505

I have uploaded a fix: gvmd version 22.9.0-0kali4 (it installs postgresql-16-pg-gvm version 22.6.2-1kali1 too).
It will be available in few hours.

sectr

sectr

2023-09-25 19:18

reporter   ~0018506

Last edited: 2023-09-25 19:19

Even in the Kali weekly build (2023 week 32) with fully upgraded packages, PostgreSQL-15 is installed and occupying port 5432:

┌──(kali㉿kali)-[~]
└─$ pg_lsclusters --no-header | awk '$3 == "5432" { print $1 }'
15

So while the need to migrate to PostgreSQL is indeed on the forecast, it is not a hard requirement for now.
Maybe the fix is to keep 15 as the default version until PG-16 is at least the default install on port 5432?

Seems the problem is the definition of the required PostgreSQL version is set to 16 in the file: /usr/share/gvmd/postgresql-version.

At least something like the following in the gvm-setup script would allow the current PG version on port 5432 to be used, no matter what version it was.

pg_lsclusters --no-header | awk '$3 == "5432" { print $1 }' > /tmp/postgresql-version
sudo mv /tmp/postgresql-version /usr/share/gvmd/

X0RW3LL

X0RW3LL

2023-09-25 19:20

reporter   ~0018507

postgresql-16-pg-gvm is now available, so please make sure to perform an update and a full-upgrade via apt

micsec

micsec

2023-09-26 05:15

reporter   ~0018508

After the updates I upgraded the postgresql15 cluster -> 16 without any errors.
So everything is working again.

Thanks a lot sbrun!

AlexSN

AlexSN

2023-09-26 08:46

reporter   ~0018509

Thank you very much sbrun!!

GVM has installed OK in our systems since last update

Issue History

Date Modified Username Field Change
2023-09-23 13:51 micsec New Issue
2023-09-24 15:48 AlexSN Note Added: 0018503
2023-09-25 12:20 sbrun Assigned To => sbrun
2023-09-25 12:20 sbrun Status new => assigned
2023-09-25 17:04 sbrun Note Added: 0018505
2023-09-25 19:18 sectr Note Added: 0018506
2023-09-25 19:18 sectr Note Edited: 0018506
2023-09-25 19:19 sectr Note Edited: 0018506
2023-09-25 19:20 X0RW3LL Note Added: 0018507
2023-09-26 05:15 micsec Note Added: 0018508
2023-09-26 08:46 AlexSN Note Added: 0018509
2023-09-27 07:41 sbrun Status assigned => resolved
2023-09-27 07:41 sbrun Resolution open => fixed