Omnibus Gitlab 502错误
访问Gitlab显示502错误,/var/log/gitlab/nginx/gitlab_error.log显示以下错误:
2016/08/08 12:05:35 [error] 23746#0: *1 connect() to unix:/var/opt/gitlab/gitlab-workhorse/socket failed (111: Connection refused) while connecting to upstream, client: 27.115.76.206, server: gityu.com, request: "GET /favicon.ico HTTP/1.1", upstream: "http://unix:/var/opt/gitlab/gitlab-workhorse/socket:/favicon.ico", host: "gityu.com", referrer: "https://gityu.com/"
2016/08/08 12:05:43 [error] 23746#0: *1 connect() to unix:/var/opt/gitlab/gitlab-workhorse/socket failed (111: Connection refused) while connecting to upstream, client: 27.115.76.206, server: gityu.com, request: "GET / HTTP/1.1", upstream: "http://unix:/var/opt/gitlab/gitlab-workhorse/socket:/", host: "gityu.com"
2016/08/08 12:05:43 [error] 23746#0: *1 connect() to unix:/var/opt/gitlab/gitlab-workhorse/socket failed (111: Connection refused) while connecting to upstream, client: 27.115.76.206, server: gityu.com, request: "GET /favicon.ico HTTP/1.1", upstream: "http://unix:/var/opt/gitlab/gitlab-workhorse/socket:/favicon.ico", host: "gityu.com", referrer: "https://gityu.com/"
问题原因参照:
https://gitlab.com/gitlab-org/gitlab-workhorse/issues/33
检查以下gitlab-workhorse命令是否存在:
/opt/gitlab/embedded/bin/gitlab-workhorse -listenNetwork unix -listenUmask 0 -listenAddr /var/opt/gitlab/gitlab-workhorse/socket -authBackend http://localhost:8080 -authSocket /var/opt/gitlab/gitlab-rails/sockets/gitlab.socket -documentRoot /opt/gitlab/embedded/service/gitlab-rails/public -pprofListenAddr
假如此命令不存在,重启gitlab:
gitlab-ctl restart