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

Solr zkcli script failing with 'ClassNotFound' in 6.4.2

    Details

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

      Description

      Solr's zkcli script failing with 'ClassNotFound' error

      /opt/solr-dists/solr-6.4.2/server/scripts/cloud-scripts/zkcli.sh -zkhost localhost:9983/test -cmd bootstrap -solrhome /opt/solr-dists/solr-6.4.2/server/solr
      Exception in thread "main" java.lang.NoClassDefFoundError: com/codahale/metrics/Metric
          at org.apache.solr.cloud.ZkCLI.main(ZkCLI.java:199)
      Caused by: java.lang.ClassNotFoundException: com.codahale.metrics.Metric
          at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
          at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
          at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
          at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
          ... 1 more
      
      1. SOLR-10302.patch
        0.7 kB
        Ishan Chattopadhyaya

        Activity

        Hide
        ichattopadhyaya Ishan Chattopadhyaya added a comment -

        The server/lib directory contains the metrics jars. Maybe the attached patch would work. Can you please test this?

        Show
        ichattopadhyaya Ishan Chattopadhyaya added a comment - The server/lib directory contains the metrics jars. Maybe the attached patch would work. Can you please test this?
        Hide
        kiranch kiran added a comment -

        +1 this fixes the issue for zkcli.sh. Maybe, we need a similar fix for the windows file ?

        Show
        kiranch kiran added a comment - +1 this fixes the issue for zkcli.sh. Maybe, we need a similar fix for the windows file ?
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit d5408c5d069efa72841254729e79ad8c6c0d3ef6 in lucene-solr's branch refs/heads/branch_6x from Ishan Chattopadhyaya
        [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=d5408c5 ]

        SOLR-10302: Solr's zkcli scripts now able to find the metrics libraries

        Show
        jira-bot ASF subversion and git services added a comment - Commit d5408c5d069efa72841254729e79ad8c6c0d3ef6 in lucene-solr's branch refs/heads/branch_6x from Ishan Chattopadhyaya [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=d5408c5 ] SOLR-10302 : Solr's zkcli scripts now able to find the metrics libraries
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit d82573704856fea7fe3980e9f4c0b995fafb718f in lucene-solr's branch refs/heads/master from Ishan Chattopadhyaya
        [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=d825737 ]

        SOLR-10302: Solr's zkcli scripts now able to find the metrics libraries

        Show
        jira-bot ASF subversion and git services added a comment - Commit d82573704856fea7fe3980e9f4c0b995fafb718f in lucene-solr's branch refs/heads/master from Ishan Chattopadhyaya [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=d825737 ] SOLR-10302 : Solr's zkcli scripts now able to find the metrics libraries
        Hide
        ichattopadhyaya Ishan Chattopadhyaya added a comment -

        Maybe, we need a similar fix for the windows file ?

        Indeed, committed (but not tested) a fix for the windows script as well.
        Thanks for reporting.

        Show
        ichattopadhyaya Ishan Chattopadhyaya added a comment - Maybe, we need a similar fix for the windows file ? Indeed, committed (but not tested) a fix for the windows script as well. Thanks for reporting.
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit f6f7eb3e4170c7a767f8cb9983ed0a4669beacce in lucene-solr's branch refs/heads/branch_6_4 from Ishan Chattopadhyaya
        [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=f6f7eb3 ]

        SOLR-10302: Solr's zkcli scripts now able to find the metrics libraries

        Show
        jira-bot ASF subversion and git services added a comment - Commit f6f7eb3e4170c7a767f8cb9983ed0a4669beacce in lucene-solr's branch refs/heads/branch_6_4 from Ishan Chattopadhyaya [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=f6f7eb3 ] SOLR-10302 : Solr's zkcli scripts now able to find the metrics libraries
        Hide
        ichattopadhyaya Ishan Chattopadhyaya added a comment -

        Reopening for backporting to 6.4.3, in case we ever have a release.

        Show
        ichattopadhyaya Ishan Chattopadhyaya added a comment - Reopening for backporting to 6.4.3, in case we ever have a release.

          People

          • Assignee:
            ichattopadhyaya Ishan Chattopadhyaya
            Reporter:
            kiranch kiran
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development