Home > Back-end >  Where did the socket for GitLab-workhorse go?
Where did the socket for GitLab-workhorse go?

Time:10-31

The /var/opt/gitlab/gitlab-workhorse/ folder is missing a socket and is generally almost empty.

I'm trying to set up GitLab nginx proxy. When I try to load the page, I get a 502 error. Having figured out what exactly does not work for me, I realized (gitlab-ctl status):

down: gitlab-workhorse: 0s, normally up, want up; run: log: (pid 3756258) 12450s

Then I decided to look at my workhorse socket and this is what I saw in the /var/opt/gitlab/gitlab-workhorse folder (ls -ap /var/opt/gitlab/gitlab-workhorse/):

./ ../ config.toml VERSION

My gitlab settings:

nginx['enable'] = false
web_server['external_users'] = ['www-data']
gitlab_rails['trusted_proxies'] = ['127.0.0.1', <external-server-ip>]
gitlab_workhorse['listen_network'] = "unix"
gitlab_workhorse['listen_addr'] = "/var/opt/gitlab/gitlab-workhorse/sockets/socket"

nginx log:

connect() to unix:/var/opt/gitlab/gitlab-workhorse/sockets/socket failed (13: Permission denied) while connecting to upstream

As I understand it, I am missing the required software or some files. Where can I get them if that's the problem. If not, why might my workhorse not work?

p.s. sorry for google translate :)

upd. (/var/log/gitlab/gitlab-workhorse/current):

{"build_time":"20221024.191252","level":"info","msg":"Starting","time":"2022-10-30T20:05:21 03:00","version":"v15.5.1"}
{"address":"localhost:9229","level":"info","msg":"Running metrics server","network":"tcp","time":"2022-10-30T20:05:21 03:00"}
{"level":"info","msg":"keywatcher: starting process loop","time":"2022-10-30T20:05:21 03:00"}
{"address":"/var/opt/gitlab/redis/redis.socket","level":"info","msg":"redis: dialing","network":"unix","time":"2022-10-30T20:05:21 03:00"}
{"address":"/var/opt/gitlab/gitlab-workhorse/sockets/socket","level":"info","msg":"Running upstream server","network":"unix","time":"2022-10-30T20:05:21 03:00"}
{"error":"listen unix /var/opt/gitlab/gitlab-workhorse/sockets/socket: bind: no such file or directory","level":"fatal","msg":"shutting down","time":"2022-10-30T20:05:21 03:00"

CodePudding user response:

Change path to socket in listen_addr setting to existing directory.

For example gitlab_workhorse['listen_addr'] = "/var/opt/gitlab/gitlab-workhorse/socket" or gitlab_workhorse['listen_addr'] = "/tmp/gitlab-workhorse-socket"

  • Related