1
votes

I am upgrading the apache-storm version from 1.1.1 to 2.0.0. I have already made the necessary changes in my codebase and pom.xml. The whole project is building perfectly and topologies are starting too without any exceptions. But whenever I am staring storm ui getting the following stack trace

┌─[user@hostname] - [~/apps/apache-storm-2.0.0/bin] - [Tue Jul 30, 23:04]
└─[$] <> ./storm ui
Running: /home/user/apps/java8/jdk1.8.0_144/bin/java -server -Ddaemon.name=ui -Dstorm.options= -Dstorm.home=/home/user/apps/apache-storm-2.0.0 -Dstorm.log.dir=/home/user/apps/apache-storm-2.0.0/logs -Djava.library.path=/usr/local/lib:/opt/local/lib:/usr/lib:/usr/lib64 -Dstorm.conf.file= -cp /home/user/apps/apache-storm-2.0.0/*:/home/apcuser/apps/apache-storm-2.0.0/lib/*:/home/apcuser/apps/apache-storm-2.0.0/extlib/*:/home/apcuser/apps/apache-storm-2.0.0/extlib-daemon/*:/home/apcuser/apps/apache-storm-2.0.0/lib-webapp/*:/home/apcuser/apps/apache-storm-2.0.0/conf -Xmx768m -Djava.deserialization.disabled=true -Dlogfile.name=ui.log -Dlog4j.configurationFile=/home/apcuser/apps/apache-storm-2.0.0/log4j2/cluster.xml org.apache.storm.daemon.ui.UIServer
Exception in thread "main" java.lang.RuntimeException: javax.servlet.ServletException: org.glassfish.jersey.servlet.ServletContainer-37052337@3d3833dc==org.glassfish.jersey.servlet.ServletContainer,jsp=null,order=0,inst=false,async=true
    at org.apache.storm.daemon.ui.UIServer.main(UIServer.java:183)
Caused by: javax.servlet.ServletException: org.glassfish.jersey.servlet.ServletContainer-37052337@3d3833dc==org.glassfish.jersey.servlet.ServletContainer,jsp=null,order=0,inst=false,async=true
    at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:693)
    at org.eclipse.jetty.servlet.ServletHolder.initialize(ServletHolder.java:429)
    at org.eclipse.jetty.servlet.ServletHandler.lambda$initialize$0(ServletHandler.java:750)
    at java.util.stream.SortedOps$SizedRefSortingSink.end(SortedOps.java:352)
    at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)
    at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
    at java.util.stream.StreamSpliterators$WrappingSpliterator.forEachRemaining(StreamSpliterators.java:312)
    at java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Streams.java:743)
    at java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Streams.java:742)
    at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:580)
    at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:744)
    at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:368)
    at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:852)
    at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:278)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
    at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:138)
    at org.eclipse.jetty.server.Server.start(Server.java:415)
    at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:108)
    at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:113)
    at org.eclipse.jetty.server.Server.doStart(Server.java:382)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
    at org.apache.storm.daemon.ui.UIServer.main(UIServer.java:179)
Caused by: java.lang.reflect.MalformedParameterizedTypeException
    at sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl.validateConstructorArguments(ParameterizedTypeImpl.java:58)
    at sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl.<init>(ParameterizedTypeImpl.java:51)
    at sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl.make(ParameterizedTypeImpl.java:92)
    at sun.reflect.generics.factory.CoreReflectionFactory.makeParameterizedType(CoreReflectionFactory.java:105)
    at sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Reifier.java:140)
    at sun.reflect.generics.tree.ClassTypeSignature.accept(ClassTypeSignature.java:49)
    at sun.reflect.generics.repository.ClassRepository.getSuperInterfaces(ClassRepository.java:108)
    at java.lang.Class.getGenericInterfaces(Class.java:913)
    at org.glassfish.hk2.utilities.reflection.ReflectionHelper.getAllContractsFromInterfaces(ReflectionHelper.java:634)
    at org.glassfish.hk2.utilities.reflection.ReflectionHelper.getAdvertisedTypesFromClass(ReflectionHelper.java:619)
    at org.glassfish.hk2.utilities.reflection.ReflectionHelper.getAdvertisedTypesFromObject(ReflectionHelper.java:659)
    at org.glassfish.hk2.utilities.BuilderHelper.createConstantDescriptor(BuilderHelper.java:444)
    at org.glassfish.jersey.inject.hk2.Hk2Helper.translateToActiveDescriptor(Hk2Helper.java:336)
    at org.glassfish.jersey.inject.hk2.Hk2Helper.bindBinding(Hk2Helper.java:154)
    at org.glassfish.jersey.inject.hk2.Hk2Helper.bindBinding(Hk2Helper.java:137)
    at org.glassfish.jersey.inject.hk2.Hk2Helper.bind(Hk2Helper.java:100)
    at org.glassfish.jersey.inject.hk2.ImmediateHk2InjectionManager.register(ImmediateHk2InjectionManager.java:72)
    at org.glassfish.jersey.server.ApplicationConfigurator.init(ApplicationConfigurator.java:108)
    at org.glassfish.jersey.server.ApplicationHandler.lambda$initialize$0(ApplicationHandler.java:313)
    at java.util.Arrays$ArrayList.forEach(Arrays.java:3880)
    at org.glassfish.jersey.server.ApplicationHandler.initialize(ApplicationHandler.java:313)
    at org.glassfish.jersey.server.ApplicationHandler.<init>(ApplicationHandler.java:282)
    at org.glassfish.jersey.servlet.WebComponent.<init>(WebComponent.java:335)
    at org.glassfish.jersey.servlet.ServletContainer.init(ServletContainer.java:178)
    at org.glassfish.jersey.servlet.ServletContainer.init(ServletContainer.java:370)
    at javax.servlet.GenericServlet.init(GenericServlet.java:244)
    at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:672)
    ... 21 more

I have started Zookeeper, Storm Nimbus and Storm Supervisor in given order before starting the Storm UI.

Here are the jar versions of jersey

┌─[user@hostname] - [~/apps/apache-storm-2.0.0/lib-webapp] - [Tue Jul 30, 23:24]
└─[$] <> ls -lrt *jersey*
-rw-r--r-- 1 user user   21520 Jan 24  2019 jersey-bom-2.27.pom
-rw-r--r-- 1 user user   20041 Jan 24  2019 metrics-jersey2-4.0.2.jar
-rw-r--r-- 1 user user   27149 Jan 24  2019 jersey-container-grizzly2-http-2.27.jar
-rw-r--r-- 1 user user  110550 Jan 24  2019 dropwizard-jersey-1.3.5.jar
-rw-r--r-- 1 user user  933619 Jan 24  2019 jersey-server-2.27.jar
-rw-r--r-- 1 user user   71936 Jan 24  2019 jersey-media-jaxb-2.27.jar
-rw-r--r-- 1 user user   62547 Jan 24  2019 jersey-hk2-2.27.jar
-rw-r--r-- 1 user user   15996 Jan 24  2019 jersey-grizzly2-1.19.4.jar
-rw-r--r-- 1 user user   59332 Jan 24  2019 jersey-container-servlet-core-2.27.jar
-rw-r--r-- 1 user user   18085 Jan 24  2019 jersey-container-servlet-2.27.jar
-rw-r--r-- 1 user user    6996 Jan 24  2019 jersey-container-grizzly2-servlet-2.27.jar
-rw-r--r-- 1 user user 1140395 Jan 24  2019 jersey-common-2.27.jar
-rw-r--r-- 1 user user  181563 Jan 24  2019 jersey-client-2.27.jar
2

2 Answers

0
votes

You can start UI as soon as Zookeeper is running, you don't need to start Nimbus and the supervisors first.

Since you've upgraded from 1.x, I would try clearing out all the lib directories and reinstalling the Storm 2.0.0 jars.

Your Java version is also pretty old, try upgrading to the latest update for 8.

0
votes

Since our team is putting some other .jar into apache-storm/lib/. This issue was caused by some other jars which were not provided in base apache-storm/lib. After going through the dependency hierarchy, finally, I found the solution which works.

I needed to update the version of jars provided by

<groupId>org.apache.cxf</groupId>