Gitlab update - error "permission denied"

Hi all,

I have a gitlab instance running in docker. 15 days ago, I updated my container with the image gitlab-ce:latest. Since this day, I always have a 500 error when I run gitlab.

Problem to solve

When I run gitlab, I encounter a 500 error. The logs mainly show 2 errors:
Git environment: checking bundled Git binary “gitaly-git-v2.47”: permission denied
error=open /var/opt/gitlab/gitaly/gitaly.pid: no such file or directory

When I run gitlab-rake gitlab:gitaly:check, I have this error:
Gitaly: … default … FAIL: 14:connections to all backends failing; last error: UNKNOWN: unix:/var/opt/gitlab/gitaly/gitaly.socket: No such file or directory. debug_error_string:{UNKNOWN:Error received from peer {grpc_message:“connections to all backends failing; last error: UNKNOWN: unix:/var/opt/gitlab/gitaly/gitaly.socket: No such file or directory”, grpc_status:14, created_time:“2024-12-03T13:48:34.085759974+00:00”}}

Configuration

I run gitlab-ce:latest in a docker container.

Versions

Please add an x whether options apply, and add the version information.

  • Self-managed
  • GitLab.com SaaS
  • Dedicated

Could you help me, please?
I font know exactly which log file you’ll need to help me.

Thanks
Matthieu

Sounds like update-permissions doesn't fix gitaly pid (#6926) · Issues · GitLab.org / omnibus-gitlab · GitLab which discusses commands to fix.

Thanks for pour fast answer. Unfortunatelly, my problem is slightly différent, and the solutions in the post don’t work on my side.

I have another weird error :
error=open /var/opt/gitlab/gitaly/gitaly.pid: no such file or directory

I tried to force the permissions with “update-permissions” then chown -R git:git /var/opt/gitlab/gitaly/

But it doesn’t work…

Matthieu

The issue also mentioned to delete a stale unix socket file. Does deleting the file and restart the container work?

I hope my english is good enough, but the socket file doesn’t exist either…

root@gitlab:/# ls -l /var/opt/gitlab/gitaly/gitaly.socket
ls: cannot access ‘/var/opt/gitlab/gitaly/gitaly.socket’: No such file or directory

Matthieu

Hi

I’ve decided to come back to version 16.11.10
After a while, gitlab.pid and gitlab.socket are back.
But I still have 500 errors when I try to connect.

I have this error, now:
==> /var/log/gitlab/gitlab-workhorse/current <==

2024-12-06T20:11:21Z ERR correlation_id=01JEESJAW2T66E4ZP2M3TPNMS8 duration_ms=0 error=badgateway: failed to receive response: dial unix /var/opt/gitlab/gitlab-rails/sockets/gitlab.socket: connect: connection refused method=GET msg= uri=/

Could you help me, please?

Matthieu

Hi

I finaly decided to completely reinstall Gitlab. I had a working backup, it seems it was the only solution…
I close the issue.

Matthieu