gitlab启动失败,如何解决

gitlab重启失败,即使重新初始化也不能将组件重新运行怎么办?

情况如下:

复制代码
[root@lvs2 ~]# gitlab-ctl restart
fail: gitaly: runsv not running
fail: gitlab-kas: runsv not running
fail: gitlab-workhorse: runsv not running
fail: logrotate: runsv not running
fail: nginx: runsv not running
fail: postgresql: runsv not running
fail: puma: runsv not running
fail: redis: runsv not running
fail: sidekiq: runsv not running
[root@lvs2 ~]# gitlab-ctl status
fail: gitaly: runsv not running
fail: gitlab-kas: runsv not running
fail: gitlab-workhorse: runsv not running
fail: logrotate: runsv not running
fail: nginx: runsv not running
fail: postgresql: runsv not running
fail: puma: runsv not running
fail: redis: runsv not running
fail: sidekiq: runsv not running

所有 GitLab 服务都显示 runsv not running 的问题,99% 是因为底层的 gitlab-runsvdir 服务没有启动。

直接按下面 2 步即可恢复,无需重装:

步骤 1:手动启动 GitLab 的 runsvdir 服务

复制代码
sudo systemctl start gitlab-runsvdir.service

步骤 2:重启 GitLab 所有组件

复制代码
sudo gitlab-ctl restart

验证

复制代码
sudo gitlab-ctl status

正常情况下应该看到所有服务状态为 run

如果 systemctl start gitlab-runsvdir.service 卡住不动

极个别机器可能因为 plymouth-quit-wait.service 阻塞,先停掉它再继续:

复制代码
sudo systemctl stop plymouth-quit-wait.service
sudo systemctl start gitlab-runsvdir.service
sudo gitlab-ctl restart

网页访问即可,可能反应没那么快刷新即可

相关推荐
西部森林牧歌13 小时前
Arbess零基础学习 - 使用Arbess+GitLab实现PHP项目构建/主机部署
ci/cd·gitlab·php·tiklab devops
爱宇阳3 天前
GitLab CI/CD 集成 Harbor 全面教程
ci/cd·gitlab·harbor
雪碧聊技术3 天前
gitLab如何新建分支(根据某个分支)
gitlab·new branch·新建分支
字节逆旅3 天前
如何解决代码冲突
gitlab
林晓lx4 天前
使用Git钩子+ husky + lint语法检查提高前端项目代码质量
前端·git·gitlab·源代码管理
爱宇阳4 天前
从容器化到自动化:Vue3 项目 Docker 部署与 GitLab CI/CD 集成 Harbor 全流程
docker·自动化·gitlab
爱宇阳4 天前
Spring Boot 项目 GitLab CI/CD 自动构建并推送到 Harbor 教程
spring boot·ci/cd·gitlab
爱宇阳4 天前
Vue3 项目 GitLab CI/CD 自动构建并推送到 Harbor 教程
ci/cd·gitlab
西部森林牧歌5 天前
Arbess零基础学习 - 使用Arbess+GitLab实现Node.js项目自动化构建/主机部署
ci/cd·node.js·gitlab·arbess·tiklab devops
极小狐6 天前
极狐GitLab 18.5 正式发布,更新 Maven 虚拟仓库 UI(Beta)、全新个人主页、实例级合规与安全策略管理 以及 DAST 认证脚本 等
java·gitlab·maven