gitlab docker 重启无法启动

gitlab docker 重启无法启动

      • 前提
      • 报错如下:
      • 解决方案

前提

由于采用了gitlab的官方docker镜像进行二次开发,我们遇到了很多不可预知的问题,经过修改我们使用了自己的启动脚本,但是发现只要重启容器就会报错,经过查看gitlab镜像的启动脚本(启动脚本为/assets/wrapper
),最终解决方案如下。

报错如下:

admin@MyHost:~$ sudo gitlab-ctl start
fail: alertmanager: runsv not running
fail: gitaly: runsv not running
fail: gitlab-monitor: runsv not running
fail: gitlab-workhorse: runsv not running
fail: logrotate: runsv not running
fail: nginx: runsv not running
fail: node-exporter: runsv not running
fail: postgres-exporter: runsv not running
fail: postgresql: runsv not running
fail: prometheus: runsv not running
fail: redis: runsv not running
fail: redis-exporter: runsv not running
fail: registry: runsv not running
fail: sidekiq: runsv not running
fail: unicorn: runsv not running

搜索到的解决方案为:

Solution
sudo systemctl start gitlab-runsvdir
then
sudo gitlab-ctl restart

但是依然报错


Failed to connect to bus: No such file or directory

解决方案

# 在启动脚本中添加
GITLAB_OMNIBUS_CONFIG= /opt/gitlab/embedded/bin/runsvdir-start &
# 执行这个命令将会报错,不用管他,不影响,报错如下:
# 2019/11/13 下午4:43:15/opt/gitlab/embedded/bin/runsvdir-start: line 24: ulimit: pending signals: cannot modify limit: Operation not permitted
# 2019/11/13 下午4:43:15/opt/gitlab/embedded/bin/runsvdir-start: line 37: /proc/sys/fs/file-max: Read-only file system

最后启动服务即可
gitlab-ctl restart

你可能感兴趣的:(gitlab,devops,gitlab)