为了账号安全,请及时绑定邮箱和手机立即绑定

Failed to initialize a channel. Closing: [id: 0x1bd7c1d4, /0:0:0:0:0:0:0:1:56640 => /0:0:0:0:0:0:0:1:8888]


六月 19, 2018 1:49:25 下午 io.netty.channel.ChannelInitializer channelRegistered
警告: Failed to initialize a channel. Closing: [id: 0x1bd7c1d4, /0:0:0:0:0:0:0:1:56640 => /0:0:0:0:0:0:0:1:8888]
java.lang.IllegalArgumentException: Duplicate handler name: aggregator
 at io.netty.channel.DefaultChannelPipeline.checkDuplicateName(DefaultChannelPipeline.java:949)
 at io.netty.channel.DefaultChannelPipeline.addLast(DefaultChannelPipeline.java:141)
 at io.netty.channel.DefaultChannelPipeline.addLast(DefaultChannelPipeline.java:130)
 at xzx.MyWebSocketChannelHandler.initChannel(MyWebSocketChannelHandler.java:14)
 at xzx.MyWebSocketChannelHandler.initChannel(MyWebSocketChannelHandler.java:10)
 at io.netty.channel.ChannelInitializer.channelRegistered(ChannelInitializer.java:69)
 at io.netty.channel.ChannelHandlerInvokerUtil.invokeChannelRegisteredNow(ChannelHandlerInvokerUtil.java:30)
 at io.netty.channel.DefaultChannelHandlerInvoker.invokeChannelRegistered(DefaultChannelHandlerInvoker.java:49)
 at io.netty.channel.DefaultChannelHandlerContext.fireChannelRegistered(DefaultChannelHandlerContext.java:285)
 at io.netty.channel.ChannelInitializer.channelRegistered(ChannelInitializer.java:71)
 at io.netty.channel.ChannelHandlerInvokerUtil.invokeChannelRegisteredNow(ChannelHandlerInvokerUtil.java:30)
 at io.netty.channel.DefaultChannelHandlerInvoker.invokeChannelRegistered(DefaultChannelHandlerInvoker.java:49)
 at io.netty.channel.DefaultChannelHandlerContext.fireChannelRegistered(DefaultChannelHandlerContext.java:285)
 at io.netty.channel.DefaultChannelPipeline.fireChannelRegistered(DefaultChannelPipeline.java:801)
 at io.netty.channel.AbstractChannel$AbstractUnsafe.register0(AbstractChannel.java:427)
 at io.netty.channel.AbstractChannel$AbstractUnsafe.access$100(AbstractChannel.java:369)
 at io.netty.channel.AbstractChannel$AbstractUnsafe$1.run(AbstractChannel.java:403)
 at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:318)
 at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:353)
 at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:794)
 at java.lang.Thread.run(Thread.java:745)


正在回答

4 回答

pipeline.addLast("handler", new MyWebSocketHandler()); 之前写成pipeline.addLast("handler", new MyWebSocketChannelHandler()); 了,结果报的重复的问题。改了就好了

1 回复 有任何疑惑可以回复我~

我也是这个问题,换了

5.0.0.Alpha2

就报这个错误,不知道该怎么解决

0 回复 有任何疑惑可以回复我~

你好,请问找到原因了吗?

0 回复 有任何疑惑可以回复我~

aggregator 这个 handler 你加了2次吧

0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

Failed to initialize a channel. Closing: [id: 0x1bd7c1d4, /0:0:0:0:0:0:0:1:56640 => /0:0:0:0:0:0:0:1:8888]

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信