XML configuration parsing is now more strict about situations where a single setting is allowed but multiple values are found. In the past, one value would be chosen arbitrarily and silently. Starting with 4.5, configuration parsing will fail with an error in situations like this. If you see error messages such as "solrconfig.xml contains more than one value for config path: XXXXX" or "Found Z configuration sections when at most 1 is allowed matching expression: XXXXX" check your solrconfig.xml file for multiple occurrences of XXXXX and delete the ones that you do not wish to use. See SOLR-4953 & SOLR-5108 for more details.
http://archive.apache.org/dist/lucene/solr/4.5.0/changes/Changes.html#v4...
The following settings are multiple but should be a single (and cause errors in solr 4.5)
- useCompoundFile
- ramBufferSizeMB
- mergeFactor
Comment | File | Size | Author |
---|---|---|---|
#15 | apache.jpg | 133.46 KB | Yet Another User |
#5 | apachesolr-remove-duplicate-parameter-definition-2107417-5.patch | 1.16 KB | cspitzlay |
#2 | 2107417-2.patch | 509 bytes | Nick_vh |
Comments
Comment #1
Nick_vhCan you provide a patch and will it still work with solr 4.4 or lower?
Comment #2
Nick_vhHmm, makes sense - these duplicate values should have never been in there.
Comment #3
checker CreditAttribution: checker commented#2 is working on solr 4.5.
Comment #4
drunken monkeyThese should also be removed for 3.x, I'd say. Even though no 3.x version will complain, it's still wrong conceptually.
Also, are you sure this removes the right version? The
mergeFactor
differs between the two, and the one you delete in your patch looks like the one we explicitly wanted to set (since the other appears as-is in the example configs).In any case, thanks a lot for reporting, checker! (Stupid Apache, soon they'll be releasing a new Solr version every week …)
Comment #5
cspitzlayHere is a patch that keeps the value 10.
@drunken monkey: In 3.x there are two separate sections:
indexDefaults and mainIndex, and both have only one instance of each of the three parameters.
So there are no duplicates.
In 4 the situation is different:
From example/solr/collection1/conf/solrconfig.xml in the solr 4.5.1 distribution,
about the <indexConfig> element:
"Note: This replaces <indexDefaults> and <mainIndex> from older versions"
It seems to me the values from these two elements were merged (incorrectly) when porting the version 3 config to 4. Just guessing, though.
Comment #6
Nick_vhJust to add some information but the value should be 4, not 10. 10 is way too much for Drupal sites and the way they behave (more reads versus writes)
Details on the why is available here : http://nickveenhof.be/blog/upgrading-apache-solr-14-35-and-its-implications
Comment #7
cspitzlayI see. Thanks for the pointer.
Then what is still required before #2 can be committed?
I don't see how this change could break 4.4 and earlier, judging from the docs quoted by checker.
Two of the definitions are identical anyway, and the docs talk about 4.4 and earlier choosing one of the values arbitrarily which means that you might have gotten 10 instead of 4 all along. So applying this patch even seems to fix a potential bug in 4.4 and earlier.
Comment #8
drunken monkeyOh, you're right. Thanks for the correction, and sorry I was a bit hast there.
As far as I'm concerned, #2 is ready to go then.
Comment #9
Yet Another User CreditAttribution: Yet Another User commentedI have the same kind of issue. Could you tell me on which file I need to apply this patch?
Please correct me if I am wrong, I am trying to apply this way.
[root@sitename solr]# cd collection1/conf/
[root@sitename conf]# patch -p0 --dry-run < 2107417-2.patch
can't find file to patch at input line 5
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/solr-conf/solr-4.x/solrconfig.xml b/solr-conf/solr-4.x/solrconfig.xml
|index 9b866ce..54d844a 100644
|--- a/solr-conf/solr-4.x/solrconfig.xml
|+++ b/solr-conf/solr-4.x/solrconfig.xml
--------------------------
File to patch: solrconfig.xml
patching file solrconfig.xml
[root@sitename conf]# lsof -i :8983
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
java 30377 root 70u IPv4 347688 0t0 TCP *:8983 (LISTEN)
[root@sitename conf]# kill -9 30377
[root@sitename example]# java -jar start.jar
2625 [coreLoadExecutor-3-thread-1] WARN org.apache.solr.core.SolrResourceLoader – Can't find (or read) directory to add to classloader: ../../contrib/clustering/lib/ (resolved as: /opt/solr-4.5.1/example/solr/collection1/../../contrib/clustering/lib).
2844 [coreLoadExecutor-3-thread-1] ERROR org.apache.solr.core.CoreContainer – Failed to load file /opt/solr-4.5.1/example/solr/collection1/solrconfig.xml
2849 [coreLoadExecutor-3-thread-1] ERROR org.apache.solr.core.CoreContainer – Unable to create core: collection1
org.apache.solr.common.SolrException: Could not load config file /opt/solr-4.5.1/example/solr/collection1/solrconfig.xml
2856 [coreLoadExecutor-3-thread-1] ERROR org.apache.solr.core.CoreContainer – null:org.apache.solr.common.SolrException: Unable to create core: collection1
It still gives the same error.
Please reply.
Thanks
Comment #10
Yet Another User CreditAttribution: Yet Another User commentedComment #11
checker CreditAttribution: checker commented@Mohit Mittal
I think your problem is different to the bug here is described. Your path to /lib is wrong in your solrconfig.xml.
Comment #12
Yet Another User CreditAttribution: Yet Another User commented@checker
Could you tell me what path I need to give and where exactly in the file?
Thanks
Mohit Mittal
Comment #13
FiNeX CreditAttribution: FiNeX commentedPatch #2 works fine on solr 4.5. Thanks :-)
Comment #14
Yet Another User CreditAttribution: Yet Another User commented@FiNeX,
1) Could you tell me which file you have patched?
When I give localhost:8983, it returns not found.
How and where do I need to change the path of lib?
Please help.
Thanks
Comment #15
Yet Another User CreditAttribution: Yet Another User commentedHi,
I have installed Tomcat Server now and I tried "java -jar start.jar" again and it worked with some errors.
Here are the errors,
2633 [coreLoadExecutor-3-thread-1] WARN org.apache.solr.core.SolrResourceLoader – Can't find (or read) directory to add to classloader: ../../contrib/extraction/lib (resolved as: /opt/solr-4.5.1/example/solr/collection1/../../contrib/extraction/lib).
2634 [coreLoadExecutor-3-thread-1] WARN org.apache.solr.core.SolrResourceLoader – Can't find (or read) directory to add to classloader: ../../contrib/clustering/lib/ (resolved as: /opt/solr-4.5.1/example/solr/collection1/../../contrib/clustering/lib).
2850 [coreLoadExecutor-3-thread-1] ERROR org.apache.solr.core.CoreContainer – Failed to load file /opt/solr-4.5.1/example/solr/collection1/solrconfig.xml
2851 [coreLoadExecutor-3-thread-1] ERROR org.apache.solr.core.CoreContainer – Unable to create core: collection1
org.apache.solr.common.SolrException: Could not load config file /opt/solr-4.5.1/example/solr/collection1/solrconfig.xml
2856 [coreLoadExecutor-3-thread-1] ERROR org.apache.solr.core.CoreContainer – null:org.apache.solr.common.SolrException: Unable to create core: collection1
But when I tried to run localhost:8983, it gave me this (please find the attachments)
Please let me know what should I do?
Thanks
Comment #16
Nick_vhCommitted patch #2, thanks!
Mohit Mittal, please try the Solr forums as this is out of scope for this project and it looks more like a server issue.
Comment #18
StephenBrown CreditAttribution: StephenBrown commentedWhen/where was this committed? I don't see a message in the commit log, and those lines still exist in 7.x-1.6.
http://drupalcode.org/project/apachesolr.git/blob/7.x-1.6:/solr-conf/sol...
Comment #19
drunken monkeyIt was fixed in this module, the common config files, and that's what this issue is about.
The fix is already included in the Search API Solr module (though a new release with it is pending) and I'm sure it will be committed to the Apache Solr Search Integration module very soon, too.
Comment #21
Alexander Allen CreditAttribution: Alexander Allen commentedRe-opening.
I just downloaded the apachesolr module and applied the instructions per the README.txt and ran straight into the error mentioned in this ticket.
I do not know if the fix in patch #2 has been committed or not, but this has definitely not made it into the current stable release.
Removing the three lines mentioned in patch #2 worked for me, working against the latest version of Solr downloaded from Apache mirrors - 4.7.0:
http://www.apache.org/dyn/closer.cgi/lucene/solr/4.7.0
Comment #22
Alexander Allen CreditAttribution: Alexander Allen commentedComment #23
geerlingguy CreditAttribution: geerlingguy commentedIt looks like the patch in #2 (not the later patch with mergeFactor 10) was committed to the Apache Solr Search integration (it's in the dev release only right now).