GitLab API访问:无法连接到内部API

在Arch Linux上configurationGitlab后,出现这个错误:

sudo -u gitlab bundle exec rake gitlab:检查RAILS_ENV =生产

Check GitLab API access: FAILED: Failed to connect to internal API gitlab-shell self-check failed Try fixing it: Make sure GitLab is running; Check the gitlab-shell configuration file: sudo -u gitlab -H editor /usr/share/webapps/gitlab-shell/config.yml Please fix the error above and rerun the checks. 

unicorn.stderr.log:

 INFO -- : Refreshing Gem list INFO -- : listening on addr=/run/gitlab/gitlab.socket fd=12 INFO -- : worker=0 ready INFO -- : worker=1 ready INFO -- : master process ready INFO -- : worker=2 ready 

权限:

 srwxrwxrwx 1 gitlab gitlab 0 Jul 20 09:20 gitlab.socket -rw-r--r-- 1 gitlab gitlab 6 Jul 20 09:20 unicorn.pid 

gitlab – 壳/ config.yml

 http+unix: "/run/gitlab/gitlab.socket" gitlab_url: "http://127.0.0.1:8080" 

gitlab / unicorn.rb

 listen "/run/gitlab/gitlab.socket", :backlog => 1024 # listen "127.0.0.1:8080", :tcp_nopush => true 

gitlab / gitlab.yml

 host: localhost port: 3000 https: false 

nginx serverblock

 server { listen 80; server_name code.example.com; charset utf-8; location / { proxy_read_timeout 300; proxy_connect_timeout 300; proxy_redirect off; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header Host $http_host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-Ssl on; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_pass http://127.0.0.1:3000; } server_tokens off; } 

我尝试了很多事情,nginx显示一个空白页面或502错误的网关,和gitlab检查命令是说“无法连接到内部API”或“错误500”。

我有同样的问题。 终于解决了这个问题的是改变默认值:

增加unicorn['worker_processes']

unicorn['listen']127.0.0.1更改为GitLab侦听的IP。

代替:

http + unix:“/run/gitlab/gitlab.socket”

尝试:

gitlab_url:“http + unix://%2Frun%2Fgitlab%2Fgitlab.socket”