学习 Zeppelin(四): Trouble Shooting

Helium 初始化失败导致 Zeppelin Server 无法启动

在启动 Zeppelin 服务初始化 Helium 过程中,添加 Helium Registry 时,因无法访问 AWS 导致 Zeppelin 服务启动失败。

日志:

 INFO [2019-07-26 10:47:47,674] ({main} Helium.java[loadConf]:103) - Add helium local registry /home/lizhen-db/app/zeppelin/helium
 INFO [2019-07-26 10:47:47,675] ({main} Helium.java[loadConf]:100) - Add helium online registry https://s3.amazonaws.com/helium-package/helium.json

异常堆栈:

com.google.gson.JsonSyntaxException: java.net.SocketException: Connection reset  
    at com.google.gson.Gson.fromJson(Gson.java:805)
    at com.google.gson.Gson.fromJson(Gson.java:757)
    at org.apache.zeppelin.helium.HeliumOnlineRegistry.getAll(HeliumOnlineRegistry.java:95)
    at org.apache.zeppelin.helium.Helium.getAllPackageInfo(Helium.java:170)
    at org.apache.zeppelin.helium.Helium.getAllPackageInfo(Helium.java:155)
    at org.apache.zeppelin.helium.Helium.<init>(Helium.java:70)
    at org.apache.zeppelin.server.ZeppelinServer.<init>(ZeppelinServer.java:176)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
    at org.glassfish.hk2.utilities.reflection.ReflectionHelper.makeMe(ReflectionHelper.java:1375)
    at org.jvnet.hk2.internal.Utilities.justCreate(Utilities.java:1083)
    at org.jvnet.hk2.internal.ServiceLocatorImpl.create(ServiceLocatorImpl.java:978)
    at org.jvnet.hk2.internal.ServiceLocatorImpl.createAndInitialize(ServiceLocatorImpl.java:1082)
    at org.jvnet.hk2.internal.ServiceLocatorImpl.createAndInitialize(ServiceLocatorImpl.java:1074)
    at org.glassfish.jersey.inject.hk2.AbstractHk2InjectionManager.createAndInitialize(AbstractHk2InjectionManager.java:213)
    at org.glassfish.jersey.inject.hk2.ImmediateHk2InjectionManager.createAndInitialize(ImmediateHk2InjectionManager.java:54)
    at org.glassfish.jersey.server.ApplicationConfigurator.createApplication(ApplicationConfigurator.java:138)
    at org.glassfish.jersey.server.ApplicationConfigurator.init(ApplicationConfigurator.java:96)
    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)
    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.webapp.WebAppContext.startWebapp(WebAppContext.java:1497)
    at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1459)
    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.webapp.WebAppContext.doStart(WebAppContext.java:545)
    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.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:117)
    at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:113)
    at org.eclipse.jetty.server.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:168)
    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.zeppelin.server.ZeppelinServer.main(ZeppelinServer.java:241)

解决方案:

覆盖 Helium Register 默认配置。编辑 zeppelin-site.xml 文件:

<property>  
  <name>zeppelin.helium.registry</name>
  <value>helium</value>
</property>