elasticsearch:
image: docker.seafile.top/seafileltd/elasticsearch:8.6.2
container_name: seafile-elasticsearch
environment:
- discovery.type=single-node
- bootstrap.memory_lock=true
- xpack.security.enabled=false
- “ES_JAVA_OPTS=-Xms1g -Xmx1g”
volumes:
- /opt/seafile-elasticsearch/data:/usr/share/elasticsearch/data # Requested, specifies the path to Elasticsearch data persistent store.
networks:
- seafile-net
这个设置未改动,/opt/seafile-elasticsearch/data 这个777的权限也给了,但data下面是空的。pro镜像也都正常启动了。 这个全文检索pro,还需要单独运行什么吗?
如果 Elasticsearch 安装在同一服务器上,最低要求是 4 核和 4GB 内存,可以通过以下命令增加
sysctl -w vm.max_map_count=262144 #run as root
或者
nano /etc/sysctl.conf
vm.max_map_count=262144
如果还未正常启动,查看es启动有什么错误
2025-02-06 10:35:52,133 [INFO] elastic_transport.transport:358 perform_request HEAD http://elasticsearch:9200/repofiles [status:N/A duration:30.036s]
2025-02-06 10:35:52,133 [WARNING] elastic_transport.node_pool:249 mark_dead Node <Urllib3HttpNode(http://elasticsearch:9200)> has failed for 1 times in a row, putting on 1 second timeout
2025-02-06 10:35:52,133 [ERROR] seahub.api2.views:606 get Connection timed out
刚看了下提示这个错误,这是怎么回事。
[INDEX FILES]
external_es_server = true
es_host = elasticsearch
es_port = 9200
enabled = true
interval = 10m
这个设置没有问题吧,9200这个端口还需要对外开放?
镜像也都启动了。