gitaly won't start on CentOS 7
Summary
gitaly
won't start in CentOS 7.
Steps to reproduce
$ cd /etc/systemd/system/
$ wget -O gitlab-gitaly.service https://gitlab.com/gitlab-org/gitlab-recipes/raw/master/init/systemd/gitlab-gitaly.service
$ systemctl daemon-reload
$ systemctl start gitlab-gitaly.service
What is the current bug behavior?
gitaly
does not start.
What is the expected correct behavior?
gitaly
should start, so cloning via HTTPS is possible.
Relevant logs and/or screenshots
$ systemctl restart gitlab-gitaly.service
$ journalctl -xe
ug 01 16:08:06 SERVER polkitd[26723]: Registered Authentication Agent for unix-process:13484:1744704068 (system bus name :1.26150 [/usr/bin/pkttyagent --notify-fd 5 --fallback], object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8)
Aug 01 16:08:06 SERVER systemd[1]: Cannot add dependency job for unit postgresql.service, ignoring: Unit not found.
Aug 01 16:08:06 SERVER systemd[1]: Starting Gitaly is a Git RPC service for handling all the git calls made by GitLab....
-- Subject: Unit gitlab-gitaly.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit gitlab-gitaly.service has begun starting up.
Aug 01 16:08:06 SERVER systemd[1]: Started Gitaly is a Git RPC service for handling all the git calls made by GitLab..
-- Subject: Unit gitlab-gitaly.service has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit gitlab-gitaly.service has finished starting up.
--
-- The start-up result is done.
Aug 01 16:08:06 SERVER polkitd[26723]: Unregistered Authentication Agent for unix-process:13484:1744704068 (system bus name :1.26150, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8) (disconnected from bus)
Aug 01 16:08:06 SERVER gitlab-gitaly[13490]: Gitaly, version v0.21.2-20170801.080230
Aug 01 16:08:06 SERVER gitlab-gitaly[13490]: Usage: /home/git/gitaly/gitaly [OPTIONS] configfile
Aug 01 16:08:06 SERVER gitlab-gitaly[13490]: -version
Aug 01 16:08:06 SERVER gitlab-gitaly[13490]: Print version and exit
Aug 01 16:08:06 SERVER systemd[1]: gitlab-gitaly.service: main process exited, code=exited, status=2/INVALIDARGUMENT
Aug 01 16:08:06 SERVER systemd[1]: Unit gitlab-gitaly.service entered failed state.
Aug 01 16:08:06 SERVER systemd[1]: gitlab-gitaly.service failed.
Results of GitLab environment info
Expand for output related to GitLab environment info
OS: CentOS Linux release 7.3.1611 (Core)
$ sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production
System information System: Current User: git Using RVM: no Ruby Version: 2.3.3p222 Gem Version: 2.5.2 Bundler Version:1.15.1 Rake Version: 10.5.0 Redis Version: 3.2.9 Git Version: 2.13.2 Sidekiq Version:5.0.0 Go Version: go1.8.3 linux/amd64
GitLab information Version: 9.4.3 Revision: b125d21138 Directory: /home/git/gitlab DB Adapter: postgresql URL: https://URL HTTP Clone URL: https://URL/some-group/some-project.git SSH Clone URL: git@URL:some-group/some-project.git Using LDAP: no Using Omniauth: no
GitLab Shell Version: 5.3.1 Repository storage paths:
- default: /home/git/repositories Hooks: /home/git/gitlab-shell/hooks Git: /usr/bin/git
Results of GitLab application Check
Expand for output related to the GitLab application check
$ sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true
Checking GitLab Shell ...
GitLab Shell version >= 5.3.1 ? ... OK (5.3.1) Repo base directory exists? default... yes Repo storage directories are symlinks? default... no Repo paths owned by git:root, or git:git? default... yes Repo paths access is drwxrws---? default... yes hooks directories in repos are links: ... 2/1 ... ok 2/4 ... ok 1/5 ... ok 7/7 ... ok 9/12 ... ok 7/13 ... ok 9/14 ... ok 7/15 ... ok 11/16 ... ok 7/17 ... ok 7/19 ... ok 1/20 ... ok 1/21 ... ok 7/23 ... ok 7/24 ... ok 2/25 ... ok 9/26 ... ok 13/27 ... ok 14/28 ... ok 14/29 ... ok 11/30 ... ok 12/32 ... ok 14/33 ... ok 7/34 ... ok 14/35 ... ok 19/36 ... ok 7/37 ... ok 19/38 ... ok 21/39 ... ok 7/41 ... ok 7/44 ... ok 23/45 ... ok 22/48 ... ok 22/49 ... ok 24/50 ... ok 25/51 ... ok 25/53 ... ok 28/54 ... ok 26/57 ... ok 24/59 ... ok 7/60 ... ok 25/62 ... ok 25/65 ... ok 28/67 ... ok 26/68 ... ok 26/70 ... ok 28/73 ... ok 28/74 ... ok 1/75 ... ok 28/77 ... ok 32/78 ... ok 32/79 ... ok 32/80 ... ok 32/81 ... ok 32/83 ... ok 24/85 ... repository is empty 24/86 ... repository is empty 24/87 ... repository is empty 32/88 ... ok Running /home/git/gitlab-shell/bin/check Check GitLab API access: OK Access to /home/git/.ssh/authorized_keys: OK Send ping to redis server: OK gitlab-shell self-check successful
Checking GitLab Shell ... Finished
Checking Sidekiq ...
Running? ... yes Number of Sidekiq processes ... 1
Checking Sidekiq ... Finished
Checking Reply by email ...
Reply by email is disabled in config/gitlab.yml
Checking Reply by email ... Finished
Checking LDAP ...
LDAP is disabled in config/gitlab.yml
Checking LDAP ... Finished
Checking GitLab ...
Git configured correctly? ... yes Database config exists? ... yes All migrations up? ... yes Database contains orphaned GroupMembers? ... no GitLab config exists? ... yes GitLab config up to date? ... yes Log directory writable? ... yes Tmp directory writable? ... yes Uploads directory exists? ... yes Uploads directory has correct permissions? ... yes Uploads directory tmp has correct permissions? ... yes Init script exists? ... no Try fixing it: Install the init script For more information see: doc/install/installation.md in section "Install Init Script" Please fix the error above and rerun the checks. Init script up-to-date? ... can't check because of previous errors Projects have namespace: ... 2/1 ... yes 2/4 ... yes 1/5 ... yes 7/7 ... yes 9/12 ... yes 7/13 ... yes 9/14 ... yes 7/15 ... yes 11/16 ... yes 7/17 ... yes 7/19 ... yes 1/20 ... yes 1/21 ... yes 7/23 ... yes 7/24 ... yes 2/25 ... yes 9/26 ... yes 13/27 ... yes 14/28 ... yes 14/29 ... yes 11/30 ... yes 12/32 ... yes 14/33 ... yes 7/34 ... yes 14/35 ... yes 19/36 ... yes 7/37 ... yes 19/38 ... yes 21/39 ... yes 7/41 ... yes 7/44 ... yes 23/45 ... yes 22/48 ... yes 22/49 ... yes 24/50 ... yes 25/51 ... yes 25/53 ... yes 28/54 ... yes 26/57 ... yes 24/59 ... yes 7/60 ... yes 25/62 ... yes 25/65 ... yes 28/67 ... yes 26/68 ... yes 26/70 ... yes 28/73 ... yes 28/74 ... yes 1/75 ... yes 28/77 ... yes 32/78 ... yes 32/79 ... yes 32/80 ... yes 32/81 ... yes 32/83 ... yes 24/85 ... yes 24/86 ... yes 24/87 ... yes 32/88 ... yes Redis version >= 2.8.0? ... yes Ruby version >= 2.3.3 ? ... yes (2.3.3) Git version >= 2.7.3 ? ... yes (2.13.2) Active users: ... 16
Checking GitLab ... Finished
Possible fixes
I am able to start and keep gitaly
running with this command:
sudo -u git -H /home/git/gitlab/bin/daemon_with_pidfile /home/git/gitlab/tmp/pids/gitaly.pid /home/git/gitaly/gitaly /home/git/gitaly/config.toml >> /var/log/gitaly.log 2>&1