Solr
  1. Solr
  2. SOLR-6993

install_solr_service.sh won't install on RHEL / CentOS

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 5.0, 6.0
    • Fix Version/s: 5.0, 6.0
    • Component/s: scripts and tools
    • Labels:
      None
    • Environment:

      RHEL 6.5 / CentOS 6.5

      Description

      There's a bug that will prevent install_solr_service.sh from working on RHEL / CentOS 6.5. It works on Ubuntu 14. Appears to be some obscure difference in bash expression evaluation behavior.

      line 87 and 89: SOLR_DIR=$

      {SOLR_INSTALL_FILE:0:-4}

      blows up with this error:

      ./install_solr_service.sh: line 87: -4: substring expression < 0

      this results in the archive not being extracted and rest of the script won't work.

      I tested a simple change:
      SOLR_DIR=$

      {SOLR_INSTALL_FILE%.tgz}

      and verified it works on both RHEL 6.5 and Ubuntu 14

      Patch is attached. I set this to Major thinking that not being able to install on CentOS is worth fixing prior to release.

      1. SOLR-6993.patch
        0.6 kB
        David Anderson

        Activity

        Hide
        Erick Erickson added a comment -

        Marking blocker so the folks who are working on the scripts can render an opinion, feel free to downgrade at your discretion.

        Show
        Erick Erickson added a comment - Marking blocker so the folks who are working on the scripts can render an opinion, feel free to downgrade at your discretion.
        Hide
        Anshum Gupta added a comment -

        Timothy Potter what do you think about this one? Is it for 5.0?

        Show
        Anshum Gupta added a comment - Timothy Potter what do you think about this one? Is it for 5.0?
        Hide
        Timothy Potter added a comment -

        Yes, we should get this in ... i'll run quick test later this evening and commit. Good catch and thanks for the patch David.

        Show
        Timothy Potter added a comment - Yes, we should get this in ... i'll run quick test later this evening and commit. Good catch and thanks for the patch David.
        Hide
        Hoss Man added a comment -

        FWIW: "Negative Length Value" is only supported since Bash 4.2

        http://wiki.bash-hackers.org/syntax/pe#negative_length_value

        (when reporting bugs with shell scripts, please, please include the output of /usr/bin/env bash -version

        Show
        Hoss Man added a comment - FWIW: "Negative Length Value" is only supported since Bash 4.2 http://wiki.bash-hackers.org/syntax/pe#negative_length_value (when reporting bugs with shell scripts, please, please include the output of /usr/bin/env bash -version
        Hide
        David Anderson added a comment -

        ahh ... thanks Chris for the link on the syntax change. And will do on version info for any future shell script jiras.

        Show
        David Anderson added a comment - ahh ... thanks Chris for the link on the syntax change. And will do on version info for any future shell script jiras.
        Hide
        ASF subversion and git services added a comment -

        Commit 1653601 from Timothy Potter in branch 'dev/trunk'
        [ https://svn.apache.org/r1653601 ]

        SOLR-6993: install_solr_service.sh won't install on RHEL / CentOS

        Show
        ASF subversion and git services added a comment - Commit 1653601 from Timothy Potter in branch 'dev/trunk' [ https://svn.apache.org/r1653601 ] SOLR-6993 : install_solr_service.sh won't install on RHEL / CentOS
        Hide
        ASF subversion and git services added a comment -

        Commit 1653602 from Timothy Potter in branch 'dev/branches/branch_5x'
        [ https://svn.apache.org/r1653602 ]

        SOLR-6993: install_solr_service.sh won't install on RHEL / CentOS

        Show
        ASF subversion and git services added a comment - Commit 1653602 from Timothy Potter in branch 'dev/branches/branch_5x' [ https://svn.apache.org/r1653602 ] SOLR-6993 : install_solr_service.sh won't install on RHEL / CentOS
        Hide
        ASF subversion and git services added a comment -

        Commit 1653603 from Timothy Potter in branch 'dev/branches/lucene_solr_5_0'
        [ https://svn.apache.org/r1653603 ]

        SOLR-6993: install_solr_service.sh won't install on RHEL / CentOS

        Show
        ASF subversion and git services added a comment - Commit 1653603 from Timothy Potter in branch 'dev/branches/lucene_solr_5_0' [ https://svn.apache.org/r1653603 ] SOLR-6993 : install_solr_service.sh won't install on RHEL / CentOS
        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:
            Timothy Potter
            Reporter:
            David Anderson
          • Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development