[
https://issues.apache.org/jira/browse/SOLR-6265?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14069559#comment-14069559
]
Hoss Man commented on SOLR-6265:
--------------------------------
Example of how to reproduce:
1) apply this patch to either trunk or 4x...
{noformat}
Index: solr/example/solr/collection1/conf/schema.xml
===================================================================
--- solr/example/solr/collection1/conf/schema.xml (revision 1612418)
+++ solr/example/solr/collection1/conf/schema.xml (working copy)
@@ -696,7 +696,7 @@
The subFields are an implementation detail of the fieldType, and end
users normally should not need to know about them.
-->
- <fieldType name="point" class="solr.PointType" dimension="2"
subFieldSuffix="_d"/>
+ <fieldType name="point" class="solr.PointType" dimension="-2"
subFieldSuffix="_d"/>
<!-- A specialized field for geospatial search. If indexed, this fieldType
must not be multivalued. -->
<fieldType name="location" class="solr.LatLonType"
subFieldSuffix="_coordinate"/>
{noformat}
2) start the example, and watch the logs...
{noformat}
hossman@frisbee:~/lucene/dev/solr/example$ java -jar start.jar
0 [main] INFO org.eclipse.jetty.server.Server – jetty-8.1.10.v20130312
20 [main] INFO org.eclipse.jetty.deploy.providers.ScanningAppProvider –
Deployment monitor /home/hossman/lucene/dev/solr/example/contexts at interval 0
26 [main] INFO org.eclipse.jetty.deploy.DeploymentManager – Deployable
added: /home/hossman/lucene/dev/solr/example/contexts/solr-jetty-context.xml
952 [main] INFO org.eclipse.jetty.webapp.StandardDescriptorProcessor – NO
JSP Support for /solr, did not find org.apache.jasper.servlet.JspServlet
999 [main] INFO org.apache.solr.servlet.SolrDispatchFilter –
SolrDispatchFilter.init()
1012 [main] INFO org.apache.solr.core.SolrResourceLoader – JNDI not
configured for solr (NoInitialContextEx)
1012 [main] INFO org.apache.solr.core.SolrResourceLoader – solr home
defaulted to 'solr/' (could not find system property or JNDI)
1013 [main] INFO org.apache.solr.core.SolrResourceLoader – new
SolrResourceLoader for directory: 'solr/'
1109 [main] INFO org.apache.solr.core.ConfigSolr – Loading container
configuration from /home/hossman/lucene/dev/solr/example/solr/solr.xml
1209 [main] INFO org.apache.solr.core.CoresLocator – Config-defined core root
directory: /home/hossman/lucene/dev/solr/example/solr
1216 [main] INFO org.apache.solr.core.CoreContainer – New CoreContainer
1906063587
1217 [main] INFO org.apache.solr.core.CoreContainer – Loading cores into
CoreContainer [instanceDir=solr/]
1231 [main] INFO org.apache.solr.handler.component.HttpShardHandlerFactory –
Setting socketTimeout to: 0
1231 [main] INFO org.apache.solr.handler.component.HttpShardHandlerFactory –
Setting urlScheme to: null
...CoreContainer obviously init'ing fine...
...more expected stuff...
1439 [main] INFO org.apache.solr.core.CoresLocator – Found core collection1
in /home/hossman/lucene/dev/solr/example/solr/collection1/
1439 [main] INFO org.apache.solr.core.CoresLocator – Found 1 core definitions
1441 [coreLoadExecutor-5-thread-1] INFO
org.apache.solr.core.SolrResourceLoader – new SolrResourceLoader for
directory: '/home/hossman/lucene/dev/solr/example/solr/collection1/'
1514 [coreLoadExecutor-5-thread-1] INFO org.apache.solr.core.SolrConfig –
Adding specified lib dirs to ClassLoader
1516 [coreLoadExecutor-5-thread-1] INFO
org.apache.solr.core.SolrResourceLoader – Adding
'file:/home/hossman/lucene/dev/solr/contrib/extraction/lib/xz-1.4.jar' to
classloader
...solr found collection1 and is clearly parsing solrconfig.xml to load
libs...
...more expected stuff...
1534 [coreLoadExecutor-5-thread-1] INFO
org.apache.solr.core.SolrResourceLoader – Adding
'file:/home/hossman/lucene/dev/solr/dist/solr-velocity-5.0-SNAPSHOT.jar' to
classloader
1679 [coreLoadExecutor-5-thread-1] INFO org.apache.solr.update.SolrIndexConfig
– IndexWriter infoStream solr logging is enabled
1688 [coreLoadExecutor-5-thread-1] INFO org.apache.solr.core.SolrConfig –
Using Lucene MatchVersion: LUCENE_5_0
1845 [coreLoadExecutor-5-thread-1] INFO org.apache.solr.core.Config – Loaded
SolrConfig: solrconfig.xml
1852 [coreLoadExecutor-5-thread-1] INFO org.apache.solr.schema.IndexSchema –
Reading Solr Schema from schema.xml
1929 [coreLoadExecutor-5-thread-1] INFO org.apache.solr.schema.IndexSchema –
[collection1] Schema name=example
2411 [main] INFO org.apache.solr.servlet.SolrDispatchFilter –
user.dir=/home/hossman/lucene/dev/solr/example
2411 [main] INFO org.apache.solr.servlet.SolrDispatchFilter –
SolrDispatchFilter.init() done
2434 [main] INFO org.eclipse.jetty.server.AbstractConnector – Started
[email protected]:8983
{noformat}
NOTE: that's the whole log -- nothing about anything found in schema.xml
3) load this URL: http://localhost:8983/solr/admin/cores
You'll get a response like this...
{noformat}
$ curl http://localhost:8983/solr/admin/cores
<?xml version="1.0" encoding="UTF-8"?>
<response>
<lst name="responseHeader"><int name="status">0</int><int
name="QTime">1</int></lst><str name="defaultCoreName">collection1</str><lst
name="initFailures"><str
name="collection1">org.apache.solr.common.SolrException:org.apache.solr.common.SolrException:
Could not load core configuration for core collection1</str></lst><lst
name="status"/>
</response>
{noformat}
And meanwhile the terminal with the solr log in it will grow by one line...
{noformat}
210453 [qtp546236873-14] INFO org.apache.solr.servlet.SolrDispatchFilter –
[admin] webapp=null path=/admin/cores params={} status=0 QTime=1
{noformat}
4) attempt to quey the core: http://localhost:8983/solr/collection1/select?q=*:*
your browser will get all the details about hwy this core couldn't be init'ed,
and *now* the error shows up in the log...
{noformat}
255212 [qtp546236873-11] ERROR org.apache.solr.servlet.SolrDispatchFilter –
null:org.apache.solr.common.SolrException: SolrCore 'collection1' is not
available due to init failure: Could not load core configuration for core
collection1
at org.apache.solr.core.CoreContainer.getCore(CoreContainer.java:740)
at
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:300)
at
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:208)
at
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1419)
at
org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:455)
at
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
at
org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557)
at
org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
at
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1075)
at
org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:384)
at
org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
at
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1009)
at
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
at
org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)
at
org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)
at
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
at org.eclipse.jetty.server.Server.handle(Server.java:368)
at
org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489)
at
org.eclipse.jetty.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:53)
at
org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:942)
at
org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:1004)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:640)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
at
org.eclipse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:72)
at
org.eclipse.jetty.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:264)
at
org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
at
org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
at java.lang.Thread.run(Thread.java:744)
Caused by: org.apache.solr.common.SolrException: Could not load core
configuration for core collection1
at
org.apache.solr.core.ConfigSetService.getConfig(ConfigSetService.java:66)
at org.apache.solr.core.CoreContainer.create(CoreContainer.java:485)
at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:251)
at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:248)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
... 1 more
Caused by: org.apache.solr.common.SolrException: Plugin Initializing failure
for [schema.xml] fieldType. Schema file is
/home/hossman/lucene/dev/solr/example/solr/collection1/schema.xml
at org.apache.solr.schema.IndexSchema.readSchema(IndexSchema.java:600)
at org.apache.solr.schema.IndexSchema.<init>(IndexSchema.java:171)
at
org.apache.solr.schema.IndexSchemaFactory.create(IndexSchemaFactory.java:55)
at
org.apache.solr.schema.IndexSchemaFactory.buildIndexSchema(IndexSchemaFactory.java:69)
at
org.apache.solr.core.ConfigSetService.createIndexSchema(ConfigSetService.java:89)
at
org.apache.solr.core.ConfigSetService.getConfig(ConfigSetService.java:62)
... 7 more
Caused by: org.apache.solr.common.SolrException: Plugin Initializing failure
for [schema.xml] fieldType
at
org.apache.solr.util.plugin.AbstractPluginLoader.load(AbstractPluginLoader.java:193)
at org.apache.solr.schema.IndexSchema.readSchema(IndexSchema.java:491)
... 12 more
Caused by: org.apache.solr.common.SolrException: The dimension must be > 0: -2
at org.apache.solr.schema.PointType.init(PointType.java:52)
at org.apache.solr.schema.FieldType.setArgs(FieldType.java:166)
at
org.apache.solr.schema.FieldTypePluginLoader.init(FieldTypePluginLoader.java:141)
at
org.apache.solr.schema.FieldTypePluginLoader.init(FieldTypePluginLoader.java:43)
at
org.apache.solr.util.plugin.AbstractPluginLoader.load(AbstractPluginLoader.java:190)
... 13 more
{noformat}
[~romseygeek]: is this a side effect of some of the CoreContainer init changes
you made?
(It seems like really, REALLY, bad behavior that this stuff is somehow now
getting "lazy logged")
> core errors on startup are not showing up in the log until attempts to use
> the core?
> ------------------------------------------------------------------------------------
>
> Key: SOLR-6265
> URL: https://issues.apache.org/jira/browse/SOLR-6265
> Project: Solr
> Issue Type: Bug
> Reporter: Hoss Man
> Priority: Blocker
> Fix For: 4.10
>
>
> As of r1612418, both the 4x and trunk svn trees seem to have a bug where any
> core specific init errors that occur on startup don't show up in the log
> until/unless someone attempts to access that core via HTTP.
> i'm not sure when exactly this bug was introduced, but it definitely isn't in
> 4.9.
> The impact on users, particularly new users, is that starting up solr with a
> mistake in your configs appears to work fine until you actually try to use
> solr and then you get ugly errors.
--
This message was sent by Atlassian JIRA
(v6.2#6252)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]