【问题标题】:process_linux.go:458: setting cgroup config for procHooks process caused: can't load program: operation not permitted: unknown (Docker))process_linux.go:458:为 procHooks 进程设置 cgroup 配置导致:无法加载程序:不允许操作:未知(Docker))
【发布时间】:2023-02-01 08:36:43
【问题描述】:

我正在尝试部署一个 docker 容器以使用 gitlab runners 执行一些测试,但是当我执行 docker-compose up 命令时,我得到以下输出:

admin@runners-test:~/runner-test$ sudo docker-compose up -d
Starting gitlab-runner ... error

ERROR: for gitlab-runner  Cannot start service gitlab-runner: OCI runtime create failed: container_linux.go:367: starting container process caused: process_linux.go:495: container init caused: process_linux.go:458: setting cgroup config for procHooks process caused: can't load program: operation not permitted: unknown

ERROR: for gitlab-runner  Cannot start service gitlab-runner: OCI runtime create failed: container_linux.go:367: starting container process caused: process_linux.go:495: container init caused: process_linux.go:458: setting cgroup config for procHooks process caused: can't load program: operation not permitted: unknown
ERROR: Encountered errors while bringing up the project.

Abd 这是 journalctl 的输出:

Sep 23 07:23:24 runners-test dockerd[231]: time="2022-09-23T07:23:24.560275437Z" level=error msg="stream copy error: reading from a closed fifo"
Sep 23 07:23:24 runners-test dockerd[231]: time="2022-09-23T07:23:24.577270402Z" level=error msg="stream copy error: reading from a closed fifo"
Sep 23 07:23:24 runners-test dockerd[231]: time="2022-09-23T07:23:24.675282811Z" level=error msg="0cd3bbb779a947012c9059921f092b569eb088bb2fe0bf99a8ae3266ec43abbd cleanup: failed to delete container from containerd: no such container"
Sep 23 07:23:24 runners-test dockerd[231]: time="2022-09-23T07:23:24.675625496Z" level=error msg="Handler for POST /v1.25/containers/0cd3bbb779a947012c9059921f092b569eb088bb2fe0bf99a8ae3266ec43abbd/start returned error: OCI runtime create failed: container_linux.go:367: starting container process caused: process_linux.go:495: container init caused: process_linux.go:458: setting cgroup config for procHooks process caused: can't load program: operation not permitted: unknown"

以及 docker-compose 文件:

version: '3'
services:
  gitlab-runner:
    container_name: gitlab-runner
    image: 'gitlab/gitlab-runner:latest'
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - ./config:/etc/gitlab-runner
    restart:
 unless-stopped

我尝试提起的任何容器都会出现此错误,即使是简单的docker run hello-world...

我也在 proxmox 论坛上查看了这个 post,但我不知道如何为 lxc 容器添加内核命令行参数,我一直在尝试编辑 /etc/default/grub 文件,但 update-grub 命令没有在 lxc 中按照我的意愿工作,我得到以下输出:

admin@runners-test:/$ sudo update-grub
[sudo] password for admin: 
/usr/sbin/grub-probe: error: failed to get canonical path of `/dev/mapper/pve-vm--1010118--disk--0'.

我真的坚持这一点,所以欢迎任何形式的帮助 :) 谢谢!

【问题讨论】:

    标签: docker docker-compose debian kernel proxmox


    【解决方案1】:

    当我最终发现(在 CentOS 上)更新可以解决问题时,我参考了许多其他链接。所以:

    百胜更新-y

    重启

    重启后,系统重新上线,我继续运行我的 docker 容器,在本例中是一个 docker registry:

    [root@server ~]# docker run -d --name registry registry:2 c40941bf42c853709bcca05bad4e8914df1f4932a355607f37b55f7e0ed01e60 [root@server ~]# docker ps -a 容器 ID 图像命令创建的状态端口
    名称 c40941bf42c8 registry:2 "/entrypoint.sh /e..." 3 秒前 Up 2 秒 5000/tcp registry

    ^^^ 对不起,不熟悉 StackOverflow 的编辑器(还),但 docker 容器启动正常。

    所以,这也是我检查过的参考页面,我没有像这个参考那样更改 /boot/boot.txt 中的任何内容,但这是一个很好的信息:

    https://my-take-on.tech/2021/05/07/fix-docker-cgroup-errors-after-systemd-248-update/

    而这一篇,在我读完之后,终于让我尝试做一个“yum update”来修复:

    docker-compose throws errors by starting mariadb for an private nextcloud installation

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-09-21
      • 2020-12-22
      • 2021-07-20
      • 1970-01-01
      • 2017-04-15
      • 1970-01-01
      • 2023-03-10
      • 2016-07-19
      相关资源
      最近更新 更多