Starting Gitaly - load linguist colors - permission denied
Summary
After installing gitlab-ce and running 'gitlab-ctl start', I have the following problem: gitlab starts, but gitaly is not available. The following message appears in the logs every second:
2018-03-14_14:35:08.43180 time=“2018-03-14T14:35:08Z” level=info msg=“Starting Gitaly” version=“Gitaly, version 0.81.0, built 20180225.183225”
2018-03-14_14:35:08.43185 time=“2018-03-14T14:35:08Z” level=warning msg=“git path not configured. Using default path resolution” resolvedPath=/opt/gitlab/embedded/bin/git
2018-03-14_14:35:08.43490 time=“2018-03-14T14:35:08Z” level=warning msg=“git path not configured. Using default path resolution” resolvedPath=/opt/gitlab/embedded/bin/git
2018-03-14_14:35:08.43505 time=“2018-03-14T14:35:08Z” level=fatal msg=“load config” config_path=/var/opt/gitlab/gitaly/config.toml error="load linguist colors: open /tmp/gitaly-linguist-path138485659: permission denied"
I also described the problem on the forum: https://forum.gitlab.com/t/starting-gitaly-load-linguist-colors-permission-denied/14746
Permissions of /tmp: drwxrwxr-x+ 8 root root 4096 Mar 14 15:49 tmp
Steps to reproduce
Installation according to the instructions: https://about.gitlab.com/installation/#centos-6
yum -y install gitlab-ce (CentOS 6.6) First, I installed version 10.5.2, and then updated to 10.5.4 - on both versions the same problem.
Previously I installed similarly on Ubuntu 16.04 LTS - GitLab 10.5.x (it was ok), then I made the upgrade to 10.5.4 and it also works properly. It looks like the problem only occurs on CentOS.
What is the current bug behavior?
Gitaly does not start. I can not create and manage projects by gui.
What is the expected correct behavior?
Correct operation of Gitaly.
Relevant logs
Relevant logs
(Log files with `/var/log/gitlab/gitaly/`) 2018-03-14_14:35:08.43180 time=“2018-03-14T14:35:08Z” level=info msg=“Starting Gitaly” version=“Gitaly, version 0.81.0, built 20180225.183225” 2018-03-14_14:35:08.43185 time=“2018-03-14T14:35:08Z” level=warning msg=“git path not configured. Using default path resolution” resolvedPath=/opt/gitlab/embedded/bin/git 2018-03-14_14:35:08.43490 time=“2018-03-14T14:35:08Z” level=warning msg=“git path not configured. Using default path resolution” resolvedPath=/opt/gitlab/embedded/bin/git 2018-03-14_14:35:08.43505 time=“2018-03-14T14:35:08Z” level=fatal msg=“load config” config_path=/var/opt/gitlab/gitaly/config.toml error="load linguist colors: open /tmp/gitaly-linguist-path138485659: permission denied"(Live log output can be found with
sudo gitlab-ctl tail
.)
Details of package version
Provide the package version installation details
gitlab-ce-10.5.4-ce.0.el6.x86_64
Environment details
- Operating System: CentOS 6.6
- Installation Target, remove incorrect values:
- VM: Other
- Installation Type, remove incorrect values:
- New Installation
- Is there any other software running on the machine: SVN, Jenkins
- Is this a single or multiple node installation? SINGLE
- Resources
- CPU:
REPLACE-WITH-DETAILS
I will add this information tomorrow - I do not have access right now. - Memory total:
REPLACE-WITH-DETAILS
- CPU:
Configuration details
Provide the relevant sections of `/etc/gitlab/gitlab.rb`
I only changed the ports because of Jenkins and SVN. I've added the configuration for LDAP. There was nothing changed in Gitaly.external_url 'http://10.0.4.169:8888' gitlab_rails['gitlab_email_enabled'] = true gitlab_rails['gitlab_email_from'] = 'git@xxx.xx' gitlab_rails['gitlab_email_display_name'] = 'Git notifications' gitlab_rails['gitlab_email_reply_to'] = 'noreply.169@xxx.xx' gitlab_rails['gitlab_default_can_create_group'] = false gitlab_rails['gitlab_username_changing_enabled'] = false
gitlab_rails['ldap_enabled'] = true gitlab_rails['ldap_servers'] = YAML.load [ ... ] (it's work fine...) EOS
gitlab_workhorse['auth_backend'] = "http://localhost:8880" unicorn['port'] = 8880 sidekiq['listen_port'] = 8882
`/var/opt/gitlab/gitaly/config.toml` is default
# # # The configuration in the file `/var/opt/gitlab/gitaly/config.toml` is the default. # # #socket_path = '/var/opt/gitlab/gitaly/gitaly.socket' bin_dir = '/opt/gitlab/embedded/bin'
Optional: export metrics via Prometheus
prometheus_listen_addr = 'localhost:9236'
[[storage]] name = 'default' path = '/var/opt/gitlab/git-data/repositories'
[logging]
[auth]
[gitaly-ruby] dir = "/opt/gitlab/embedded/service/gitaly-ruby"
[gitlab-shell] dir = "/opt/gitlab/embedded/service/gitlab-shell"
Temporary solution
I temporary solved this problem in the following way, I added a new directory:
sudo -u git mkdir /var/opt/gitlab/gitaly/tmp
And then in the configuration file I added the following variable:
gitaly['env'] = { 'TMPDIR' => '/var/opt/gitlab/gitaly/tmp' }
After creating TMPDIR, Gitaly started correctly.