You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by sa...@apache.org on 2015/01/22 22:59:36 UTC

svn commit: r1654080 - in /lucene/dev/branches/lucene_solr_5_0: ./ solr/ solr/CHANGES.txt solr/bin/ solr/bin/solr solr/server/ solr/server/etc/jetty-https-ssl.xml solr/server/etc/jetty.xml

Author: sarowe
Date: Thu Jan 22 21:59:36 2015
New Revision: 1654080

URL: http://svn.apache.org/r1654080
Log:
SOLR-7020: 'bin/solr start' should automatically use an SSL-enabled alternate jetty configuration file when in SSL mode, eliminating the need for manual jetty.xml edits. (merged branch_5x r1654078 and r1654079)

Added:
    lucene/dev/branches/lucene_solr_5_0/solr/server/etc/jetty-https-ssl.xml
      - copied unchanged from r1654078, lucene/dev/branches/branch_5x/solr/server/etc/jetty-https-ssl.xml
Modified:
    lucene/dev/branches/lucene_solr_5_0/   (props changed)
    lucene/dev/branches/lucene_solr_5_0/solr/   (props changed)
    lucene/dev/branches/lucene_solr_5_0/solr/CHANGES.txt   (contents, props changed)
    lucene/dev/branches/lucene_solr_5_0/solr/bin/   (props changed)
    lucene/dev/branches/lucene_solr_5_0/solr/bin/solr
    lucene/dev/branches/lucene_solr_5_0/solr/server/   (props changed)
    lucene/dev/branches/lucene_solr_5_0/solr/server/etc/jetty.xml

Modified: lucene/dev/branches/lucene_solr_5_0/solr/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene_solr_5_0/solr/CHANGES.txt?rev=1654080&r1=1654079&r2=1654080&view=diff
==============================================================================
--- lucene/dev/branches/lucene_solr_5_0/solr/CHANGES.txt (original)
+++ lucene/dev/branches/lucene_solr_5_0/solr/CHANGES.txt Thu Jan 22 21:59:36 2015
@@ -726,6 +726,10 @@ Other Changes
   an error message prompting the user to be explicit about which of multiple nodes
   to stop using the -p or -all options (Timothy Potter)
 
+* SOLR-7020: 'bin/solr start' should automatically use an SSL-enabled alternate jetty
+  configuration file when in SSL mode, eliminating the need for manual jetty.xml edits.
+  (Steve Rowe) 
+
 ==================  4.10.3 ==================
 
 Bug Fixes

Modified: lucene/dev/branches/lucene_solr_5_0/solr/bin/solr
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene_solr_5_0/solr/bin/solr?rev=1654080&r1=1654079&r2=1654080&view=diff
==============================================================================
--- lucene/dev/branches/lucene_solr_5_0/solr/bin/solr (original)
+++ lucene/dev/branches/lucene_solr_5_0/solr/bin/solr Thu Jan 22 21:59:36 2015
@@ -132,6 +132,12 @@ if [ -n "$SOLR_SSL_OPTS" ]; then
   SOLR_URL_SCHEME=https
 fi
 
+# Which Jetty config file to use - leave blank to use the default: etc/jetty.xml
+SOLR_JETTY_CONFIG=
+if [ -n "$SOLR_SSL_OPTS" ]; then
+  SOLR_JETTY_CONFIG=$SOLR_TIP/server/etc/jetty-https-ssl.xml
+fi
+
 function print_usage() {
   CMD="$1"
   ERROR_MSG="$2"
@@ -432,7 +438,7 @@ function stop_solr() {
 
   if [ "$SOLR_PID" != "" ]; then
     echo -e "Sending stop command to Solr running on port $SOLR_PORT ... waiting 5 seconds to allow Jetty process $SOLR_PID to stop gracefully."
-    $JAVA $SOLR_SSL_OPTS -jar $DIR/start.jar STOP.PORT=$STOP_PORT STOP.KEY=$STOP_KEY --stop || true
+    $JAVA $SOLR_SSL_OPTS -jar $DIR/start.jar $SOLR_JETTY_CONFIG STOP.PORT=$STOP_PORT STOP.KEY=$STOP_KEY --stop || true
     (sleep 5) &
     spinner $!
     rm -f $SOLR_PID_DIR/solr-$SOLR_PORT.pid
@@ -1331,10 +1337,10 @@ $SOLR_OPTS"
 
   if [ "$run_in_foreground" == "true" ]; then
     echo -e "\nStarting Solr$IN_CLOUD_MODE on port $SOLR_PORT from $SOLR_SERVER_DIR\n"
-    $JAVA $SOLR_START_OPTS $SOLR_ADDL_ARGS -jar start.jar
+    $JAVA $SOLR_START_OPTS $SOLR_ADDL_ARGS -jar start.jar $SOLR_JETTY_CONFIG
   else
     # run Solr in the background
-    nohup $JAVA $SOLR_START_OPTS $SOLR_ADDL_ARGS -XX:OnOutOfMemoryError="$SOLR_TIP/bin/oom_solr.sh $SOLR_PORT $SOLR_LOGS_DIR" -jar start.jar 1>$SOLR_LOGS_DIR/solr-$SOLR_PORT-console.log 2>&1 & echo $! > $SOLR_PID_DIR/solr-$SOLR_PORT.pid
+    nohup $JAVA $SOLR_START_OPTS $SOLR_ADDL_ARGS -XX:OnOutOfMemoryError="$SOLR_TIP/bin/oom_solr.sh $SOLR_PORT $SOLR_LOGS_DIR" -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
   
     # no lsof on cygwin though
     if [ "$hasLsof" != "" ]; then

Modified: lucene/dev/branches/lucene_solr_5_0/solr/server/etc/jetty.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene_solr_5_0/solr/server/etc/jetty.xml?rev=1654080&r1=1654079&r2=1654080&view=diff
==============================================================================
--- lucene/dev/branches/lucene_solr_5_0/solr/server/etc/jetty.xml (original)
+++ lucene/dev/branches/lucene_solr_5_0/solr/server/etc/jetty.xml Thu Jan 22 21:59:36 2015
@@ -60,33 +60,6 @@
       </Arg>
     </Call>
 
-    <!-- If the connector below is uncommented, then jetty will also accept SSL
-         connections using a self signed certificate, and can optionally require
-         the client to authenticate with a certificate, which can be the same as
-         the server certificate.
-         
-         For information about generating the SSL certificate, etc., see:
-          
-             https://cwiki.apache.org/confluence/display/solr/Enabling+SSL
-    -->
-    <!--
-    <Call name="addConnector">
-      <Arg>
-        <New class="org.eclipse.jetty.server.ssl.SslSelectChannelConnector">
-          <Arg>
-            <New class="org.eclipse.jetty.http.ssl.SslContextFactory">
-              <Set name="keyStore"><SystemProperty name="jetty.home" default="."/>/etc/solr-ssl.keystore.jks</Set>
-              <Set name="keyStorePassword">secret</Set>
-              <Set name="needClientAuth"><SystemProperty name="jetty.ssl.clientAuth" default="false"/></Set>
-            </New>
-          </Arg>
-          <Set name="port"><SystemProperty name="jetty.ssl.port" default="8984"/></Set>
-          <Set name="maxIdleTime">30000</Set>
-        </New>
-      </Arg>
-    </Call>
-    -->
-
     <!-- =========================================================== -->
     <!-- Set handler Collection Structure                            --> 
     <!-- =========================================================== -->