Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-10055

Manual bin/solr start causes crash due to resolving wrong solr.in.sh

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 6.5, 7.0
    • Component/s: scripts and tools
    • Security Level: Public (Default Security Level. Issues are Public)
    • Labels:
      None

      Description

      The install script installs solr.in.sh in /etc/defaults/. However, if the user manually runs solr start, the script will use the solr.in.sh file from bin/ since that is first in the search path. And it will fail since /opt/solr is write protected. But if user starts with service solr start then the file from installation is used and all is fine.

      Since the default /opt/solr/server/solr is not writable by solr user, this creates a bad user experience and classifies as a bug.

      My proposal is that the installer renames bin/solr.in.sh -> bin/solr.in.sh.orig and the same with solr.in.cmd, so that the resolution logic will end up finding the one from the install. User can still override this by creating a $HOME/.solr.in.sh.

        Activity

        Hide
        janhoy Jan Høydahl added a comment -

        Attaching patch which will rename said files on install. Tested on a clean Debian system. Will commit soon

        Show
        janhoy Jan Høydahl added a comment - Attaching patch which will rename said files on install. Tested on a clean Debian system. Will commit soon
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 1e206d820ab0a3c080562e056970c77ef5c99f04 in lucene-solr's branch refs/heads/master from Jan Høydahl
        [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=1e206d8 ]

        SOLR-10055: Linux installer now renames existing bin/solr.in.* as bin/solr.in.*.orig to avoid wrong resolving.

        Show
        jira-bot ASF subversion and git services added a comment - Commit 1e206d820ab0a3c080562e056970c77ef5c99f04 in lucene-solr's branch refs/heads/master from Jan Høydahl [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=1e206d8 ] SOLR-10055 : Linux installer now renames existing bin/solr.in.* as bin/solr.in.*.orig to avoid wrong resolving.
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 11a7313cecb2f16f272ed4658ccb0f8d723d9029 in lucene-solr's branch refs/heads/branch_6x from Jan Høydahl
        [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=11a7313 ]

        SOLR-10055: Linux installer now renames existing bin/solr.in.* as bin/solr.in.*.orig to avoid wrong resolving.

        (cherry picked from commit 1e206d8)

        Show
        jira-bot ASF subversion and git services added a comment - Commit 11a7313cecb2f16f272ed4658ccb0f8d723d9029 in lucene-solr's branch refs/heads/branch_6x from Jan Høydahl [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=11a7313 ] SOLR-10055 : Linux installer now renames existing bin/solr.in.* as bin/solr.in.*.orig to avoid wrong resolving. (cherry picked from commit 1e206d8)

          People

          • Assignee:
            janhoy Jan Høydahl
            Reporter:
            janhoy Jan Høydahl
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development