Error 502 : failed to start a new unicorn master

I got a 502 error with my GitLab

➜ ~ gitlab-ctl status run: alertmanager: (pid 20113) 354s; run: log: (pid 32318) 2652s run: gitaly: (pid 20123) 353s; run: log: (pid 31262) 2977s run: gitlab-monitor: (pid 20141) 353s; run: log: (pid 32196) 2668s run: gitlab-workhorse: (pid 20144) 352s; run: log: (pid 32082) 2689s run: grafana: (pid 20152) 352s; run: log: (pid 32753) 2608s run: logrotate: (pid 20164) 352s; run: log: (pid 32109) 2682s run: nginx: (pid 20171) 351s; run: log: (pid 32091) 2688s run: node-exporter: (pid 20188) 351s; run: log: (pid 32143) 2674s run: postgres-exporter: (pid 20193) 350s; run: log: (pid 32398) 2646s run: postgresql: (pid 20202) 350s; run: log: (pid 31879) 2746s run: prometheus: (pid 20205) 349s; run: log: (pid 32288) 2656s run: redis: (pid 20221) 349s; run: log: (pid 31252) 2978s run: redis-exporter: (pid 20227) 349s; run: log: (pid 32254) 2662s run: sidekiq: (pid 21485) 6s; run: log: (pid 32049) 2693s run: unicorn: (pid 21460) 10s; run: log: (pid 32024) 2700s

gitlab-ctl tail
`==> /var/log/gitlab/unicorn/current <==
2019-09-10_14:44:36.36808 master failed to start, check stderr log for details

==> /var/log/gitlab/unicorn/unicorn_stdout.log <==
bundler: failed to load command: unicorn (/opt/gitlab/embedded/bin/unicorn)

==> /var/log/gitlab/unicorn/current <==
2019-09-10_14:44:37.37910 failed to start a new unicorn master
2019-09-10_14:44:37.39601 starting new unicorn master`

Can you help me ? Please

This GH issue solved the problem for me Yesterday I realized that the issue persists even with GitLab CE 12.6.1 using Docker images!

The command that solved it:

docker exec -it gitlab rm /opt/gitlab/var/unicorn/ && docker restart gitlab

I’ve put that in my host cron file and it works!

Maybe it will work if you use standard GitLab installation without docker

1 Like