当前位置:   article > 正文

Docker启动rabbitmq失败Failed to create thread: Operation not permitted (1)

failed to create thread: operation not permitted (1) aborted

Docker启动容器后ps查看不到,如rabbitmq
Failed to create thread: Operation not permitted (1)

1、搜索镜像

docker search rabbitmq
  • 1

2、拉取镜像

 docker pull rabbitmq
  • 1

3、启动容器

 docker run -d -p 5672:5672 --name m-rabbitmq rabbitmq
  • 1

4、查看运行中容器

 [root@localhost ~]# docker ps
CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS                               NAMES
d4de2c81da09        80c558ffdc31        "docker-entrypoint..."   2 days ago          Up 2 hours          0.0.0.0:5432->5432/tcp              m-pg
9a115ad7d244        docker.io/redis     "docker-entrypoint..."   4 days ago          Up 2 hours          0.0.0.0:6379->6379/tcp              m-redis
d901d93f0b23        mysql               "docker-entrypoint..."   10 days ago         Up 2 hours          0.0.0.0:3306->3306/tcp, 33060/tcp   m-mysql

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6

5、查看容器

[root@localhost ~]# docker ps -a
CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS                      PORTS                               NAMES
f4eb94dfae75        rabbitmq            "docker-entrypoint..."   29 seconds ago      Exited (0) 28 seconds ago                                       m-rabbitmq
  • 1
  • 2
  • 3

6、查看容器日志,报错 Failed to create thread: Operation not permitted (1)
Aborted (core dumped) --docker内的用户权限受限

[root@localhost ~]# docker logs f4eb94dfae75
Failed to create thread: Operation not permitted (1)
Aborted (core dumped)
  • 1
  • 2
  • 3

7、解决办法:
启动docker时加上参数 --privileged=true
privileged=true:获得真正的root权限


[root@localhost ~]# docker rm m-rabbitmq
m-rabbitmq
[root@localhost ~]# docker run --privileged=true -d -p 5672:5672 -p 15672:15672 --name m-rabbitmq rabbitmq
b0d9ce585ad2aa6bdbd25b8b8133834e8cd231a976f1df45699596d786c5cc36

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
声明:本文内容由网友自发贡献,转载请注明出处:【wpsshop】
推荐阅读
相关标签
  

闽ICP备14008679号