Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

求救:runsv not running错误 #65

Closed
allipr opened this issue Dec 26, 2023 · 4 comments
Closed

求救:runsv not running错误 #65

allipr opened this issue Dec 26, 2023 · 4 comments

Comments

@allipr
Copy link

allipr commented Dec 26, 2023

mac电脑m2芯片arm64架构,准备在docker上部署gitlab-ce,遇到一个问题:

  • execute【/opt/gitlab/bin/gitlab-ctl start postgresql】 action run
    【execute】 fail: redis: runsv not running
    【execute】 fail: redis: runsv not running
    该问题是我使用docker compose绑定数据卷时出现的错误(gitlab启动不起来),不绑定数据卷不会出现该错误。
    绑定数据卷的docker compose如下:
    绑定数据卷的docker compose如下:
# 版本
version: "2.1"
# 服务
services:
  # 服务名
  gitlab-ce-ser:
    # 镜像 macOS arm64芯片
    image: "yrzr/gitlab-ce-arm64v8:latest"
    # image: "gitlab/gitlab-ce:latest"
    # 容器名
    container_name: "gitlab-ce"
    # 重启策略 失败一直重启
    restart: always
    hostname: "127.0.0.1"
    environment:
      GITLAB_OMNIBUS_CONFIG: |
        # external_url 'https://gitlab.example.com'
        # Add any other gitlab.rb configuration here, each on its own line
    ports:
      - "9090:80"
      - "9043:443"
      - "9022:22"
    volumes:
      - type: bind
        source: ${GITLAB_HOME}/config
        target: /etc/gitlab
      - type: bind
        source: ${GITLAB_HOME}/logs
        target: /var/log/gitlab
      - type: bind
        source: ${GITLAB_HOME}/data
        target: /var/opt/gitlab
    shm_size: "256m"

不绑定数据卷的docker compose 注销掉数据卷相关行即可。

绑定数据卷时,数据卷绑定是正常的,就是一旦绑定数据卷就会报上面的错误,请老师指教。十分感谢!

@zengxs
Copy link
Owner

zengxs commented Dec 27, 2023

macOS 上的 Docker 环境挂 volume 确实很容易出问题。

macOS 上 Docker 其实是跑在一个 Linux 虚拟机里,虚拟机和 macOS 通过共享文件夹实现了文件共享,然后容器再去 mount 到虚拟机中的路径。

你可以检查一下你的 Docker 的共享文件夹路径是不是和 macOS 上的一致,然后这个路径 Docker 是否有权限读取,以及 GITLAB_HOME 变量是不是正确配置了。建议最好可以直接 login 到 Docker 的虚拟机环境中检查一下。

@allipr
Copy link
Author

allipr commented Dec 27, 2023

GITLAB_HOME挂载完全没有问题

@zengxs
Copy link
Owner

zengxs commented Dec 28, 2023

@allipr 或者你看一下这个 issue 里面的解决方案对你有没有帮助: #59

@zengxs
Copy link
Owner

zengxs commented Mar 4, 2024

This issue was closed because it has been open for several months with no activity.

@zengxs zengxs closed this as not planned Won't fix, can't repro, duplicate, stale Mar 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants