Hello. When I run gvm-setup, I get the error
database “postgres” has a collation version mismatch
I saw a few posts from people with the same problem, however, the solution they offered didn’t work for me. Can anyone help?
Hello. When I run gvm-setup, I get the error
database “postgres” has a collation version mismatch
I saw a few posts from people with the same problem, however, the solution they offered didn’t work for me. Can anyone help?
I tried to run
sudo -u postgres psql -d postgres -c ‘ALTER DATABASE postgres REFRESH COLLATION VERSION;’
and sudo -u postgres psql -d gvmd -c ‘ALTER DATABASE postgres REFRESH COLLATION VERSION;’
However, I got the error
psql: error: connection to server on socket “/var/run/postgresql/.s.PGSQL.5432” failed: No such file or directory
A relevant documentation is available here:
4. Fixing The gvmd COLLATION Version Mismatch
As this is not directly related to the Greenbone software stack and originating from a 3rd party product (PostgreSQL) it might be possible that further support needs to be sought on a support channel dedicated to PostgreSQL or the underlying operating system.
I had almost the same issue this morning when I was setting it up. I was getting the 2.40 to 2.41 (OS) mismatch. Only thing that corrected for me because I was getting database “gvmd” doesn’t exist:
sudo su postgres
psql
At the postgres prompt:
ALTER DATABASE postgres REFRESH COLLATION VERSION;
ALTER DATABASE template1 REFESH COLLATION VERSION;
You should get the changing version notice.
Exit out, then run sudo gvm-setup again. It should create you gvmd database this time.
Hello Phooba. When I try to run psql, I get the error
psql: error: connection to server on socket “/var/run/postgresql/.s.PGSQL.5432” failed: No such file or directory
Is the server running locally and accepting connections on that socket?
postgres@kali:/home/kali$ psql
I managed to get the postgres prompt. However, when I ran
ALTER DATABASE postgres REFRESH COLLATION VERSION;
I got the error
ERROR: syntax error at or near “NOTICE”
LINE 1: NOTICE: changing version from 2.31 to 2.36
Similar issue; just removed and purged openvas related packages including postgresql and then reinstalled them.
not nicest way, but works..
Eero