当我尝试重新配置gitlab实例时,出现此错误。 sudo gitlab-ctl重新配置工作正常,但是当我尝试启动gitlab时,我看到502错误,而当我拖尾日志时,我看到了这个-
==> /var/log/gitlab/gitlab-workhorse/current <==
{"correlation_id":"xWNXeQFn6Ua","duration_ms":0,"error":"badgateway: failed to receive response: dial unix /var/opt/gitlab/gitlab-rails/sockets/gitlab.socket: connect: connection refused","level":"error","method":"GET","msg":"error","time":"2020-10-28T23:22:16Z","uri":"/favicon.ico"}
{"correlation_id":"xWNXeQFn6Ua","duration_ms":1,"host":"gitlab.systems","level":"info","method":"GET","msg":"access","proto":"HTTP/1.1","referrer":"https://gitlab.systems/users/sign_in","remote_addr":"127.0.0.1:0","remote_ip":"127.0.0.1","status":502,"system":"http","time":"2020-10-28T23:22:16Z","uri":"/favicon.ico","user_agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36","written_bytes":2940}
我已经检查过,并且套接字文件确实存在于/var/opt/gitlab/gitlab-rails/sockets/gitlab.socket位置。我不知道这是怎么回事,但它之前一直在工作,突然停止工作。与权限问题有关吗?
root@gitlab-serv # pwd
/var/opt/gitlab/gitlab-rails/sockets
root@gitlab-serv # ls -lrt
total 0
srwxrwxrwx. 1 git git 0 Oct 28 23:25 gitlab.socket
root@gitlab-serv #
Gitlab版本- 版本:13.3.6-ee
任何指导都值得赞赏,因为我完全被困在这里。
答案 0 :(得分:0)
我修复了它。基本上,当我更改权限时,我使用-R选项以递归方式进行操作,因此root拥有2个文件puma.id
和puma.state
,但理想情况下,它们应由运行Gitlab的用户git
管理这就是为什么这些文件不可访问的原因。
我更改了权限并重新配置它,然后它起作用了。只是发布它,这样如果其他人遇到问题,他们应该知道要寻找的东西