Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't connect postgresql with latest 24.0.3 / Image ID: cf4329b13f57 #2351

Closed
flotpg opened this issue Jan 26, 2025 · 2 comments · Fixed by #2352
Closed

Can't connect postgresql with latest 24.0.3 / Image ID: cf4329b13f57 #2351

flotpg opened this issue Jan 26, 2025 · 2 comments · Fixed by #2352
Labels
bug Something isn't working

Comments

@flotpg
Copy link

flotpg commented Jan 26, 2025

Actual behavior

As mentioned here deploying a fresh instance using Docker has issues accessing the postgresql service:

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.

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

Works with gvmd 24.2.0 instead of latest 24.3.0

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

I accidentally opened an issue here first because I didn't know there is a dedicated repo for gmvd, sorry:
greenbone/openvas-scanner#1825

Steps to reproduce

Deploy a fresh instance like described in the guide: https://greenbone.github.io/docs/latest/22.4/container/index.html

GVM versions

gvmd --version
Greenbone Vulnerability Manager 24.3.0

Environment

Operating system:

Ubuntu 22.04
docker version
Client: Docker Engine - Community
Version: 27.5.1
API version: 1.47
Go version: go1.22.11
Git commit: 9f9e405
Built: Wed Jan 22 13:41:31 2025
OS/Arch: linux/amd64
Context: default

Server: Docker Engine - Community
Engine:
Version: 27.5.1
API version: 1.47 (minimum version 1.24)
Go version: go1.22.11
Git commit: 4c9b3b0
Built: Wed Jan 22 13:41:31 2025
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.7.25
GitCommit: bcc810d6b9066471b0b6fa75f557a15a1cbf31bb
runc:
Version: 1.2.4
GitCommit: v1.2.4-0-g6c52b3f
docker-init:
Version: 0.19.0
GitCommit: de40ad0

Installation method / source: Docker

@flotpg flotpg added the bug Something isn't working label Jan 26, 2025
@flotpg flotpg changed the title Can't connect postgresql with latest 24.0.3 image ID: cf4329b13f57 Can't connect postgresql with latest 24.0.3 / Image ID: cf4329b13f57 Jan 26, 2025
@moosty-moo
Copy link

moosty-moo commented Jan 26, 2025

As a work around, I added the following to my shell script after Greenbone starts with docker compose.
It checks if the postgresql-client package exists in the gvmd container and if not loads it, ignoring the postgresql-client-common package because that does exist.

PCLIENT=docker compose exec -i gvmd dpkg -l |grep -v postgresql-client-common|grep postgresql-client
if [ -z "$PCLIENT" ]; then
# install the postgresql-client. BUG at the moment as missing from gvmd image
docker compose exec -i gvmd /usr/bin/apt-get update
docker compose exec -i gvmd /usr/bin/apt-get install postgresql-client -y
fi

@PiRomant
Copy link

Same.
gvmd:24.2.0 helped.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants