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
As all the other posts about this issue were closed I will add my findings here. I installed Kali Linux via the Proxmox image on my host, this worked fine and I then updated the system (via apt update & upgrade) and afterwards installed openvas. When running gvm-check-setup I received the collation error (additionally to a redis error displaying that it it wasn’t able to find the redis socket, was solved by running:
sudo redis-cli -s /var/run/redis-openvas/redis-server.sock flushall
)
But the checkup still failed with the collation error I then remembered I changed the default keyboard layout and when switching back to the English layout and running
ALTER DATABASE postgres REFRESH COLLATION VERSION;
The gvm-check was now able successfully go through everything and giving me an OK.
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.