Support Questions
Find answers, ask questions, and share your expertise

storm ambari-metrics-storm-sink not correctly installed (missing symlink)

storm ambari-metrics-storm-sink not correctly installed (missing symlink)

Explorer

Hallo,

I did recently an upgrade from HDP 2.2 to HDP 2.6. Storm has received a major upgrade. And it looks like as there are some thinks which haven't been migrated correctly.

When I start a a storm topology I always get an error like this :

Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.metrics2.sink.storm.StormTimelineMetricsSink
        at java.net.URLClassLoader$1.run(URLClassLoader.java:366) ~[?:1.7.0_111]
        at java.net.URLClassLoader$1.run(URLClassLoader.java:355) ~[?:1.7.0_111]
        at java.security.AccessController.doPrivileged(Native Method) ~[?:1.7.0_111]
        at java.net.URLClassLoader.findClass(URLClassLoader.java:354) ~[?:1.7.0_111]
        at java.lang.ClassLoader.loadClass(ClassLoader.java:425) ~[?:1.7.0_111]
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) ~[?:1.7.0_111]
        at java.lang.ClassLoader.loadClass(ClassLoader.java:358) ~[?:1.7.0_111]
        at java.lang.Class.forName0(Native Method) ~[?:1.7.0_111]
        at java.lang.Class.forName(Class.java:195) ~[?:1.7.0_111]
        at org.apache.storm.metric.MetricsConsumerBolt.prepare(MetricsConsumerBolt.java:70) ~[storm-core-1.1.0.2.6.2.0-205.jar:1.1.0.2.6.2.0-205]


As you can see the topology does not find the class from one of the following jars :

ambari-metrics-storm-sink-with-common-2.5.2.0.298.jar
ambari-metrics-storm-sink-legacy-with-common-2.5.2.0.298.jar

But : The jars are not included in the classpath, And : As described in this article, the symlike does not exist. Who should create the symlink ?

/usr/hdp/current/storm-client/lib/ambari-metrics-storm-sink-with-common-2.5.2.0.298.jar -> /usr/lib/storm/lib/ambari-metrics-storm-sink-with-common-2.5.2.0.298.jar

Does anyone have an idea how I get this this running ? I can just recreate the symlink, but it looks like that there are some thinks missing.

Or : Should I remove the lines from the storm config used for the metrics system ?

Thanks in advance

Kind regards

Manfred PAUL

1 REPLY 1

Re: storm ambari-metrics-storm-sink not correctly installed (missing symlink)

Super Mentor

@Manfred PAUL

Looks like during the upgrade some how the symlink creation got skipped or failed.

But if you will create the link manually then it should work fine as Ambari Metrics collector looks for that symlink as following:

# ls -l /usr/hdp/current/storm-client/lib/ambari-metrics-storm-sink.jar
/usr/hdp/current/storm-client/lib/ambari-metrics-storm-sink.jar -> /usr/lib/storm/lib/ambari-metrics-storm-sink-with-common-2.5.2.0.298.jar


# ls -l /usr/lib/storm/lib/ambari-metrics-storm-sink-with-common-2.5.2.0.298.jar

.

So creating the symlink as following should be OK

# ln -s /usr/lib/storm/lib/ambari-metrics-storm-sink-with-common-2.5.2.0.298.jar /usr/hdp/current/storm-client/lib/ambari-metrics-storm-sink.jar

.