Elasticsearch did not exit normally - check the logs at /usr/share/elasticsearch/logs/docker-cluster.log
时间: 2023-11-20 07:05:39 浏览: 80
这个错误是因为 Elasticsearch 在 Docker 容器中没有正常退出而导致的。你可以尝试查看 `/usr/share/elasticsearch/logs/docker-cluster.log` 文件中的日志,以了解更多详细信息。
在查看日志之前,你可以尝试重新启动 Elasticsearch 容器,看看是否可以解决问题。如果问题仍然存在,你可能需要检查容器的配置和运行环境,以确保它们符合 Elasticsearch 的要求,并且没有任何问题。
此外,你还可以尝试使用 Docker Compose 等工具来管理 Elasticsearch 和其他相关容器,以确保它们可以正确地启动和停止,并且可以与其他容器进行通信。
相关问题
容器错误日志ERROR: [1] bootstrap checks failed. You must address the points described in the following [1] lines before starting Elasticsearch. bootstrap check failure [1] of [1]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144] ERROR: Elasticsearch did not exit normally - check the logs at /opt/sonarqube/logs/sonarqube.log
这个错误日志提示了Elasticsearch启动时的一个问题,即虚拟内存区域(vm.max_map_count)的数量不足。最简单的解决方法是在主机上使用以下命令将该值增加到至少262144:
```
sudo sysctl -w vm.max_map_count=262144
```
如果您希望永久设置此值,则可以编辑 /etc/sysctl.conf 文件并添加以下行:
```
vm.max_map_count=262144
```
然后保存并重新加载此文件以使更改生效:
```
sudo sysctl -p
```
完成这些步骤后,您应该可以重新启动Elasticsearch并解决此错误。
请用docker-compose写出下面这串代码: docker run --name es-s2 --restart=always -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" -v /mydata/se_cluster/es-s2/config:/usr/share/elasticsearch/config -v /mydata/se_cluster/es-s2/data:/usr/share/elasticsearch/data -v /mydata/se_cluster/es-s2/plugins:/usr/share/elasticsearch/plugins -v /mydata/se_cluster/es-s2/logs:/usr/share/elasticsearch/logs -e TAKE_FILE_OWNERSHIP="true" -d elasticsearch:7.9.0
version: '3'
services:
es-s2:
container_name: es-s2
restart: always
ports:
- "9200:9200"
- "9300:9300"
environment:
- discovery.type=single-node
- TAKE_FILE_OWNERSHIP=true
volumes:
- /mydata/se_cluster/es-s2/config:/usr/share/elasticsearch/config
- /mydata/se_cluster/es-s2/data:/usr/share/elasticsearch/data
- /mydata/se_cluster/es-s2/plugins:/usr/share/elasticsearch/plugins
- /mydata/se_cluster/es-s2/logs:/usr/share/elasticsearch/logs
image: elasticsearch:7.9.0
detach: true
相关推荐
![gz](https://img-home.csdnimg.cn/images/20210720083447.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)