GVMD container postgresql-client-<version> package error!

Hi Community,

Kindly assist with below error! This install has been working fine but suddenly after a update pull of the containers below error shows up.

gvmd-1                 | Error: You must install at least one postgresql-client-<version> package
gvmd-1                 | waiting 1 second to retry psql connection
gvmd-1                 | Warning: No existing cluster is suitable as a default target. Please see man pg_wrapper(1) how to specify one.
gvmd-1                 | Error: You must install at least one postgresql-client-<version> package
gvmd-1                 | waiting 1 second to retry psql connection
gvmd-1                 | Warning: No existing cluster is suitable as a default target. Please see man pg_wrapper(1) how to specify one.
gvmd-1                 | Error: You must install at least one postgresql-client-<version> package
gvmd-1                 | waiting 1 second to retry psql connection
gvmd-1                 | Warning: No existing cluster is suitable as a default target. Please see man pg_wrapper(1) how to specify one.
gvmd-1                 | Error: You must install at least one postgresql-client-<version> package
gvmd-1                 | waiting 1 second to retry psql connection
gvmd-1                 | Warning: No existing cluster is suitable as a default target. Please see man pg_wrapper(1) how to specify one.
gvmd-1                 | Error: You must install at least one postgresql-client-<version> package
gvmd-1                 | waiting 1 second to retry psql connection
gvmd-1                 | Warning: No existing cluster is suitable as a default target. Please see man pg_wrapper(1) how to specify one.
gvmd-1                 | Error: You must install at least one postgresql-client-<version> package
gvmd-1                 | waiting 1 second to retry psql connection
gvmd-1                 | Warning: No existing cluster is suitable as a default target. Please see man pg_wrapper(1) how to specify one.
gvmd-1                 | Error: You must install at least one postgresql-client-<version> package
gvmd-1                 | waiting 1 second to retry psql connection
gvmd-1                 | Warning: No existing cluster is suitable as a default target. Please see man pg_wrapper(1) how to specify one.
gvmd-1                 | Error: You must install at least one postgresql-client-<version> package
gvmd-1                 | waiting 1 second to retry psql connection
gvmd-1                 | Warning: No existing cluster is suitable as a default target. Please see man pg_wrapper(1) how to specify one.
gvmd-1                 | Error: You must install at least one postgresql-client-<version> package
gvmd-1                 | waiting 1 second to retry psql connection
gvmd-1                 | Warning: No existing cluster is suitable as a default target. Please see man pg_wrapper(1) how to specify one.
gvmd-1                 | Error: You must install at least one postgresql-client-<version> package
gvmd-1                 | waiting 1 second to retry psql connection
gvmd-1                 | Warning: No existing cluster is suitable as a default target. Please see man pg_wrapper(1) how to specify one.
gvmd-1                 | Error: You must install at least one postgresql-client-<version> package
gvmd-1                 | waiting 1 second to retry psql connection
gvmd-1                 | Warning: No existing cluster is suitable as a default target. Please see man pg_wrapper(1) how to specify one.
gvmd-1                 | Error: You must install at least one postgresql-client-<version> package
gvmd-1                 | waiting 1 second to retry psql connection
gvmd-1                 | Warning: No existing cluster is suitable as a default target. Please see man pg_wrapper(1) how to specify one.
gvmd-1                 | Error: You must install at least one postgresql-client-<version> package
gvmd-1                 | waiting 1 second to retry psql connection
gvmd-1                 | Warning: No existing cluster is suitable as a default target. Please see man pg_wrapper(1) how to specify one.
gvmd-1                 | Error: You must install at least one postgresql-client-<version> package
gvmd-1                 | waiting 1 second to retry psql connection
gvmd-1                 | Warning: No existing cluster is suitable as a default target. Please see man pg_wrapper(1) how to specify one.
gvmd-1                 | Error: You must install at least one postgresql-client-<version> package
gvmd-1                 | waiting 1 second to retry psql connection
gvmd-1                 | Warning: No existing cluster is suitable as a default target. Please see man pg_wrapper(1) how to specify one.
gvmd-1                 | Error: You must install at least one postgresql-client-<version> package

Thanks for assistance.

Same issue here with docker, please help

When using the latest gvmd image, the container fails in a loop while attempting a connections to psql.

Image: registry.community.greenbone.net/community/gvmd:stable
Image ID: cf4329b13f57

gvmd-1 | Warning: No existing cluster is suitable as a default target. Please see man pg_wrapper(1) how to specify one.
gvmd-1 | Error: You must install at least one postgresql-client- package

2 Likes

Hello, i get same issue today, seems like in image there is no more postgresql-client or smth like that, i fixed it by

docker exec -it <gvmd_container> bash
apt-get update
apt-get install -y postgresql-client

hope in next release it will be fixed, or on next update must do it again

also faced this issue, what I did to unblock myself in the meantime was to use a local dockerfile:

FROM registry.community.greenbone.net/community/gvmd:edge

# Update and install postgresql-client
RUN apt-get update && apt-get install -y postgresql-client

then in my docker-compose.yaml:

  gvmd:
    build:
      context: ./gvmd
      dockerfile: Dockerfile
    restart: on-failure
    [...]

docker-compose build then docker-compose up -d

it seems has some error in gvmd:stable version, when i use gvmd:24.1.2 replace it, the program works as intended.

you can modify docker-compose.yml file like this:

gvmd:
image: registry.community.greenbone.net/community/gvmd:24.1.2

Sorry I broke the container image on Friday. This PR will fix it Add missing runtime dependency postgres-client for container image by bjoernricks · Pull Request #2352 · greenbone/gvmd · GitHub

The fix will soon be available in the gvmd:edge image and with a new gvmd release in gvmd:stable too.

2 Likes

When using the latest gvmd image, the container fails in a loop while attempting a connections to psql.

Image: registry.community.greenbone.net/community/gvmd:stable
Image ID: cf4329b13f57

gvmd-1 | Warning: No existing cluster is suitable as a default target. Please see man pg_wrapper(1) how to specify one.
gvmd-1 | Error: You must install at least one postgresql-client- package

2 Likes

Based on feedback from here: https://stackoverflow.com/questions/28290488/get-error-you-must-install-at-least-one-postgresql-client-version-package-whe

The following command fixed the same issue for me:

# In the logs we can see that there is an issue with postgresql

docker compose logs -f gvmd

# The gvmd container is where posgresql is supposed to reside, so get into that container

docker exec -it bash

# update the apt repo

apt-get update

# install required tool

apt-get install postgresql-client-common

Same here.

Quick, not permanent, fix:

$ docker exec -it docker-gvmd-1 bash

apt update

apt install postgresql-client-15

exit

Repeat every time you restart the image.

I’m too lazy to create a dockerfile, I hope they’ll fix that soon. :slight_smile:

I have the same issue too. I just noticed it yesterday.

I opened an issue: Can't connect postgresql with image ID: cf4329b13f57 · Issue #1825 · greenbone/openvas-scanner · GitHub

Same here - Deployed today 26.01.2025, same image ID:

gvmd-1                 | Error: You must install at least one postgresql-client-<version> package
gvmd-1                 | waiting 1 second to retry psql connection
gvmd-1                 | Warning: No existing cluster is suitable as a default target. Please see man pg_wrapper(1) how to specify one.

Should now be fixed with Release gvmd 24.3.1 · greenbone/gvmd · GitHub Please let me know if it works for you again!

2 Likes

its not working, kindly provide alternate solution to fix it.
Thanks in advance.

I confirm the stable version is working again.

gvmd:
    image: registry.community.greenbone.net/community/gvmd:stable
    restart: on-failure
2 Likes