3

while I am trying to reconfigure my gitlab instance, I am getting this error. sudo gitlab-ctl reconfigure works fine but when i try to launch gitlab I see 502 Error and when i tail the logs I see this -

==> /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}

I have checked and the socket file does exist at the location /var/opt/gitlab/gitlab-rails/sockets/gitlab.socket. I don't know what's wrong but it was working before and suddenly stopped working. Is it something related to permission issue?

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 Version - Version: 13.3.6-ee

Any guidance is appreciated because I am totally stuck here.

2 Answers 2

1

I fixed it. Basically when i changed the permissions I did it recursively using -R option so 2 files puma.id and puma.state owned by root but ideally they should be managed by user git by which we run the Gitlab and that's why these files were not accessible. I changed the permissions and reconfigure it and it worked. Just posting it so if anyone else faces the problem they should know what to look for

Sign up to request clarification or add additional context in comments.

1 Comment

Would be nice if you provide full path for files. I can not imagine where to locate those files. Also, you can accept your answer ;-)
0

The files are located within the Gitlab container under /opt/gitlab/var/puma. The commands reach and change them are:

docker exec -ti gitlab bash # replace gitlab with your container name
cd /opt/gitlab/var/puma
chown git:git puma.pid puma.state
exit

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.