Unable to create new core WPSolr 22.3, Solr 9.0

  • simplistics-gord
    Participant
    1 year, 8 months 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 NoSuchFileException
    • WARN: 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.

    wpsolr
    Keymaster
    1 year, 8 months ago #30653

    Did you try to save the index configuration several time?

    simplistics-gord
    Participant
    1 year, 8 months ago #30655

    Yes.

    1. 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.
    2. 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)
    3. Any additional attempts fail because the core is already created
    wpsolr
    Keymaster
    1 year, 8 months ago #30656

    Thanks.

    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-gord
    Participant
    1 year, 8 months ago #30660

    Is 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.

    wpsolr
    Keymaster
    1 year, 8 months ago #30661

    The 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-gord
    Participant
    1 year, 8 months ago #30662

    I 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 in modules/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-gord
    Participant
    1 year, 8 months ago #30663

    I 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.

    wpsolr
    Keymaster
    1 year, 8 months ago #30664

    Indeed, solrconfig.xml loads both directories, so it could not be an issue after all:

      <lib dir="${solr.install.dir:../../../..}/contrib/extraction/lib" regex=".*\.jar" />
      <lib dir="${solr.install.dir:../../../..}/modules/extraction/lib" regex=".*\.jar" />
    wpsolr
    Keymaster
    1 year, 8 months ago #30665

    The 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)

    Did you try that?

    simplistics-gord
    Participant
    1 year, 8 months ago #30666

    Yes 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.

    wpsolr
    Keymaster
    1 year, 8 months ago #30667

    Anything suspicious in your Solr logs ? ( /var/solr/logs/solr.log)

    simplistics-gord
    Participant
    1 year, 8 months ago #30668

    Just 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?

    wpsolr
    Keymaster
    1 year, 8 months ago #30669

    Can you create a new index manually, from the Solr dashboard, with the WPSOLR files?

    simplistics-gord
    Participant
    1 year, 8 months ago #30670

    I 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.xml

    The 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.

Viewing 15 posts - 1 through 15 (of 22 total)

You must be logged in to reply to this topic.