Closed ghost closed 5 years ago
any update on this?
Could you try to launch through "docker run" with --env 'DEBUG=true' as well, considering the information on the error Gitlab ran into is not displayed there ?
After enabling the --env 'DEBUG=true
getting like
+ export GITLAB_INSTALL_DIR GITLAB_SHELL_INSTALL_DIR GITLAB_DATA_DIR GITLAB_REPOS_DIR GITLAB_DOWNLOADS_DIR GITLAB_SHARED_DIR GITLAB_HOST GITLAB_PORT GITLAB_RELATIVE_URL_ROOT GITLAB_HTTPS GITLAB_SSH_HOST GITLAB_SSH_PORT GITLAB_SIGNUP_ENABLED GITLAB_PROJECTS_LIMIT GITLAB_USERNAME_CHANGE GITLAB_CREATE_GROUP
+ local IFS=:
+ sudo -HEu git envsubst '$GITLAB_INSTALL_DIR:$GITLAB_SHELL_INSTALL_DIR:$GITLAB_DATA_DIR:$GITLAB_REPOS_DIR:$GITLAB_DOWNLOADS_DIR:$GITLAB_SHARED_DIR:$GITLAB_HOST:$GITLAB_PORT:$GITLAB_RELATIVE_URL_ROOT:$GITLAB_HTTPS:$GITLAB_SSH_HOST:$GITLAB_SSH_PORT:$GITLAB_SIGNUP_ENABLED:$GITLAB_PROJECTS_LIMIT:$GITLAB_USERNAME_CHANGE:$GITLAB_CREATE_GROUP'
+ rm -f /tmp/tmp.fJRiqAUhiC
+ gitlab_configure_database
+ echo -n 'Configuring gitlab::database'
+ gitlab_finalize_database_parameters
+ [[ -n '' ]]
+ [[ -n '' ]]
+ [[ -z localhost ]]
+ DB_ADAPTER=mysql2
+ case ${DB_ADAPTER} in
+ DB_ENCODING=utf8
+ DB_COLLATION=utf8_general_ci
+ DB_PORT=3306
+ DB_USER=gitlab
+ DB_NAME=gitlabhq_production
+ gitlab_check_database_connection
+ case ${DB_ADAPTER} in
+ prog='mysqladmin -h localhost -P 3306 -u gitlab -p password status'
+ timeout=60
+ mysqladmin -h localhost -P 3306 -u gitlab -p password status
++ expr 60 - 1
+ timeout=59
+ [[ 59 -eq 0 ]]
+ echo -n .
+ sleep 1
+ mysqladmin -h localhost -P 3306 -u gitlab -p password status
++ expr 59 - 1
+ timeout=58
+ [[ 58 -eq 0 ]]
+ echo -n .
+ sleep 1
+ mysqladmin -h localhost -P 3306 -u gitlab -p password status
++ expr 58 - 1
+ timeout=57
+ [[ 57 -eq 0 ]]
+ echo -n .
+ sleep 1
+ mysqladmin -h localhost -P 3306 -u gitlab -p password status
++ expr 57 - 1
+ timeout=56
+ [[ 56 -eq 0 ]]
+ echo -n .
+ sleep 1
+ mysqladmin -h localhost -P 3306 -u gitlab -p password status
++ expr 56 - 1
+ timeout=55
+ [[ 55 -eq 0 ]]
+ echo -n .
.
.
.
+ mysqladmin -h localhost -P 3306 -u gitlab -ppassword status
++ expr 1 - 1
+ timeout=0
Configuring gitlab::database...........................................................
` then container exited.
Hey @Beanben,
your problem is that you try to use localhost
for your database this won't work in container execept your brake up the network isolation. By default every container has it's own localhost.
So to fix that use the external IP of your database and ensure that the connection from your container is allowed.
If the error still exists please reopen the issue.
Yes i agree, but even after providing the database host name also its same. Can you please tell me where am i doing wrong. Is my docker-compose.yml
correct.
I meet the same issue , I think the sameersbn/gitlab:latest image is corrupt and Can't work at all ,it's rubbish.
I meet the same issue with an older image sameersbn/gitlab:7.14.3 via GITLAB_OMNIBUS_CONFIG I don't get any database-connection. If I try a seperatly mysql/postgresql-image gitlab start's before mysql or postgresql is ready. Every solved issue here worked not out https://stackoverflow.com/questions/31746182/docker-compose-wait-for-container-x-before-starting-y
Hi I am trying to connect the gitlab with external mysql using docker-compose. But getting the error
dockergitlab_gitlab_1 exited with code 1
when i rundocker-compose up
and its keeps on repeating.Below is my
docker-compose.yaml
`
Tried the below command as wel
docker run --name gitlab -d \ --env 'DB_ADAPTER=mysql2' --env 'DB_HOST=mysql_IP' \ --env 'DB_NAME=gitlabhq_production' \ --env 'DB_PORT=3306' \ --env 'DB_USER=gitlab' --env 'DB_PASS=password' \ --volume /srv/docker/gitlab/gitlab:/home/git/data \ sameersbn/gitlab:latest
but getting like below
Loading /etc/docker-gitlab/runtime/env-defaults Initializing logdir... Initializing datadir... Installing configuration templates... Configuring gitlab... Configuring gitlab::database...........................................................