archlinux 上的 Gitlab 不起作用 ->API 无法访问 [英] Gitlab on archlinux not working -> API not reachable

查看:25
本文介绍了archlinux 上的 Gitlab 不起作用 ->API 无法访问的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试按照 https://wiki.archlinux.org/index 在 archlinux 上安装 gitlab.php/gitlab由于8080是一个很好的当前端口,我已经切换到8033.

I have tried to install gitlab on archlinux following https://wiki.archlinux.org/index.php/gitlab As 8080 is a well current port, I have switched to 8033.

当我尝试连接到该网站时,它会向我打印 402 错误.如果我查看 nginx/gitlab_errors.log 我有:

When I try to connect to the website, it prints me 402 error. If I have a look to nginx/gitlab_errors.log I have :

2015/03/23 21:16:00 [error] 29748#0: *1081 connect() failed (111: Connection refused) while connecting to upstream, client: 5.51.59.153, server: gitlab.floth.fr, request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:8033/", host: "gitlab.floth.fr"

如果我打开 /var/lib/gitlab/gitlab-shell.log 我得到

# Logfile created on 2015-03-23 21:09:06 +0100 by logger.rb/47272
W, [2015-03-23T21:09:06.321779 #30833]  WARN -- : Failed to connect to internal API <GET http://localhost:8033/api/v3/internal/check>: #<Errno::ECONNREFUSED: Connection refused - connect(2) for "localhost" port 8033>
W, [2015-03-23T21:17:48.059769 #31230]  WARN -- : Failed to connect to internal API <GET http://localhost:8033//api/v3/internal/check>: #<Errno::ECONNREFUSED: Connection refused - connect(2) for "localhost" port 8033>
W, [2015-03-23T21:22:01.846281 #31548]  WARN -- : Failed to connect to internal API <GET http://localhost:8033//api/v3/internal/check>: #<Errno::ECONNREFUSED: Connection refused - connect(2) for "localhost" port 8033>

如果我运行 sudo -u gitlab bundle exec rake gitlab:check RAILS_ENV=production 我得到:

And if I run sudo -u gitlab bundle exec rake gitlab:check RAILS_ENV=production I get :

hooks directories in repos are links: ... can't check, you have no projects
Running /usr/share/webapps/gitlab-shell/bin/check
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.

Checking GitLab Shell ... Finished

如果我执行 netstat -a |grep 8033,该端口没有任何监听...

If I do netstat -a | grep 8033, nothing listening on that port...

有人知道去哪里找吗?什么服务因为未启动或失败而未运行?感谢您的帮助.

Does anyone have an idea where to look for ? What service is not running because not started or failed? Thank you for your help.

编辑gitlab-shell/config.yml

user: gitlab
gitlab_url: "http://localhost:8033/"

repos_path: "/srv/git/gitlab"

auth_file: "/var/lib/gitlab/.ssh/authorized_keys"

redis:
  bin: /usr/bin/redis-cli
  host: 127.0.0.1
  port: 6379
  database: 0
  namespace: resque:gitlab

log_file: "/var/log/gitlab/gitlab-shell.log"
log_level: INFO
audit_usernames: false
git_annex_enabled: false

推荐答案

TADA !我发现我的配置不好的地方.一切都源于我选择了 8080 以外的其他端口.在这种情况下,不仅要修改 gitlab-shell 配置(即只有客户端),还要修改服务器部分 gitlab/config/unicorn.rb:

TADA ! I found where my configuration was bad. All comes from the fact I have chosen an other port than 8080. In such a case, it is important not only to modify gitlab-shell configuration (that is only the client) but the server part gitlab/config/unicorn.rb:

# Listen on both a Unix domain socket and a TCP port.
# If you are load-balancing multiple Unicorn masters, lower the backlog
# setting to e.g. 64 for faster failover.
listen "/run/gitlab/gitlab.socket", :backlog => 1024
listen "127.0.0.1:8033", :tcp_nopush => true

这篇关于archlinux 上的 Gitlab 不起作用 ->API 无法访问的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆