You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ep...@apache.org on 2021/02/04 21:16:19 UTC

[lucene-solr] branch master updated: SOLR-15133: Document how to eliminate Failed to reserve shared memory warning (#2304)

This is an automated email from the ASF dual-hosted git repository.

epugh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git


The following commit(s) were added to refs/heads/master by this push:
     new d83a174  SOLR-15133: Document how to eliminate Failed to reserve shared memory warning (#2304)
d83a174 is described below

commit d83a17490d677c15015a8efab5c0a108632fed9c
Author: Eric Pugh <ep...@opensourceconnections.com>
AuthorDate: Thu Feb 4 16:15:43 2021 -0500

    SOLR-15133: Document how to eliminate Failed to reserve shared memory warning (#2304)
    
    * light copyediting
    
    * document how to avoid shared memory issue
    
    Co-authored-by: epugh@opensourceconnections.com <>
---
 solr/docker/Docker-FAQ.md | 33 ++++++++++++++++++++++++++-------
 1 file changed, 26 insertions(+), 7 deletions(-)

diff --git a/solr/docker/Docker-FAQ.md b/solr/docker/Docker-FAQ.md
index b2a0646..b7904d0 100644
--- a/solr/docker/Docker-FAQ.md
+++ b/solr/docker/Docker-FAQ.md
@@ -150,7 +150,7 @@ rather than the "mycores" directory.
 Can I run ZooKeeper and Solr clusters under Docker?
 ---------------------------------------------------
 
-At the network level the ZooKeeper nodes need to be able to talk to eachother,
+At the network level the ZooKeeper nodes need to be able to talk to each other,
 and the Solr nodes need to be able to talk to the ZooKeeper nodes and to each other.
 At the application level, different nodes need to be able to identify and locate each other.
 In ZooKeeper that is done with a configuration file that lists hostnames or IP addresses for each node.
@@ -159,10 +159,10 @@ In Solr that is done with a parameter that specifies a host or IP address, which
 In typical clusters, those hostnames/IP addresses are pre-defined and remain static through the lifetime of the cluster.
 In Docker, inter-container communication and multi-host networking can be facilitated by [Docker Networks](https://docs.docker.com/engine/userguide/networking/).
 But, crucially, Docker does not normally guarantee that IP addresses of containers remain static during the lifetime of a container.
-In non-networked Docker, the IP address seems to change everytime you stop/start.
+In non-networked Docker, the IP address seems to change every time you stop/start.
 In a networked Docker, containers can lose their IP address in certain sequences of starting/stopping, unless you take steps to prevent that.
 
-IP changes causes problems:
+IP changes cause problems:
 
 - If you use hardcoded IP addresses in configuration, and the addresses of your containers change after a stops/start, then your cluster will stop working and may corrupt itself.
 - If you use hostnames in configuration, and the addresses of your containers change, then you might run into problems with cached hostname lookups.
@@ -219,6 +219,25 @@ How can I run ZooKeeper and Solr with Docker Compose?
 
 See the [docker compose example](docs/docker-compose.yml).
 
+How can I get rid of "shared memory" warnings on Solr startup?
+-----------------------------------------------------
+
+When starting the docker image you typically see these log lines:
+
+```
+OpenJDK 64-Bit Server VM warning: Failed to reserve shared memory. (error = 1)
+```
+
+If your set up can run without huge pages or you do not require it, the least-friction way to
+remove this warning is to disable large paging in the JVM via the environment variable:
+
+```
+SOLR_OPTS=-XX:-UseLargePages
+```
+
+In your Solr Admin UI, you will see listed under the JVM args both the original `-XX:+UseLargePages`
+set by the `GC_TUNE` environment variable and further down the list the overriding `-XX:-UseLargePages` argument.
+
 
 I'm confused about the different invocations of solr -- help?
 -------------------------------------------------------------
@@ -234,8 +253,8 @@ To run an arbitrary command in the image:
 docker run -it apache/solr date
 ```
 
-here "apache/solr" is the name of the image, and "date" is the command.
-This does not invoke any solr functionality.
+Here "apache/solr" is the name of the image, and "date" is the command.
+This does not invoke any Solr functionality.
 
 
 To run the Solr server:
@@ -255,7 +274,7 @@ docker run -it apache/solr -h myhostname
 ```
 
 This is the same as the previous one, but an additional argument is passed.
-The image will run the "solr" command with "-f -h myhostname"
+The image will run the "solr" command with "-f -h myhostname".
 
 To run solr as an arbitrary command:
 
@@ -263,7 +282,7 @@ To run solr as an arbitrary command:
 docker run -it apache/solr solr zk --help
 ```
 
-here the first "apache/solr" is the image name, and the second "solr"
+Here the first "apache/solr" is the image name, and the second "solr"
 is the "solr" command. The image runs the command exactly as specified;
 no "-f" is implicitly added. The container will print help text, and exit.