Thanks to visit codestin.com
Credit goes to github.com

Skip to content

使用tunnel client时应用的标准输出可能打印 java.io.IOException: Connection reset by peer #1717

@hengyunabc

Description

@hengyunabc

原因是直接调用了 cause.printStackTrace();

java.io.IOException: Connection reset by peer
	at sun.nio.ch.FileDispatcherImpl.read0(Native Method)
	at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:39)
	at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223)
	at sun.nio.ch.IOUtil.read(IOUtil.java:192)
	at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:384)
	at com.alibaba.arthas.deps.io.netty.buffer.PooledByteBuf.setBytes(PooledByteBuf.java:253)
	at com.alibaba.arthas.deps.io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:1134)
	at com.alibaba.arthas.deps.io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:350)
	at com.alibaba.arthas.deps.io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:151)
	at com.alibaba.arthas.deps.io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:719)
	at com.alibaba.arthas.deps.io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:655)
	at com.alibaba.arthas.deps.io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:581)
	at com.alibaba.arthas.deps.io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493)
	at com.alibaba.arthas.deps.io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
	at com.alibaba.arthas.deps.io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
	at com.alibaba.arthas.deps.io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
	at java.lang.Thread.run(Thread.java:748)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions