Unable to create new core WPSolr 22.3, Solr 9.0
- simplistics-gordParticipant2 years ago #30652
Attempting to create a new core on Apache Solr 9.0 instance with WPSolr 22.3 fails. Config args are provided in the plugin admin interface, the configset is copied to the server. When re-saving, core is created, but Solr logs show:
WARN: Couldn't add files from /opt/solr/contrib/extraction/lib
… with a NoSuchFileExceptionWARN: Cannot write to config directory /var/solr/data/configsets/core_name/conf
ERROR: Exception in reloading spell check index for spellchecker: suggest
Presumably because of this last error, the cURL returns an invalid response and WPSolr handles it as a failure even though the core is created. This means that WPSolr will not save this configuration to the site DB, but then will not allow attempting to reconnect to that core either since it already exists.
simplistics-gordParticipant2 years ago #30655Yes.
- The first time generates the configset and provides instructions for downloading and installing, and tells you to re-save the configuration to create the core/save to the site DB as normal.
- The second time creates the core but displays a generic HTTP error issue in the interface (Apache Solr logs include the error in original post)
- Any additional attempts fail because the core is already created
wpsolrKeymaster2 years ago #30656Thanks.
WPSOLR 22.3 was tested on Solr 9.0, but for the sake of this discussion, I just created an index manually.
All the steps you mentioned, including the Solr log error, are correct. But I could create the core, and save the index configuration.I cannot see the error you mentioned though:
WARN: Couldn't add files from /opt/solr/contrib/extraction/lib
simplistics-gordParticipant2 years ago #30660Is there any sort of error logging that can be enabled within the plugin? When attempting to save the configuration, the site throws a nondescript ‘HTTP Request Failed’ error, which doesn’t help in finding/resolving the issue.
wpsolrKeymaster2 years ago #30661The Solr error should be displayed to you.
You can add your own for debugging in /plugins/wpsolr-pro/wpsolr-pro/wpsolr/core/ajax_solr_services.php line 275 (in the try/catch)As far as I can see, the problem could be from the
WARN: Couldn't add files from /opt/solr/contrib/extraction/lib
message. Does this folder exist in your Solr instance? This path is used to load .jar files in the solrconfig.xml file delivered with WPSOLR.simplistics-gordParticipant2 years ago #30662I just downloaded copies of 8.11 and 9.0 to compare and 9.0 actually doesn’t ship with
contrib/extraction/lib
. Looks like the analogous files are inmodules/extraction/lib
. Presumably this is triggered to load from within Solr and this is more likely an issue with the Solr 9.0 server than a plugin integration issue?simplistics-gordParticipant2 years ago #30663I don’t think that this is the issue. I just found this in the WPSolr-generated solrconfig.xml that it attempts to load lib files from both contrib (8.x) and modules (9.0) dirs, so that warning is unlikely related to the error.
simplistics-gordParticipant2 years ago #30666Yes I have added custom debug logging at ajax_solr_services.php:275. The error message is a nondescript “Solr HTTP error: HTTP request failed” even though the request was accepted by the server and the core was created. The error code is 0.
simplistics-gordParticipant2 years ago #30668Just the same issues I flagged in my original post. It looks as though perhaps it can’t write to the config directory, which is is later causing the spellchecker tst.dat file to not be created, and ultimately the error is thrown when trying to read that file during spell check index reload?
simplistics-gordParticipant2 years ago #30670I don’t have alot of Solr experience and don’t know how to do that, but if I create and extract the configset files as in WPSolr instructions, then attempt to create the core through the Solr Admin interface with the following args, I get an error:
Name: new_index_name
InstanceDir: new_index_name
DataDir: data
Config: solrconfig.xml
Schema: schema.xmlThe error is :
Can’t find resource ‘solrconfig.xml’ in classpath or ‘/var/solr9/data/new_index_name’
^^ As mentioned before, my server is running 2 different versions of Solr on different ports, so /var/solr is 8.x and /var/solr9 is 9.x.
You must be logged in to reply to this topic.