Gitblab docker迁移数据出现权限问题解决

运行脚本之后通过 docker ps 查看当前正在运行的容里面并没有看到 gitlab这个容器,通过 ps -a显示所有容器时发现它的状态一直是 starting 或者 restarting。 这个时候我们可以使用 docker logs 来查看当前容器的运行日志。



Preparing services... Starting services... /opt/gitlab/embedded/bin/runsvdir-start: line 24: ulimit: pending signals: cannot modify limit: Operation not permitted /opt/gitlab/embedded/bin/runsvdir-start: line 37: /proc/sys/fs/file-max: Read-only file system Configuring GitLab package... Configuring GitLab... =============================================================================Error executing action `run` on resource 'ruby_block[directory resource: /var/opt/gitlab/git-data/repositories]'

=============================================================================

通过 docker logs 可以方便大家来论断错误,一切正常还好,如果一旦出现问题,新手是很懵圈的。这个时候可能通过google 查找错误日志,多数情况下都能找到正确答案,我遇到的是个权限不足的问题, 在这个链接里面有完整的讨论,解决办法就是执行下面这句命令之后就可以正常启行了。

sudo chmod 2770 /srv/gitlab/data/git-data/repositories

另外的权限问题可以通过docker打印出来的方法来解决

For a comprehensive list of configuration options please see the Omnibus GitLab readme
https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md

If this container fails to start due to permission problems try to fix it by executing:

  docker exec -it gitlab update-permissions
  docker restart gitlab

发布了279 篇原创文章 · 获赞 103 · 访问量 131万+
展开阅读全文

docker gitlab无法启动

10-10

log信息: ``` {"log":"Thank you for using GitLab Docker Image!\n","stream":"stdout","time":"2019-10-10T09:16:52.21426952Z"} {"log":"Current version: gitlab-ce=11.0.1-ce.0\n","stream":"stdout","time":"2019-10-10T09:16:52.214301816Z"} {"log":"\n","stream":"stdout","time":"2019-10-10T09:16:52.214314713Z"} {"log":"Configure GitLab for your system by editing /etc/gitlab/gitlab.rb file\n","stream":"stdout","time":"2019-10-10T09:16:52.214319953Z"} {"log":"And restart this container to reload settings.\n","stream":"stdout","time":"2019-10-10T09:16:52.214324292Z"} {"log":"To do it use docker exec:\n","stream":"stdout","time":"2019-10-10T09:16:52.214343587Z"} {"log":"\n","stream":"stdout","time":"2019-10-10T09:16:52.214354366Z"} {"log":" docker exec -it gitlab vim /etc/gitlab/gitlab.rb\n","stream":"stdout","time":"2019-10-10T09:16:52.214377118Z"} {"log":" docker restart gitlab\n","stream":"stdout","time":"2019-10-10T09:16:52.214383022Z"} {"log":"\n","stream":"stdout","time":"2019-10-10T09:16:52.214386485Z"} {"log":"For a comprehensive list of configuration options please see the Omnibus GitLab readme\n","stream":"stdout","time":"2019-10-10T09:16:52.21441455Z"} {"log":"https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md\n","stream":"stdout","time":"2019-10-10T09:16:52.214418999Z"} {"log":"\n","stream":"stdout","time":"2019-10-10T09:16:52.214422401Z"} {"log":"If this container fails to start due to permission problems try to fix it by executing:\n","stream":"stdout","time":"2019-10-10T09:16:52.21445327Z"} {"log":"\n","stream":"stdout","time":"2019-10-10T09:16:52.214457817Z"} {"log":" docker exec -it gitlab update-permissions\n","stream":"stdout","time":"2019-10-10T09:16:52.214461178Z"} {"log":" docker restart gitlab\n","stream":"stdout","time":"2019-10-10T09:16:52.214470588Z"} {"log":"\n","stream":"stdout","time":"2019-10-10T09:16:52.214474058Z"} {"log":"Preparing services...\n","stream":"stdout","time":"2019-10-10T09:16:55.216795708Z"} {"log":"Starting services...\n","stream":"stdout","time":"2019-10-10T09:16:55.231112363Z"} {"log":"Configuring GitLab package...\n","stream":"stdout","time":"2019-10-10T09:16:55.231559666Z"} {"log":"/opt/gitlab/embedded/bin/runsvdir-start: line 37: /proc/sys/fs/file-max: Read-only file system\n","stream":"stderr","time":"2019-10-10T09:16:55.237269641Z"} {"log":"Malformed configuration JSON file found at /opt/gitlab/embedded/nodes/fe8ab341c48f.json.\n","stream":"stdout","time":"2019-10-10T09:16:55.751260111Z"} {"log":"This usually happens when your last run of `gitlab-ctl reconfigure` didn't complete successfully.\n","stream":"stdout","time":"2019-10-10T09:16:55.751280615Z"} {"log":"This file is used to check if any of the unsupported configurations are enabled,\n","stream":"stdout","time":"2019-10-10T09:16:55.751283608Z"} {"log":"and hence require a working reconfigure before upgrading.\n","stream":"stdout","time":"2019-10-10T09:16:55.751285925Z"} {"log":"Please run `sudo gitlab-ctl reconfigure` to fix it and try again.\n","stream":"stdout","time":"2019-10-10T09:16:55.75128816Z"} ``` 问答

没有更多推荐了,返回首页

©️2019 CSDN 皮肤主题: 游动-白 设计师: 上身试试

分享到微信朋友圈

×

扫一扫,手机浏览