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

Solr.cmd script typo in delete section

    Details

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

      MS Windows Server 2012 R2
      Solr 6.4.2

      Description

      Behavior: Open a command line, go to solr bin directory and execute the following command: solr.cmd delete -collection gettingstarted
      A messagem appears "Usage: java [-options] class [args...]..." meaning there's a syntatic error.

      Problem: In line 1380 of solr.cmd the char "^" is supposed to act as a line break, but since it's not the last char in that line (a white space is) windows shell script doesn't concatenate the lines that follow, rendering the java command incomplete.

      "%JAVA%" %SOLR_SSL_OPTS% %AUTHC_OPTS% %SOLR_ZK_CREDS_AND_ACLS% -Dsolr.install.dir="%SOLR_TIP%" ^
      -Dlog4j.configuration="file:%DEFAULT_SERVER_DIR%\scripts\cloud-scripts\log4j.properties" ^
      -classpath "%DEFAULT_SERVER_DIR%\solr-webapp\webapp\WEB-INF\lib*;%DEFAULT_SERVER_DIR%\lib\ext*" ^
      org.apache.solr.util.SolrCLI delete -name Unable to render embedded object: File (DELETE_NAME) not found. -deleteConfig Unable to render embedded object: File (DELETE_CONFIG) not found. ^
      -solrUrl Unable to render embedded object: File (SOLR_URL_SCHEME) not found.://%SOLR_TOOL_HOST%:Unable to render embedded object: File (DELETE_PORT) not found./solr

      Same problem also exists in lines 1148 and 1188.

      Proposed correction: remove the white space after the "^" char in lines 1148, 1188 and 1380.

        Activity

        Hide
        erickerickson Erick Erickson added a comment -

        Could you provide a patch?

        Show
        erickerickson Erick Erickson added a comment - Could you provide a patch?
        Hide
        lmgoes Luis Goes added a comment -

        I confirm the issue also extends to version 6.5.0. Not sure if this patch is in the right format and whether it will cascade to subsequent versions of 6.4.2.

        Show
        lmgoes Luis Goes added a comment - I confirm the issue also extends to version 6.5.0. Not sure if this patch is in the right format and whether it will cascade to subsequent versions of 6.4.2.
        Hide
        janhoy Jan Høydahl added a comment -

        The bug causes bin\solr.cmd delete and bin\solr.cmd healthcheck to fail.
        Going to commit to master, branch_6x and branch_6_5 (in case of a future 6.5.1 release)

        Show
        janhoy Jan Høydahl added a comment - The bug causes bin\solr.cmd delete and bin\solr.cmd healthcheck to fail. Going to commit to master, branch_6x and branch_6_5 (in case of a future 6.5.1 release)
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 68eb078af854fbb923dee4a93541c7ff0fd0b982 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=68eb078 ]

        SOLR-10369: bin\solr.cmd delete and healthcheck now works again (fixed continuation chars ^)

        Show
        jira-bot ASF subversion and git services added a comment - Commit 68eb078af854fbb923dee4a93541c7ff0fd0b982 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=68eb078 ] SOLR-10369 : bin\solr.cmd delete and healthcheck now works again (fixed continuation chars ^)
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 15a04fe4ff0331933344c80e83e1268f01e6f796 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=15a04fe ]

        SOLR-10369: bin\solr.cmd delete and healthcheck now works again (fixed continuation chars ^)

        (cherry picked from commit 68eb078)

        Show
        jira-bot ASF subversion and git services added a comment - Commit 15a04fe4ff0331933344c80e83e1268f01e6f796 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=15a04fe ] SOLR-10369 : bin\solr.cmd delete and healthcheck now works again (fixed continuation chars ^) (cherry picked from commit 68eb078)
        Hide
        janhoy Jan Høydahl added a comment -

        Tested on windows 10. Precommit passes. Thanks Luis!

        Show
        janhoy Jan Høydahl added a comment - Tested on windows 10. Precommit passes. Thanks Luis!
        Hide
        jira-bot ASF subversion and git services added a comment -

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

        SOLR-10369: bin\solr.cmd delete and healthcheck now works again (fixed continuation chars ^)

        (cherry picked from commit 68eb078)

        Show
        jira-bot ASF subversion and git services added a comment - Commit 28a2d6b3f64d97045defeaea97cc947f87135acf in lucene-solr's branch refs/heads/branch_6_5 from Jan Høydahl [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=28a2d6b ] SOLR-10369 : bin\solr.cmd delete and healthcheck now works again (fixed continuation chars ^) (cherry picked from commit 68eb078)

          People

          • Assignee:
            janhoy Jan Høydahl
            Reporter:
            lmgoes Luis Goes
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development