Skip to content

Permission denied on sockets after update to "13.5.1-ce.0"

Hello,

Using gitlab-ce on Ubuntu xenial. I performed the update to 13.5.1-ce.0 this morning and since then I get an error 502 when visiting the public URL.

Logs:

gitlab-workhorse:

{"error":"keywatcher: dial unix /var/opt/gitlab/redis/redis.socket: connect: no such file or directory","level":"error","msg":"unknown error","time":"2020-10-23T20:25:47+02:00"}

nginx:

2020/10/23 20:32:13 [crit] 30565#30565: *105 connect() to unix:/var/opt/gitlab/gitlab-workhorse/socket failed (2: No such file or directory) while connecting to upstream, client: 192.168.15.01, server: git.example.com, request: "POST /api/v4/jobs/request HTTP/1.0", upstream: "http://unix:/var/opt/gitlab/gitlab-workhorse/socket:/api/v4/jobs/request", host: "git.example.com"

I havent touched any permissions, groups nor users.

The redis socket file exists:

srwxrwxrwx 1 gitlab-redis gitlab-redis 0 oct. 23 20:35 /var/opt/gitlab/redis/redis.socket=

but user gitlab-www cannot access it:

sudo -u gitlab-www ls /var/opt/gitlab/redis/redis.socket

ls: cannot access '/var/opt/gitlab/redis/redis.socket': Permission denied

The workhorse socket file exists but is in /var/opt/gitlab/gitlab-workhorse/sockets/socket, not is /var/opt/gitlab/gitlab-workhorse/socket ; maybe the issue here?

ps -eaf shows gitlab-www seems to own the process:

gitlab-+  6972  6624  0 20:35 ?        00:00:01 /opt/gitlab/embedded/bin/redis-server 127.0.0.1:0

gitlab-+  6977  6731  0 20:35 ?        00:00:00 /opt/gitlab/embedded/bin/redis_exporter --web.listen-address=localhost:9121 --redis.addr=unix:///var/opt/gitlab/redis/redis.socket

my config:

 nginx['enable'] = false
 
 web_server['external_users'] = ['www-data']
 
 external_url 'https://git.example.com'
 
 nginx['listen_https'] = false
 
 nginx['listen_addresses'] = ["0.0.0.0", "[::]"]
 
 nginx['listen_port'] = 81
 
 gitlab_rails['backup_keep_time'] = 604800

user nginx is www-data

I tried to change the external_users in the gitlab config file, with gitlab-www and git, to no avail.

I also ran these commands for permissions:

sudo usermod -aG git www-data

sudo usermod -aG gitlab-www www-data

Then gitlab-ctl reconfigure, but I get the same result.

Edited by MattMuffin