浏览次数:458次为procHooks进程设置cgroup配置导致:无法加载程序:不允许操作:未知(Docker))

dced5bon  于 2023-02-03  发布在  Docker
关注(0)|答案(1)|浏览(258)

我尝试部署一个docker容器来执行一些gitlab runner测试,但是当我执行docker-composite 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.

下面是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'.

我真的被这个卡住了,所以任何形式的帮助都是受欢迎的:)谢谢!

pxy2qtax

pxy2qtax1#

我参考了许多其他的链接,最后发现做一个(在CentOS上)更新就可以了。
yum更新-y
重新启动
重新启动后,系统恢复联机,我继续运行我的Docker容器,在本例中是Docker注册表:
[root@server~] #docker run-d--名称注册表注册表:2 c40941bf42c853709bcca05bad4e8914df1f4932a355607f37b55f7e0ed01e60 [root@server~] #docker ps-a容器ID映像命令创建的状态端口
名称c40941bf42c8注册表:2 "/www.example.com/e... "3秒前最多2秒5000/tcp注册表entrypoint.sh /e..." 3 seconds ago Up 2 seconds 5000/tcp registry
^^^抱歉,我还不熟悉StackOverflow的编辑器,但这是Docker容器启动良好的地方。
所以,这里也是我 checkout 的参考页面,我没有改变任何在/boot/boot.txt作为这一个参考,但很好的信息:
https://my-take-on.tech/2021/05/07/fix-docker-cgroup-errors-after-systemd-248-update/
而这一个,在我读了它之后,它让我终于尝试做一个"百胜更新"来修复:
docker-compose throws errors by starting mariadb for an private nextcloud installation

相关问题