我正在 Docker 中运行 Solr,并面临有关达到 Zookeeper 大小限制的错误
NIOServerCnxn Exception causing close of session 0x100015d298b0002: Len error 2248387
这是我用来启动 solr 的命令
$ solr start -cloud -p 8984 -s "/opt/solr/example/cloud/node1/solr" -V
Using Solr root directory: /opt/solr
Using Java: /usr/local/openjdk-11/bin/java
openjdk version "11.0.6" 2020-01-14
OpenJDK Runtime Environment 18.9 (build 11.0.6+10)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.6+10, mixed mode)
Configuring SolrCloud to launch an embedded Zookeeper using -DzkRun
Starting Solr using the following settings:
JAVA = /usr/local/openjdk-11/bin/java
SOLR_SERVER_DIR = /opt/solr/server
SOLR_HOME = /opt/solr/example/cloud/node1/solr
SOLR_HOST =
SOLR_PORT = 8984
STOP_PORT = 7984
JAVA_MEM_OPTS = -Xms2G -Xmx6G
GC_TUNE = -XX:+UseG1GC -XX:+PerfDisableSharedMem -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=250 -XX:+UseLargePages -XX:+AlwaysPreTouch
GC_LOG_OPTS = -Xlog:gc*:file=/opt/solr/example/cloud/node1/solr/../logs/solr_gc.log:time,uptime:filecount=9,filesize=20M
SOLR_TIMEZONE = UTC
CLOUD_MODE_OPTS = -DzkClientTimeout=15000 -DzkRun
SOLR_OPTS = -Dsolr.environment=prod -Djute.maxbuffer=536870912 -Xss256k -Dsolr.jetty.https.port=8984
Warning: Available entropy is low. As a result, use of the UUIDField, SSL, or any other features that require
RNG might not work properly. To check for the amount of available entropy, use 'cat /proc/sys/kernel/random/entropy_avail'.
Waiting up to 180 seconds to see Solr running on port 8984 [/]
Started Solr server on port 8984 (pid=2512). Happy searching!
选项jute.maxbuffer已设置,但我仍然面临有关大小限制的错误
我的最大文件只有2.1M
当我删除所有1M以上的文件时,solr cloud运行正常
我错过了什么吗?
感谢您阅读所有这些
我正在使用此命令在 docker 中启动 solr
docker run -d -p 8983:8983 -e SOLR_JAVA_MEM="-Xms2G -Xmx6G " -e SOLR_OPT="-Djute.maxbuffer=0x300000" -t solr:8.4.0
这行不通,经过一番挖掘,我发现 SOLR_JAVA_MEM 将超过 SOLR_OPT,这个命令将适用于在 docker 上工作的人(这个最大文件将为 3MB”
docker run -d -p 8983:8983 -e SOLR_JAVA_MEM="-Xms2G -Xmx6G -Djute.maxbuffer=3145728" -t solr:8.4.0"
您需要在此基础上将 0x200000 更改为实数 https://github.com/apache/solr/blob/releases/lucene-solr/8.4.0/solr/core/src/java/org/apache /solr/cloud/autoscaling/sim/SimDistribStateManager.java#L237