my Kali system updated yesterday and from there on gvmd service ist not starting anymore. I checked entries from my gvmd.service and found one mismatch from what was written here
I’m running into the same problem with the community edition and logs that toddehb posted after updating Kali three days ago as well. In my case I used the version installed with Kali. gsad version is 22.04.0.
In our case the error was that after the system update postgres 15 was installed with pg-gvm but on a different port. Postgres 14 continued to run on the default port. It helped us to put postgres 15 on the default port and to disable postgres 14. Unfortunately, we then had to recreate all the data because the database is on the 14
systemctl stop and systemctl disable postgresql@14-main.service is an option.
I adjusted the port under /etc/postgresql/14/main/postgresql.conf and /etc/postgresql/15/main/postgresql.conf. Default port is 5432 (set it for postgres 15).
After that you can try gvm-setup. It should install gvm again but the database too
To the best of my knowledge this is not related to gvmd (the only relation is that gvmd is using PostgreSQL) but a standard thing which will happen once a Linux distribution (at least on Debian and Kali) is doing a major bump from one PostgreSQL version to another (this also happened in the past from v13 to v14 and now again from v14 to v15):
If this is the case the user needs to take action and “upgrade” the PostgreSQL database (e.g. the one currently containing the gvmd data) to the next version manually via pg_upgradecluster:
Kali should also have some documentation about this in the /usr/share/doc/postgresql* folders and AFAICT you should also get a note (at least on Debian) while updating the OS that an upgrade of PostgreSQL is required.
Unfortunately I have to dig out this thread. Did an upgrade on my Kali machine today and afterwards logging into gsad is not possible anymore. Logs are pretty silent
2023-07-20T19:38:16.205770+02:00 kali systemd[1]: gvmd.service: Main process exited, code=exited, status=1/FAILURE
2023-07-20T19:38:16.205859+02:00 kali systemd[1]: gvmd.service: Failed with result 'exit-code'.
2023-07-20T19:38:16.386983+02:00 kali systemd[1]: gvmd.service: Scheduled restart job, restart counter is at 5.
2023-07-20T19:38:16.387190+02:00 kali systemd[1]: Stopped gvmd.service - Greenbone Vulnerability Manager daemon (gvmd).
2023-07-20T19:38:16.387241+02:00 kali systemd[1]: gvmd.service: Start request repeated too quickly.
2023-07-20T19:38:16.387286+02:00 kali systemd[1]: gvmd.service: Failed with result 'exit-code'.
2023-07-20T19:38:16.387315+02:00 kali systemd[1]: Failed to start gvmd.service - Greenbone Vulnerability Manager daemon (gvmd).