diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt index f040c27df97..064aa9fc359 100644 --- a/solr/CHANGES.txt +++ b/solr/CHANGES.txt @@ -37,9 +37,9 @@ Upgrading from Solr 6.x * HttpSolrClient#setDefaultMaxConnectionsPerHost and HttpSolrClient#setMaxTotalConnections have been removed. These now default very high and can only be changed via param when creating an HttpClient instance. - -* Query time join with scoring {!join score=none} (even none) doesn't handle single value numeric fields. - Users are advised to convert these fields into string and reindex. + +* Query time join with scoring {!join score=none} (even none) doesn't handle single value numeric fields. + Users are advised to convert these fields into string and reindex. Bug Fixes ---------------------- @@ -124,7 +124,7 @@ Bug Fixes * SOLR-9542: Kerberos delegation tokens requires Jackson library (Ishan Chattopadhyaya via noble) -* SOLR-9330: Fix AlreadyClosedException on admin/mbeans?stats=true (Mikhail Khludnev) +* SOLR-9330: Fix AlreadyClosedException on admin/mbeans?stats=true (Mikhail Khludnev) Optimizations ---------------------- @@ -193,6 +193,8 @@ Other Changes * SOLR-9500: Add a LogLevel annotation to set log levels on specific tests (Alan Woodward) +* SOLR-9548: The beginning of solr.log now starts with a more informative welcome message (janhoy) + ================== 6.2.1 ================== Bug Fixes diff --git a/solr/bin/solr b/solr/bin/solr index bd8118b8669..2ef480a50a3 100755 --- a/solr/bin/solr +++ b/solr/bin/solr @@ -1562,7 +1562,6 @@ function launch_solr() { mkdir -p "$SOLR_LOGS_DIR" if [ "$run_in_foreground" == "true" ]; then - echo -e "\nStarting Solr$IN_CLOUD_MODE on port $SOLR_PORT from $SOLR_SERVER_DIR\n" exec "$JAVA" "${SOLR_START_OPTS[@]}" $SOLR_ADDL_ARGS -jar start.jar "${SOLR_JETTY_CONFIG[@]}" else # run Solr in the background diff --git a/solr/core/src/java/org/apache/solr/servlet/SolrDispatchFilter.java b/solr/core/src/java/org/apache/solr/servlet/SolrDispatchFilter.java index 83de0c302c3..711f0e6a03f 100644 --- a/solr/core/src/java/org/apache/solr/servlet/SolrDispatchFilter.java +++ b/solr/core/src/java/org/apache/solr/servlet/SolrDispatchFilter.java @@ -35,6 +35,7 @@ import java.io.OutputStream; import java.lang.invoke.MethodHandles; import java.nio.file.Path; import java.nio.file.Paths; +import java.time.Instant; import java.util.ArrayList; import java.util.Arrays; import java.util.Locale; @@ -48,6 +49,7 @@ import org.apache.commons.io.input.CloseShieldInputStream; import org.apache.commons.io.output.CloseShieldOutputStream; import org.apache.commons.lang.StringUtils; import org.apache.http.client.HttpClient; +import org.apache.lucene.util.Version; import org.apache.solr.common.SolrException; import org.apache.solr.common.SolrException.ErrorCode; import org.apache.solr.common.cloud.SolrZkClient; @@ -120,6 +122,8 @@ public class SolrDispatchFilter extends BaseSolrFilter { public void init(FilterConfig config) throws ServletException { log.trace("SolrDispatchFilter.init(): {}", this.getClass().getClassLoader()); + + logWelcomeBanner(); String muteConsole = System.getProperty(SOLR_LOG_MUTECONSOLE); if (muteConsole != null && !Arrays.asList("false","0","off","no").contains(muteConsole.toLowerCase(Locale.ROOT))) { StartupLoggingUtils.muteConsole(); @@ -162,6 +166,23 @@ public class SolrDispatchFilter extends BaseSolrFilter { log.trace("SolrDispatchFilter.init() done"); } + private void logWelcomeBanner() { + log.info(" ___ _ Welcome to Apache Solr™ version {}", Version.LATEST); + log.info("/ __| ___| |_ _ Starting in {} mode on port {}", isCloudMode() ? "cloud" : "standalone", getSolrPort()); + log.info("\\__ \\/ _ \\ | '_| Install dir: {}", System.getProperty("solr.install.dir")); + log.info("|___/\\___/_|_| Start time: {}", Instant.now().toString()); + } + + private String getSolrPort() { + return System.getProperty("jetty.port"); + } + + /* We are in cloud mode if Java option zkRun exists OR zkHost exists and is non-empty */ + private boolean isCloudMode() { + return ((System.getProperty("zkHost") != null && !StringUtils.isEmpty(System.getProperty("zkHost"))) + || System.getProperty("zkRun") != null); + } + /** * Override this to change CoreContainer initialization * @return a CoreContainer to hold this server's cores