docker 拉取 activemq镜像,找不到pid好像一直再重置pid导致容器不能启动

docker run -itd --name activemq -p 61616:61616 -p 8161:8161 webcenter/activemq

[root@abc activemq]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
5e4a78d22285 webcenter/activemq “/app/run.sh” 53 seconds ago Up 52 seconds 1883/tcp, 5672/tcp, 0.0.0.0:8161->8161/tcp, :::8161->8161/tcp, 61613-61614/tcp, 0.0.0.0:61616->61616/tcp, :::61616->61616/tcp activemq
[root@abc activemq]# docker logs -f activemq
2023-11-10 03:10:24,417 CRIT Supervisor running as root (no user in config file)
2023-11-10 03:10:24,418 WARN Included extra file “/etc/supervisor/conf.d/activemq.conf” during parsing
2023-11-10 03:10:24,418 WARN Included extra file “/etc/supervisor/conf.d/cron.conf” during parsing
2023-11-10 03:10:24,428 INFO RPC interface ‘supervisor’ initialized
2023-11-10 03:10:24,428 CRIT Server ‘unix_http_server’ running without any HTTP authentication checking
2023-11-10 03:10:24,429 INFO supervisord started with pid 1
2023-11-10 03:10:25,431 INFO spawned: ‘cron’ with pid 16
2023-11-10 03:10:25,434 INFO spawned: ‘activemq’ with pid 17
2023-11-10 03:10:26,033 INFO exited: activemq (exit status 134; not expected)
2023-11-10 03:10:27,034 INFO success: cron entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2023-11-10 03:10:27,036 INFO spawned: ‘activemq’ with pid 90
2023-11-10 03:10:27,561 INFO exited: activemq (exit status 134; not expected)
2023-11-10 03:10:29,565 INFO spawned: ‘activemq’ with pid 168
2023-11-10 03:10:29,987 INFO exited: activemq (exit status 134; not expected)
2023-11-10 03:10:32,993 INFO spawned: ‘activemq’ with pid 246
2023-11-10 03:10:33,446 INFO exited: activemq (exit status 134; not expected)
2023-11-10 03:10:34,448 INFO gave up: activemq entered FATAL state, too many start retries too quickly

块引用
同样的命令centos7运行正常。哪里不对呢。

已解决,问题是容器的打开文件数不足

activemq报错 library initialization failed - unable to allocate file descriptor table - out of memoryAborted
实际并不是内存不够用
需要在系统/etc/profile 中添加 ulimit -n 65535 。 然后使用 source /etc/profile 命令使配置生效。
docker 运行增加–ulimit nofile=65535:65535 --ulimit nproc=65535:65535

服务器基线要做了 :rofl:

docker-compose 文件加入ulimit pid线程还是不停的重建。直到满了为止。。。。