gitlab-ctl tail 查看日志报错类似:
> /var/log/gitlab/gitlab-workhorse/current <
2016-02-05_19:46:58.38158 2016/02/05 11:46:58 error: proxyRoundTripper: POST "/users/auth/ldapmain/callback" failed with: "net/http: timeout awaiting response headers"
2016-02-05_19:46:58.38161 2016/02/05 11:46:58 ErrorPage: serving predefined error page: 502
2016-02-05_19:46:58.38161 [git.domain.com] @ - - [2016-02-05 11:45:58.380938625 -0800 PST] "POST /users/auth/ldapmain/callback HTTP/1.1" 502 429 "http://[git.domain.com]/users/sign_in" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.97 Safari/537.36" 60.000590
> /var/log/gitlab/nginx/gitlab_access.log <
[clientip] - - [05/Feb/2016:11:46:58 -0800
由于ldap地址调整,修改/etc/gitlab/gitlab.rb 配置文件重启后登录出现如下图:
出错原因其实很简单,就是修改配置后未重新加载配置文件导致登录时去请求旧的地址导致超时报502:
正确方法:修改配置文件后先执行 gitlab-ctl reconfigure ,然后 gitlab-ctl restart ,最后gitlab-ctl status 查看状态