最近在使用docker部署elasticsearch的时候容器报了这个错误:
[0.010s][warning][os,thread] Failed to start thread “ArchiveWorkerThread” – pthread_create failed (EPERM) for attributes: stacksize: 1024k, guardsize: 4k, detached. Error occurred during initialization of VM Unable to create archive worker: unable to create native thread: possibly out of memory or process/resource limits reached
说无法创建过多的线程,可能是因为平时启动的容器可能占用线程不多,突然用es就遇到这个问题,一下就懵了。一开始使用–pids-limit增加线程限制也没有效果,后面发现这是docker的一个安全机制,解除方式也很简单,在Docker run命令添加以下参数:
--security-opt seccomp=unconfined
发表回复