Solr
  1. Solr
  2. SOLR-6661

Address relative path <lib> references

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 4.10
    • Fix Version/s: 4.10.3, 5.0, 6.0
    • Component/s: None
    • Labels:
      None

      Description

      Relative paths in solrconfig.xml's <lib> references are wrong, and require manual adjusting, when the base directory moves to different place in the file system tree. This can happen when cloning a configuration, such as the new start scripts in "-e cloud" mode.

      Having an incorrect relative path manifests itself as /browse not working (can't find VelocityResponseWriter related JARs), and likewise with /update/extract because of wrong paths to Tika, etc.

      1. SOLR-6661.patch
        14 kB
        Erik Hatcher

        Activity

        Hide
        Erik Hatcher added a comment - - edited

        This has historically been a problem, and I've always adjusted the example configurations when I build prototypes/demos to have this ${solr.install.dir} system property concept. Now that we have start scripts, we can simply pass in the already known Solr "install" (under which contrib/ lives, most importantly for this issue) directory.

        Show
        Erik Hatcher added a comment - - edited This has historically been a problem, and I've always adjusted the example configurations when I build prototypes/demos to have this ${solr.install.dir} system property concept. Now that we have start scripts, we can simply pass in the already known Solr "install" (under which contrib/ lives, most importantly for this issue) directory.
        Hide
        Erik Hatcher added a comment - - edited

        This patch adjusts all example configurations with relative <lib> paths to keep the default, but override with ${solr.install.dir} system property. The ('nix only!) start script has been adjusted to pass this property in.

        Show
        Erik Hatcher added a comment - - edited This patch adjusts all example configurations with relative <lib> paths to keep the default, but override with ${solr.install.dir} system property. The ('nix only!) start script has been adjusted to pass this property in.
        Hide
        Anshum Gupta added a comment -

        +1 on this! LGTM.

        Show
        Anshum Gupta added a comment - +1 on this! LGTM.
        Hide
        ASF subversion and git services added a comment -

        Commit 1634770 from Erik Hatcher in branch 'dev/trunk'
        [ https://svn.apache.org/r1634770 ]

        SOLR-6661: Adjust all example configurations to allow overriding error-prone relative paths for solrconfig.xml <lib> references with solr.install.dir system property; bin/solr scripts will set it appropriately.

        Show
        ASF subversion and git services added a comment - Commit 1634770 from Erik Hatcher in branch 'dev/trunk' [ https://svn.apache.org/r1634770 ] SOLR-6661 : Adjust all example configurations to allow overriding error-prone relative paths for solrconfig.xml <lib> references with solr.install.dir system property; bin/solr scripts will set it appropriately.
        Hide
        ASF subversion and git services added a comment -

        Commit 1634771 from Erik Hatcher in branch 'dev/branches/branch_5x'
        [ https://svn.apache.org/r1634771 ]

        SOLR-6661: Adjust all example configurations to allow overriding error-prone relative paths for solrconfig.xml <lib> references with solr.install.dir system property; bin/solr scripts will set it appropriately.

        Show
        ASF subversion and git services added a comment - Commit 1634771 from Erik Hatcher in branch 'dev/branches/branch_5x' [ https://svn.apache.org/r1634771 ] SOLR-6661 : Adjust all example configurations to allow overriding error-prone relative paths for solrconfig.xml <lib> references with solr.install.dir system property; bin/solr scripts will set it appropriately.
        Hide
        Erik Hatcher added a comment -

        Also added this to bin/solr.cmd for Windows as well (someone please test).

        Show
        Erik Hatcher added a comment - Also added this to bin/solr.cmd for Windows as well (someone please test).
        Hide
        Erik Hatcher added a comment -

        Re-opening so this can tackled for a 4.10.3 release as well. It's already on 5x and trunk, just not 4x yet

        Show
        Erik Hatcher added a comment - Re-opening so this can tackled for a 4.10.3 release as well. It's already on 5x and trunk, just not 4x yet
        Hide
        ASF subversion and git services added a comment -

        Commit 1638496 from Erik Hatcher in branch 'dev/branches/lucene_solr_4_10'
        [ https://svn.apache.org/r1638496 ]

        SOLR-6661: Adjust all example configurations to allow overriding error-prone relative paths for solrconfig.xml <lib> references with solr.install.dir system property; bin/solr scripts will set it appropriately. (merged from branch_5x r1634771, manually fixing solr/CHANGES.txt conflict)

        Show
        ASF subversion and git services added a comment - Commit 1638496 from Erik Hatcher in branch 'dev/branches/lucene_solr_4_10' [ https://svn.apache.org/r1638496 ] SOLR-6661 : Adjust all example configurations to allow overriding error-prone relative paths for solrconfig.xml <lib> references with solr.install.dir system property; bin/solr scripts will set it appropriately. (merged from branch_5x r1634771, manually fixing solr/CHANGES.txt conflict)
        Hide
        Erik Hatcher added a comment -

        committed this to the 4.10 branch so it'll be on releases 4.10.3+

        Show
        Erik Hatcher added a comment - committed this to the 4.10 branch so it'll be on releases 4.10.3+
        Hide
        Anshum Gupta added a comment -

        Bulk close after 5.0 release.

        Show
        Anshum Gupta added a comment - Bulk close after 5.0 release.

          People

          • Assignee:
            Erik Hatcher
            Reporter:
            Erik Hatcher
          • Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development