Uploaded image for project: 'Sentry (Retired)'
  1. Sentry (Retired)
  2. SENTRY-2283

Multiple versions of metrics on the classpath causes Sentry to not startup

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.1.0
    • 2.1.0
    • Sentry
    • None

    Description

      When starting up Sentry in a cluster that has one or more Hadoop products installed, if there is a 2.x version of metrics-core.jar or metrics-servlet.jar on the classpath, it causes Sentry to fail during startup.

       

      entry-SENTRY_SERVER/sentry-log4j.properties -conffile /var/run/cloudera-scm-agent/process/51-sentry-SENTRY_SERVER/sentry-site.xml
      WARNING: log4j.properties is not found. HADOOP_CONF_DIR may be incomplete.
      Exception in thread "main" java.lang.NoSuchMethodError: com.codahale.metrics.JmxAttributeGauge.<init>(Ljavax/management/MBeanServerConnection;Ljavax/management/ObjectName;Ljava/lang/String;)V
      at com.codahale.metrics.jvm.BufferPoolMetricSet.getMetrics(BufferPoolMetricSet.java:45)
      at org.apache.sentry.api.service.thrift.SentryMetrics.registerMetricSet(SentryMetrics.java:273)
      at org.apache.sentry.api.service.thrift.SentryMetrics.<init>(SentryMetrics.java:137)
      at org.apache.sentry.api.service.thrift.SentryMetrics.getInstance(SentryMetrics.java:149)
      at org.apache.sentry.provider.db.service.persistent.TransactionManager.<init>(TransactionManager.java:84)
      at org.apache.sentry.provider.db.service.persistent.SentryStore.<init>(SentryStore.java:281)
      at org.apache.sentry.service.thrift.SentryService.<init>(SentryService.java:170)
      at org.apache.sentry.service.thrift.SentryService$CommandImpl.run(SentryService.java:581)
      at org.apache.sentry.SentryMain.main(SentryMain.java:120)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at org.apache.hadoop.util.RunJar.run(RunJar.java:313)
      at org.apache.hadoop.util.RunJar.main(RunJar.java:227)

      Attachments

        1. SENTRY-2283-003.patch
          16 kB
          Steve Moist
        2. SENTRY-2283-002.patch
          14 kB
          Steve Moist
        3. SENTRY-2283-001.patch
          12 kB
          Steve Moist

        Issue Links

          Activity

            People

              moist Steve Moist
              moist Steve Moist
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: