Gitlab CE Omnibus 启动时出现 503 错误

Gitlab CE Omnibus 启动时出现 503 错误

几个月前,我使用 Omnibus 安装程序在 CentOS 7 上安装了 GitLab。它运行良好,但今天当我访问主页登录时,它开始抛出 503 错误页面。

我运行了 gitlab-ctl status 命令,但没有看到任何显示有问题的信息。有人知道接下来该怎么办吗?

# gitlab-ctl status
run: alertmanager: (pid 4591) 14837s; run: log: (pid 4590) 14837s
run: gitaly: (pid 4580) 14837s; run: log: (pid 4579) 14837s
run: gitlab-monitor: (pid 4574) 14837s; run: log: (pid 4572) 14837s
run: gitlab-workhorse: (pid 4583) 14837s; run: log: (pid 4581) 14837s
run: logrotate: (pid 15028) 436s; run: log: (pid 4567) 14837s
run: nginx: (pid 4573) 14837s; run: log: (pid 4571) 14837s
run: node-exporter: (pid 4584) 14837s; run: log: (pid 4582) 14837s
run: postgres-exporter: (pid 4568) 14837s; run: log: (pid 4566) 14837s
run: postgresql: (pid 4593) 14837s; run: log: (pid 4592) 14837s
run: prometheus: (pid 4586) 14837s; run: log: (pid 4585) 14837s
run: redis: (pid 4562) 14837s; run: log: (pid 4560) 14837s
run: redis-exporter: (pid 4576) 14837s; run: log: (pid 4575) 14837s
run: sidekiq: (pid 4559) 14837s; run: log: (pid 4558) 14837s
run: unicorn: (pid 23104) 1s; run: log: (pid 4577) 14837s

我继续gitlab-ctl tail按照评论中的建议操作,发现引用了过时的 unicorn pid 文件。只需重新启动所有服务,gitlab-ctl restart503 错误就会消失,之后一切正常。但仍不确定 unicorn 为何会崩溃。

答案1

我可以修复该问题并使其恢复正常运行,但我不确定其根本原因。

我第一次使用gitlab-ctl tail时发现有一条日志消息表明有一个过时的 unicorn PID 文件。这基本上告诉我 unicorn 应用程序服务器由于某种原因崩溃了。

我重新启动了所有 gitlab 服务,gitlab-ctl restart花了几分钟才正确关闭并重新启动所有服务,最终我能够再次在正常条件下使用 GitLab。

相关内容