Database "gvmd" does not exist

  1. install kali-purple 2024.1 without error
  2. sudo apt update && sudo apt upgrade (or not, the following result is the same)
  3. sudo apt install gvm -y
  4. sudo gvm-setup

completes with errors
WARNING database “postgres” has a collation version mismatch
DETAIL: The database was created using collation version 2.37, but the operating system provides version 2.38

end result being database “gvmd” does not exist, GVM admin user and associated password are not created.

i’m new to this but have done it several time over the last few weeks. recently I completed the steps outlined here Kali Linux Install Guide - Greenbone Community Documentation and without error ended up with a working install of Version 22.9.1

i’ve tried running the commands referenced and manually creating the database but only end up with
“The database was created using collation version 2.37, but the operating system provides version 2.38”

rather than jumping through those hoops i’d like to just install Version 22.9.1 on a fresh install of kali-purple. what would be the github command to do that?

i’d like something like https://github.com/greenbone/openvas-scanner-v22-9-1.git or whatever it should be.

Thanks

The Kali Linux Install Guide provides troubleshooting steps for fixing a PostgreSQL collation mismatch.

However, you would be responsible for building any automated workflows to support your needs. I don’t understand your reason for referencing an older git repository URL for openvas-scanner. The collation mismatch problem is not related to the release version of openvas-scanner, or any other Greenbone component.

The cause of this collation mismatch is because of the updated version of PostgreSQL in Kali Linux. Kali is a rolling distribution and so the packages are often updated ahead of other distros. This places increased burden on the user to manage package conflicts such as this one.

1 Like

The troubleshooting steps for fixing a PostgreSQL collation mismatch as described about have not worked. The result being that the database “gvmd” is not created. Steps to resolve the mismatch error and to create the db manually as described at Troubleshooting - Greenbone Community Documentation have also failed.

My reason for referencing a previous version is that nothing else has changed. The exception being that gvmd recently changed to version 23.6.2. My install is the same. i.e a fresh install of kali-purple 2024.1 on a new vm using the same .iso. My next step is to follow the install guide show above in my original post.

So my thought is that if I can build a fresh install of kali-purple 2024.1 and then run something “equivalent” to “apt install gvm-version-22.9.1” then I would have the same working install as I had a few weeks ago. I completed the process as described above a few weeks back without issue. End result, a working install, here is a screen shot.

Later I tried to add some tools as described here Ultimate Kali Purple Guide: All You Need to Know
That did not go well, so I decided to start over. Brand new vm

  1. install kali-purple 2024.1 without error
  2. sudo apt update && sudo apt upgrade (or not, I’ve tried both ways, the end result is the same)
  3. sudo apt install gvm -y
  4. sudo gvm-setup

…and here I am.

Sorry to here that. Perhaps you can explain what you tried and what didn’t work and post the output here.

from gvm-setup “FATAL: database “gvmd” does not exist”

then from the troubleshooting link posted above…
4. fixing-the-gvmd-collation-version-mismatch

then as shown a little further down in the “other common errors” section I tried creating the gvmd database.

then I tried again to create the database “gvmd” with alternate method that is obviously not correct

I hope I got those in the right order. Sorry if I didn’t. Also just to rule it out, i spun up a kali box (not kali-purple) and experienced the same issue. Sorry for the multiple posts but I’m only allowed to upload 1 picture at a time. Thanks.

Firstly, please read the starting guide. You should understand why we restrict the upload of images. Please format your output using backticks ``. That would help us to point out some places where you are going wrong.

Thank you for your effort.

I figured it out. I had tried these commands previously but I was missing the “;” at the end of the line. DOH!

postgres=# ALTER DATABASE postgres REFRESH COLLATION VERSION;
postgres=# ALTER DATABASE template1 REFRESH COLLATION VERSION;

The resolution was to run these two commands, and then run sudo gvm-setup again.