You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by is...@apache.org on 2017/03/27 18:27:40 UTC

lucene-solr:branch_6x: SOLR-10352: bin/solr script now prints warning when available system entropy is lower than 300

Repository: lucene-solr
Updated Branches:
  refs/heads/branch_6x 8517fccdb -> 6ecbe32dc


SOLR-10352: bin/solr script now prints warning when available system entropy is lower than 300


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/6ecbe32d
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/6ecbe32d
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/6ecbe32d

Branch: refs/heads/branch_6x
Commit: 6ecbe32dc2fdd2c3103e91cc9650395184f6499d
Parents: 8517fcc
Author: Ishan Chattopadhyaya <is...@apache.org>
Authored: Mon Mar 27 23:56:23 2017 +0530
Committer: Ishan Chattopadhyaya <is...@apache.org>
Committed: Mon Mar 27 23:57:22 2017 +0530

----------------------------------------------------------------------
 solr/CHANGES.txt | 3 +++
 solr/bin/solr    | 6 ++++++
 2 files changed, 9 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6ecbe32d/solr/CHANGES.txt
----------------------------------------------------------------------
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index fb22715..b84ea05 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -70,6 +70,9 @@ Other Changes
 * SOLR-10304: Refactor Document handling out of SolrIndexSearcher into a new class "SolrDocumentFetcher".
   Deprecated SolrPluginUtils.docListToSolrDocumentList(). (David Smiley)
 
+* SOLR-10352: bin/solr script now prints warning when available system entropy is lower than 300 (Esther Quansah via
+  Ishan Chattopadhyaya)
+
 ==================  6.5.0 ==================
 
 Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release.

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6ecbe32d/solr/bin/solr
----------------------------------------------------------------------
diff --git a/solr/bin/solr b/solr/bin/solr
index 8a36987..6e52ea2 100755
--- a/solr/bin/solr
+++ b/solr/bin/solr
@@ -1756,6 +1756,12 @@ function launch_solr() {
         -jar start.jar "${SOLR_JETTY_CONFIG[@]}" \
 	1>"$SOLR_LOGS_DIR/solr-$SOLR_PORT-console.log" 2>&1 & echo $! > "$SOLR_PID_DIR/solr-$SOLR_PORT.pid"
 
+    # check if /proc/sys/kernel/random/entropy_avail exists then check output of cat /proc/sys/kernel/random/entropy_avail to see if less than 300
+    if [[ -f /proc/sys/kernel/random/entropy_avail ]] && (( `cat /proc/sys/kernel/random/entropy_avail` < 30000)); then
+	echo "Warning: Available entropy is low. As a result, use of the UUIDField, SSL, or any other features that require"
+	echo "RNG might not work properly. To check for the amount of available entropy, use 'cat /proc/sys/kernel/random/entropy_avail'."
+	echo ""
+    fi
     # no lsof on cygwin though
     if hash lsof 2>/dev/null ; then  # hash returns true if lsof is on the path
       echo -n "Waiting up to $SOLR_STOP_WAIT seconds to see Solr running on port $SOLR_PORT"