This is an automated email from the ASF dual-hosted git repository.
dsmiley pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/solr.git
The following commit(s) were added to refs/heads/main by this push:
new c2a9d5092d2 SOLR-18319: Solr now logs core/collection not found (404)
(#4666)
c2a9d5092d2 is described below
commit c2a9d5092d286fefd7c5a1c8f4ff7e2ad9f26a60
Author: David Smiley <[email protected]>
AuthorDate: Sun Aug 23 12:17:35 2026 -0400
SOLR-18319: Solr now logs core/collection not found (404) (#4666)
Solr's 404 page is now clearer / less mysterious. We now log 404s in
Solr's log.
---
changelog/unreleased/SOLR-18319-404-simplify.yml | 8 ++++++++
.../java/org/apache/solr/servlet/HttpSolrCall.java | 5 ++---
solr/webapp/web/WEB-INF/web.xml | 5 -----
solr/webapp/web/error404.html | 21 ---------------------
4 files changed, 10 insertions(+), 29 deletions(-)
diff --git a/changelog/unreleased/SOLR-18319-404-simplify.yml
b/changelog/unreleased/SOLR-18319-404-simplify.yml
new file mode 100644
index 00000000000..a705474cbf6
--- /dev/null
+++ b/changelog/unreleased/SOLR-18319-404-simplify.yml
@@ -0,0 +1,8 @@
+title: >
+ Solr's 404 page is less generic. We now log 404s in Solr's log.
+type: changed
+authors:
+ - name: David Smiley
+links:
+ - name: SOLR-18319
+ url: https://issues.apache.org/jira/browse/SOLR-18319
diff --git a/solr/core/src/java/org/apache/solr/servlet/HttpSolrCall.java
b/solr/core/src/java/org/apache/solr/servlet/HttpSolrCall.java
index de25af4a9e9..3d80367921f 100644
--- a/solr/core/src/java/org/apache/solr/servlet/HttpSolrCall.java
+++ b/solr/core/src/java/org/apache/solr/servlet/HttpSolrCall.java
@@ -318,9 +318,8 @@ public class HttpSolrCall {
}
}
- String msg = "no handler, collection, or core for " + path;
- sendError(404, msg);
- log.info(msg); // not "error" since Solr isn't necessarily at fault
+ sendError(404, "no handler, collection, or core for " + path);
+ log.info("path={} status=404", path); // not "error" since Solr isn't
necessarily at fault
action = RETURN;
}
diff --git a/solr/webapp/web/WEB-INF/web.xml b/solr/webapp/web/WEB-INF/web.xml
index 04f949e2f6b..136cb6d4bd4 100644
--- a/solr/webapp/web/WEB-INF/web.xml
+++ b/solr/webapp/web/WEB-INF/web.xml
@@ -167,9 +167,4 @@
<url-pattern>/zookeeper</url-pattern>
</servlet-mapping>
-->
-
- <error-page>
- <error-code>404</error-code>
- <location>/error404.html</location>
- </error-page>
</web-app>
diff --git a/solr/webapp/web/error404.html b/solr/webapp/web/error404.html
deleted file mode 100644
index 3d15bd69760..00000000000
--- a/solr/webapp/web/error404.html
+++ /dev/null
@@ -1,21 +0,0 @@
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<p>
- Searching for Solr?<br/>
- You must type the correct path.<br/>
- Solr will respond.
-</p>