ci icon indicating copy to clipboard operation
ci copied to clipboard

stuck in "Waiting postgres ready."

Open JackTan-TT opened this issue 4 years ago • 1 comments

Dear expert,

I've followed the guideline that pull the docker hub images, git-hub repository, and modify the ~/ci/config file, but it stucks in "Waiting postgres ready." , can you please share your comments on it?

Here are the installing log info: root@csgle:/# ~/ci/run.sh 19c5dfbe2ddc1305a298e9b3165d1e250b99f0205289292725c7e40fd61f7679 Create nexus volume. 35d2805266dfb35b391255864c7d31ed3e5913d60200c72ea2cf39a9912f244e openldap-etc-volume openldap-repo-volume 08ceebbb54158b4cdb2615054972453432b08463b515ca461aa068dbb932355a Waiting openldap ready. Waiting openldap ready. Waiting openldap ready. Waiting openldap ready. Waiting openldap ready. adding new entry "ou=gerrit,dc=example,dc=com"

adding new entry "ou=accounts,dc=example,dc=com"

adding new entry "cn=group,ou=accounts,dc=example,dc=com"

adding new entry "uid=admin,ou=accounts,dc=example,dc=com"

c3d7c57b236fdc00e4bcca5974166b206edecc86bfef1fc1f1ff0724078e9012 pg-gerrit-volume 08912dfe4351a67e8a18147edbf745f2fd5bd5134d055f1011fedd1bf5030abd Waiting postgres ready. Waiting postgres ready. Waiting postgres ready. Waiting postgres ready. Waiting postgres ready. Waiting postgres ready. ... ... Waiting postgres ready. Waiting postgres ready. ... ...

After viewing the logs of pg-gerrit container(which is posgres), and the message shows below:

oot@csgle:/# docker logs pg-gerrit The files belonging to this database system will be owned by user "postgres". This user must also own the server process.

The database cluster will be initialized with locale "en_US.utf8". The default database encoding has accordingly been set to "UTF8". The default text search configuration will be set to "english".

Data page checksums are disabled.

fixing permissions on existing directory /var/lib/postgresql/data ... ok creating subdirectories ... ok selecting dynamic shared memory implementation ... posix selecting default max_connections ... 100 selecting default shared_buffers ... 128MB selecting default time zone ... Etc/UTC creating configuration files ... ok running bootstrap script ... ok performing post-bootstrap initialization ... ok syncing data to disk ... ok

Success. You can now start the database server using:

pg_ctl -D /var/lib/postgresql/data -l logfile start

initdb: warning: enabling "trust" authentication for local connections You can change this by editing pg_hba.conf or using the option -A, or --auth-local and --auth-host, the next time you run initdb. waiting for server to start....2020-04-18 06:34:14.702 UTC [46] LOG: starting PostgreSQL 12.2 (Debian 12.2-2.pgdg100+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 8.3.0-6) 8.3.0, 64-bit 2020-04-18 06:34:14.930 UTC [46] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432" 2020-04-18 06:34:15.155 UTC [47] LOG: database system was shut down at 2020-04-18 06:34:12 UTC 2020-04-18 06:34:15.210 UTC [46] LOG: database system is ready to accept connections done server started CREATE DATABASE

/usr/local/bin/docker-entrypoint.sh: ignoring /docker-entrypoint-initdb.d/*

2020-04-18 06:34:33.440 UTC [46] LOG: received fast shutdown request waiting for server to shut down....2020-04-18 06:34:33.497 UTC [46] LOG: aborting any active transactions 2020-04-18 06:34:33.500 UTC [46] LOG: background worker "logical replication launcher" (PID 53) exited with exit code 1 2020-04-18 06:34:33.501 UTC [48] LOG: shutting down 2020-04-18 06:34:34.235 UTC [46] LOG: database system is shut down done server stopped

PostgreSQL init process complete; ready for start up.

2020-04-18 06:34:34.643 UTC [1] LOG: starting PostgreSQL 12.2 (Debian 12.2-2.pgdg100+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 8.3.0-6) 8.3.0, 64-bit 2020-04-18 06:34:34.643 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432 2020-04-18 06:34:34.643 UTC [1] LOG: listening on IPv6 address "::", port 5432 2020-04-18 06:34:34.951 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432" 2020-04-18 06:34:35.199 UTC [64] LOG: database system was shut down at 2020-04-18 06:34:34 UTC 2020-04-18 06:34:35.258 UTC [1] LOG: database system is ready to accept connections

My ~/ci/config file shows below:

#!/bin/bash

Hostname, IP or FQDN.

HOST_NAME=192.168.199.101

LDAP server configuration

Comment these variables out if you already have a running ldap server.

If SLAPD_DOMAIN and SLAPD_PASSWORD is set,

LDAP_SERVER and LDAP_ACCOUNTBASE will be overwritten automatically.

SLAPD_DOMAIN=example.com SLAPD_PASSWORD=secret

LDAP_SERVER and LDAP_ACCOUNTBASE become unnecessary

if SLAPD_DOMAIN and SLAPD_PASSWORD are specified.

LDAP Server IP or FQDN.

LDAP_SERVER=ldap://192.168.199.101

LDAP account baseDN

LDAP_ACCOUNTBASE=ou=accounts,dc=example,dc=com

Gerrit administrator's uid in LDAP

GERRIT_ADMIN_UID=admin GERRIT_ADMIN_PWD=passwd GERRIT_ADMIN_EMAIL=admin@${SLAPD_DOMAIN}

A Nexus server will be started by default.

Specify this variable only if you want to use

an existing nexus server instead.

Jenkins uses NEXUS_WEBURL to setup maven repository mirror.

#NEXUS_WEBURL=http://192.168.199.101/nexus

JackTan-TT avatar Apr 18 '20 07:04 JackTan-TT

Could you please try using postgres:9.6 instead of the latest one since this project has not been maintained for years.

thinkernel avatar Apr 23 '20 07:04 thinkernel