sameersbn / docker-gitlab

Dockerized GitLab
http://www.damagehead.com/docker-gitlab/
MIT License
7.88k stars 2.14k forks source link

Gitaly not starting after upgrade to 12.9.5 #2136

Closed bvallant closed 4 years ago

bvallant commented 4 years ago

After updating to 12.9.5 Gitaly didn't start properly anymore for me, the supervisor logs showing the following:

root@127:/home/git/gitaly# supervisorctl tail core:gitaly
T09:19:30Z" level=fatal msg="load config" config_path=/home/git/gitaly/config.toml error="stat : no such file or directory"
time="2020-05-04T09:19:31Z" level=info msg="Starting Gitaly" version="Gitaly, version 12.10.0"
time="2020-05-04T09:19:31Z" level=warning msg="git path not configured. Using default path resolution" resolvedPath=/usr/bin/git
time="2020-05-04T09:19:31Z" level=warning msg="Gitaly bin directory is not configured" error="stat : no such file or directory"
time="2020-05-04T09:19:31Z" level=fatal msg="load config" config_path=/home/git/gitaly/config.toml error="stat : no such file or directory"

Manually editing /home/git/gitaly.config.toml and adding bin_dir = "/home/git/gitaly" fixed it. Not totally sure if this is an issue with gitlab itself or the docker-gitlab.

dansch94 commented 4 years ago

I have the same problem but

Manually editing /home/git/gitaly.config.toml and adding bin_dir = "/home/git/gitaly" fixed it. Not totally sure if this is an issue with gitlab itself or the docker-gitlab.

not works for me :/

bvallant commented 4 years ago

I have the same problem but

Manually editing /home/git/gitaly.config.toml and adding bin_dir = "/home/git/gitaly" fixed it. Not totally sure if this is an issue with gitlab itself or the docker-gitlab.

not works for me :/

If you do it with a running container you have to restart gitaly (supervisorctl start core:gitaly), otherwise check the log with supervisorctl tail core:gitaly.

dansch94 commented 4 years ago

I restartet the full container and allways get: gitlab_1 | 2020-05-04 12:27:20,105 INFO spawned: 'gitaly' with pid 707 gitlab_1 | 2020-05-04 12:27:20,298 INFO exited: gitaly (exit status 1; not expected) gitlab_1 | 2020-05-04 12:27:22,302 INFO spawned: 'gitaly' with pid 721 gitlab_1 | 2020-05-04 12:27:22,516 INFO exited: gitaly (exit status 1; not expected) gitlab_1 | 2020-05-04 12:27:25,520 INFO spawned: 'gitaly' with pid 734 gitlab_1 | 2020-05-04 12:27:25,743 INFO exited: gitaly (exit status 1; not expected) gitlab_1 | 2020-05-04 12:27:25,941 INFO gave up: gitaly entered FATAL state, too many start retries too quickly in docker logs and root@3c6e24a622fb:/home/git/gitlab# supervisorctl tail core:gitaly git/gitaly/config.toml error="stat : no such file or directory" time="2020-05-04T12:27:20+02:00" level=info msg="Starting Gitaly" version="Gitaly, version 12.10.0" time="2020-05-04T12:27:20+02:00" level=warning msg="git path not configured. Using default path resolution" resolvedPath=/usr/bin/git time="2020-05-04T12:27:20+02:00" level=warning msg="Gitaly bin directory is not configured" error="stat : no such file or directory" time="2020-05-04T12:27:20+02:00" level=fatal msg="load config" config_path=/home/git/gitaly/config.toml error="stat : no such file or directory" time="2020-05-04T12:27:22+02:00" level=info msg="Starting Gitaly" version="Gitaly, version 12.10.0" time="2020-05-04T12:27:22+02:00" level=warning msg="git path not configured. Using default path resolution" resolvedPath=/usr/bin/git time="2020-05-04T12:27:22+02:00" level=warning msg="Gitaly bin directory is not configured" error="stat : no such file or directory" time="2020-05-04T12:27:22+02:00" level=fatal msg="load config" config_path=/home/git/gitaly/config.toml error="stat : no such file or directory" time="2020-05-04T12:27:25+02:00" level=info msg="Starting Gitaly" version="Gitaly, version 12.10.0" time="2020-05-04T12:27:25+02:00" level=warning msg="git path not configured. Using default path resolution" resolvedPath=/usr/bin/git time="2020-05-04T12:27:25+02:00" level=warning msg="Gitaly bin directory is not configured" error="stat : no such file or directory" time="2020-05-04T12:27:25+02:00" level=fatal msg="load config" config_path=/home/git/gitaly/config.toml error="stat : no such file or directory" in supervisorctl tail core:gitaly

bvallant commented 4 years ago

Gitaly bin directory is not configured" error="stat : no such file or directory looks like the setting in the config.toml isnt correct... Did you make sure you put the bin_dir setting at the beginning of the file (like here) and not in some section at the end of the file?

dansch94 commented 4 years ago

Did you make sure you put the bin_dir setting at the beginning of the file (like here) and not in some section at the end of the file?

This was the problem and the solution. Thanks a lot @bvallant you make my day.

dansch94 commented 4 years ago

I'm again. I think it is a part of the above error. After the latest fix i see my repositorys again but when i try to push to a new repository, i get the erroe below: Enumerating objects: 71, done. Counting objects: 100% (71/71), done. Delta compression using up to 4 threads Compressing objects: 100% (45/45), done. Writing objects: 100% (71/71), 14.57 KiB | 14.57 MiB/s, done. Total 71 (delta 23), reused 56 (delta 17) remote: /home/git/gitaly/ruby/git-hooks/pre-receive: 4: exec: /home/git/gitaly/gitaly-hooks: not found To ssh://git.example.com:10022/user/repo.git ! [remote rejected] master -> master (pre-receive hook declined) maybe it is also the configuration of gitaly?

sameersbn commented 4 years ago

can you repull the image there was a fix that was not included in the build

sameersbn commented 4 years ago

basically the config.toml updates were missing from the build https://github.com/sameersbn/docker-gitlab/commit/0cd4a358c481fb64da7427283081d8f14a4b6825

achretien commented 4 years ago

@sameersbn since the add of bin_dir = "/usr/local/bin/" you can remove

from https://github.com/sameersbn/docker-gitlab/blob/fa6d5370b2fdc3c2e8ad22cc64e0144c8d737997/assets/build/install.sh#L140

to https://github.com/sameersbn/docker-gitlab/blob/fa6d5370b2fdc3c2e8ad22cc64e0144c8d737997/assets/build/install.sh#L146

dansch94 commented 4 years ago

can you repull the image there was a fix that was not included in the build

thank you! It works!

sameersbn commented 4 years ago

@achretien thanks for letting me know. fixed in https://github.com/sameersbn/docker-gitlab/pull/2138