docker swarm 运行EMQX提示依赖异常

环境

  • EMQX 版本:5.8.2
  • 操作系统版本:openEuler 22.03 (LTS-SP3)

重现此问题的步骤

  1. 使用docker swarm 运行EMQX 报错
  2. 脚本编排文件如下:
    version: ‘3.5’

services:
terminal-emqx:
image: emqx/emqx:5.8.2
hostname: “terminal-emqx”
ports:
- 1883:1883
- 8083:8083
- 8084:8084
- 8883:8883
- 18083:18083
environment:
- EMQX_NODE__NAME=emqx@127.0.0.1
healthcheck:
test: [“CMD”, “/opt/emqx/bin/emqx”, “ctl”, “status”]
interval: 5s
timeout: 25s
retries: 5
volumes:
- /opt/briDrawingFile/nfs/emqx/data/data:/opt/emqx/data
- /opt/briDrawingFile/nfs/emqx/data/log:/opt/emqx/log
- /opt/briDrawingFile/nfs/emqx/data/conf/etc:/opt/emqx/etc
deploy:
replicas: 1
placement:
constraints: [ node.labels.data == true ]
networks:
- bjbn_terminal_net
networks:
bjbn_terminal_net:
driver: overlay
attachable: true

  1. xxx

预期行为

实际行为

ERROR: Failed to create thread: Operation not permitted (1)

ERROR: Please ensure it is running on the correct platform:

ERROR: arch: “x86_64-pc-linux-gnu”



wordsize: 64

os: “debian12”

erlang: “26.2.5.2-1”

elixir: “none”

relform: “tgz”

ERROR: Version=5.8.2

ERROR: Required dependencies: openssl-1.1.1 (libcrypto), libncurses and libatomic1

看你的 cpu 是什么框架的,估计是下错了。
https://hub.docker.com/_/emqx/tags


用 docker pull时指定一下 cpu。比如:
docker pull --platform linux/arm64 xxx

在另外一个机器上也是这个版本,相同的CPU架构没有问题

1.先排除 pull 的是不是一样的包:
对比看这两个结果是否一致:

docker inspect emqx/emqx |grep Architecture

2.再排除一下是不是 docker 的配置问题,在有问题的那一台机器再运行一个 nginx 的镜像,看是否能正常。

docker 运行没有问题,服务器上已经运行了很多容器了。我们试过,直接使用rpm包安装缺少openssl依赖,把openssl依赖装好后,可以用rpm包安装,但是docker 依然无法运行

那看起来没什么问题,里面有个权限问题,试试用这个 compose yaml 文件。

里面加了 ```
privileged: true