0

I get this error in my pipelines:

Health check container logs:
2025年11月18日T09:45:19.064500182Z FATAL: No HOST or PORT found 
Service container logs:
2025年11月18日T09:45:19.061855973Z The files belonging to this database system will be owned by user "postgres".
2025年11月18日T09:45:19.061917474Z This user must also own the server process.
2025年11月18日T09:45:19.061925574Z 
2025年11月18日T09:45:19.063865280Z The database cluster will be initialized with locale "en_US.utf8".
2025年11月18日T09:45:19.063913380Z The default database encoding has accordingly been set to "UTF8".
2025年11月18日T09:45:19.063924080Z The default text search configuration will be set to "english".
2025年11月18日T09:45:19.063932680Z 
2025年11月18日T09:45:19.063940380Z Data page checksums are enabled.
2025年11月18日T09:45:19.063947880Z 
2025年11月18日T09:45:19.063955780Z fixing permissions on existing directory /var/lib/postgresql/data ... ok
2025年11月18日T09:45:19.063967380Z creating subdirectories ... ok
2025年11月18日T09:45:19.063978780Z selecting dynamic shared memory implementation ... posix
2025年11月18日T09:45:19.146643049Z selecting default "max_connections" ... 100
2025年11月18日T09:45:19.172384232Z selecting default "shared_buffers" ... 128MB
2025年11月18日T09:45:19.209953854Z selecting default time zone ... Etc/UTC
2025年11月18日T09:45:19.211827860Z creating configuration files ... ok

As you can see, the logs start out by stating that there was an error, but the database still starts up correctly (as shown by the subsequent logs).

I've done a little research and most people seem to run into this issue when they use a custom network_mode setup. However, I am using the default bridge mode.

My best guess is that either GitLab tries the wrong port or the database is still starting when the healthcheck is performed.

Does anyone know how to fix this? It is not an error per se (since the database starts up correctly and the rest of the CI stage runs perfectly fine), but it is still annoying.

jonrsharpe
123k31 gold badges278 silver badges489 bronze badges
asked Nov 18, 2025 at 10:06
1
  • 2
    What is being shown is not the database starting up, but a new Postgres cluster being created. On other words you are starting from scratch not starting up an existing Postgres instance. That is why you get FATAL: No HOST or PORT found, there is no Postgres instance configured. Commented Nov 18, 2025 at 16:24

0

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.