Gitlabの私達の独自のインスタンスを使用して、エラーが発生しましたbackground worker "logical replication launcher" exited with exit code 1
私たちのランナーでPostgresサービスを使おうとしているとき。インターネット上で役に立つことを見つけていません。何が起こっているのか
バージョン:
_ [gitlab-ci.yml
:
image: golang:1.12
services:
- postgres
variables:
POSTGRES_USER: postgres
POSTGRES_DB: xproject_test
POSTGRES_PASSWORD: postgres
_
障害ログ:
Running with gitlab-runner 12.5.0 (577f813d)
on xproject sEZeszwx
Using Docker executor with image xproject-ci ...
Starting service postgres:latest ...
Pulling docker image postgres:latest ...
Using docker image sha256:9eb7b0ce936d2eac8150df3de7496067d56bf4c1957404525fd60c3640dfd450 for postgres:latest ...
Waiting for services to be up and running...
*** WARNING: Service runner-sEZeszwx-project-18-concurrent-0-postgres-0 probably didn't start properly.
Health check error:
service "runner-sEZeszwx-project-18-concurrent-0-postgres-0-wait-for-service" timeout
Health check container logs:
Service container logs:
2019-11-20T10:16:23.805738908Z The files belonging to this database system will be owned by user "postgres".
2019-11-20T10:16:23.805807212Z This user must also own the server process.
2019-11-20T10:16:23.805818432Z
2019-11-20T10:16:23.806094094Z The database cluster will be initialized with locale "en_US.utf8".
2019-11-20T10:16:23.806120707Z The default database encoding has accordingly been set to "UTF8".
2019-11-20T10:16:23.806208494Z The default text search configuration will be set to "english".
2019-11-20T10:16:23.806264704Z
2019-11-20T10:16:23.806282587Z Data page checksums are disabled.
2019-11-20T10:16:23.806586302Z
2019-11-20T10:16:23.806931287Z fixing permissions on existing directory /var/lib/postgresql/data ... ok
2019-11-20T10:16:23.807763042Z creating subdirectories ... ok
2019-11-20T10:16:23.808045789Z selecting dynamic shared memory implementation ... posix
2019-11-20T10:16:23.835644353Z selecting default max_connections ... 100
2019-11-20T10:16:23.866604734Z selecting default shared_buffers ... 128MB
2019-11-20T10:16:23.928432088Z selecting default time zone ... Etc/UTC
2019-11-20T10:16:23.929447992Z creating configuration files ... ok
2019-11-20T10:16:24.122662589Z running bootstrap script ... ok
2019-11-20T10:16:24.706975030Z performing post-bootstrap initialization ... ok
2019-11-20T10:16:24.819117668Z initdb: warning: enabling "trust" authentication for local connections
2019-11-20T10:16:24.819150100Z You can change this by editing pg_hba.conf or using the option -A, or
2019-11-20T10:16:24.819157763Z --auth-local and --auth-Host, the next time you run initdb.
2019-11-20T10:16:24.819272849Z syncing data to disk ... ok
2019-11-20T10:16:24.819313390Z
2019-11-20T10:16:24.819328954Z
2019-11-20T10:16:24.819340787Z Success. You can now start the database server using:
2019-11-20T10:16:24.819349374Z
2019-11-20T10:16:24.819357407Z pg_ctl -D /var/lib/postgresql/data -l logfile start
2019-11-20T10:16:24.819365840Z
2019-11-20T10:16:24.857656160Z waiting for server to start....2019-11-20 10:16:24.857 UTC [46] LOG: starting PostgreSQL 12.1 (Debian 12.1-1.pgdg100+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 8.3.0-6) 8.3.0, 64-bit
2019-11-20T10:16:24.860371378Z 2019-11-20 10:16:24.860 UTC [46] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2019-11-20T10:16:24.886271885Z 2019-11-20 10:16:24.886 UTC [47] LOG: database system was shut down at 2019-11-20 10:16:24 UTC
2019-11-20T10:16:24.892844968Z 2019-11-20 10:16:24.892 UTC [46] LOG: database system is ready to accept connections
2019-11-20T10:16:24.943542403Z done
2019-11-20T10:16:24.943591286Z server started
2019-11-20T10:16:25.084670051Z CREATE DATABASE
2019-11-20T10:16:25.086153670Z
2019-11-20T10:16:25.086604000Z
2019-11-20T10:16:25.086694058Z /usr/local/bin/docker-entrypoint.sh: ignoring /docker-entrypoint-initdb.d/*
2019-11-20T10:16:25.086711933Z
2019-11-20T10:16:25.088473308Z 2019-11-20 10:16:25.088 UTC [46] LOG: received fast shutdown request
2019-11-20T10:16:25.090893184Z waiting for server to shut down....2019-11-20 10:16:25.090 UTC [46] LOG: aborting any active transactions
2019-11-20T10:16:25.092499368Z 2019-11-20 10:16:25.092 UTC [46] LOG: background worker "logical replication launcher" (PID 53) exited with exit code 1
2019-11-20T10:16:25.093942785Z 2019-11-20 10:16:25.093 UTC [48] LOG: shutting down
2019-11-20T10:16:25.112341160Z 2019-11-20 10:16:25.112 UTC [46] LOG: database system is shut down
2019-11-20T10:16:25.189351710Z done
2019-11-20T10:16:25.189393803Z server stopped
2019-11-20T10:16:25.189929555Z
2019-11-20T10:16:25.189967760Z PostgreSQL init process complete; ready for start up.
2019-11-20T10:16:25.189982340Z
2019-11-20T10:16:25.214046388Z 2019-11-20 10:16:25.213 UTC [1] LOG: starting PostgreSQL 12.1 (Debian 12.1-1.pgdg100+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 8.3.0-6) 8.3.0, 64-bit
2019-11-20T10:16:25.214092434Z 2019-11-20 10:16:25.213 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432
2019-11-20T10:16:25.214172706Z 2019-11-20 10:16:25.214 UTC [1] LOG: listening on IPv6 address "::", port 5432
2019-11-20T10:16:25.219769380Z 2019-11-20 10:16:25.219 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2019-11-20T10:16:25.241614800Z 2019-11-20 10:16:25.241 UTC [64] LOG: database system was shut down at 2019-11-20 10:16:25 UTC
2019-11-20T10:16:25.248887712Z 2019-11-20 10:16:25.248 UTC [1] LOG: database system is ready to accept connections
*********
_
Gitlabがインストールされていて問題を解決したマシンを再起動しました。なぜサービスがタイムアウトを与えて誤解を招くログを印刷していたのかについてはわかりません。
関連課題Dockerとのより良いヘルスチェックを持つこと: https://gitlab.com/gitlab-org/gitlab-runner/issues/3984
それはエラーではありません、それはログです。データベースがシャットダウンすると、これは正常です。これがロギングの価値がある理由(もちろんランチャーがシャットダウンしたときにシャットダウンしようとしている)で、将来のバージョンでは沈黙することがあります。しかし、それはどんな種類の問題も示さない。
ご質問がある場合は、別の質問でお問い合わせください。