在Apache Spark中启动主机时无法从类io.netty.channel.socket.nio.NioServerSocketChannel类创建Channel

时间:2018-07-23 14:28:14

标签: apache-spark netty

这就是我尝试在runMaster.sh中使用spark启动主服务器时得到的:

  

07:21:23.613 [main]调试io.netty.util.internal.ThreadLocalRandom--Dio.netty.initialSeedUniquifier:0xb1b69a9d4b332f61(耗时0毫秒)   线程“主要” io.netty.channel.ChannelException中的异常:无法从类io.netty.channel.socket.nio.NioServerSocketChannel类创建Channel           在io.netty.bootstrap.AbstractBootstrap $ BootstrapChannelFactory.newChannel(AbstractBootstrap.java:457)           在io.netty.bootstrap.AbstractBootstrap.initAndRegister(AbstractBootstrap.java:308)           在io.netty.bootstrap.AbstractBootstrap.doBind(AbstractBootstrap.java:272)           在io.netty.bootstrap.AbstractBootstrap.bind(AbstractBootstrap.java:268)           在org.apache.spark.network.server.TransportServer.init(TransportServer.java:129)           在org.apache.spark.network.server.TransportServer。(TransportServer.java:74)           在org.apache.spark.network.TransportContext.createServer(TransportContext.java:114)           在org.apache.spark.rpc.netty.NettyRpcEnv.startServer(NettyRpcEnv.scala:118)           在org.apache.spark.rpc.netty.NettyRpcEnvFactory $$ anonfun $ 4.apply(NettyRpcEnv.scala:446)           在org.apache.spark.rpc.netty.NettyRpcEnvFactory $$ anonfun $ 4.apply(NettyRpcEnv.scala:445)           在org.apache.spark.util.Utils $$ anonfun $ startServiceOnPort $ 1.apply $ mcVI $ sp(Utils.scala:2213)           在scala.collection.immutable.Range.foreach $ mVc $ sp(Range.scala:160)           在org.apache.spark.util.Utils $ .startServiceOnPort(Utils.scala:2204)           在org.apache.spark.rpc.netty.NettyRpcEnvFactory.create(NettyRpcEnv.scala:450)           在org.apache.spark.rpc.RpcEnv $ .create(RpcEnv.scala:56)           在org.apache.spark.rpc.RpcEnv $ .create(RpcEnv.scala:43)           在org.apache.spark.deploy.master.Master $ .startRpcEnvAndEndpoint(Master.scala:1046)           在org.apache.spark.deploy.master.Master $ .main(Master.scala:1030)           在org.apache.spark.deploy.master.Master.main(Master.scala)   引起原因:java.lang.NoSuchMethodError:io.netty.util.internal.PlatformDependent.newAtomicIntegerFieldUpdater(Ljava / lang / Class; Ljava / lang / String;)Ljava / util / concurrent / atomic / AtomicIntegerFieldUpdater;           在io.netty.channel.ChannelOutboundBuffer。(ChannelOutboundBuffer.java:95)           在io.netty.channel.AbstractChannel $ AbstractUnsafe。处(AbstractChannel.java:370)           在io.netty.channel.nio.AbstractNioChannel $ AbstractNioUnsafe。(AbstractNioChannel.java:172)           在io.netty.channel.nio.AbstractNioMessageChannel $ NioMessageUnsafe。(AbstractNioMessageChannel.java:48)           在io.netty.channel.nio.AbstractNioMessageChannel $ NioMessageUnsafe。(AbstractNioMessageChannel.java:48)           在io.netty.channel.nio.AbstractNioMessageChannel.newUnsafe(AbstractNioMessageChannel.java:45)           在io.netty.channel.nio.AbstractNioMessageChannel.newUnsafe(AbstractNioMessageChannel.java:34)           在io.netty.channel.AbstractChannel。(AbstractChannel.java:80)           在io.netty.channel.nio.AbstractNioChannel。(AbstractNioChannel.java:82)           在io.netty.channel.nio.AbstractNioMessageChannel。(AbstractNioMessageChannel.java:40)           在io.netty.channel.socket.nio.NioServerSocketChannel。(NioServerSocketChannel.java:84)           在io.netty.channel.socket.nio.NioServerSocketChannel。(NioServerSocketChannel.java:70)           在sun.reflect.NativeConstructorAccessorImpl.newInstance0(本机方法)处           在sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)           在sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)           在java.lang.reflect.Constructor.newInstance(Constructor.java:423)           在java.lang.Class.newInstance(Class.java:442)           在io.netty.bootstrap.AbstractBootstrap $ BootstrapChannelFactory.newChannel(AbstractBootstrap.java:455)           ...另外18个

1 个答案:

答案 0 :(得分:1)

好像您在类路径上有不同版本的netty工件。确保所有这些都使用相同的版本。