我在Docker中运行Solr,遇到了关于达到Zookeeper大小限制的错误
NIOServerCnxn Exception causing close of session 0x100015d298b0002: Len error 2248387
字符串
我已经按照文件https://solr.apache.org/guide/8_4/setting-up-an-external-zookeeper-ensemble.html#configuring-jute-maxbuffer-for-zookeeper-clients但没有运气
默认大小限制为1 MB-> https://github.com/apache/solr/blob/releases/lucene-solr/8.4.0/solr/core/src/java/org/apache/solr/cloud/autoscaling/sim/SimDistribStateManager.java#L236
下面是我用来启动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
当我删除所有文件上1 M,solr云运行正常
我错过什么了吗?
谢谢你阅读这一切
1条答案
按热度按时间aor9mmx11#
我使用这个命令在docker中启动solr
字符串
这将不起作用,在挖掘了一点之后,我发现SOLR_JAVA_MEM将超过SOLR_OPT,这个命令将适用于在Docker上工作的人(这个最大文件将是3MB”
型
您需要将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的真实的数字