Closed kamaljeetrathi closed 7 years ago
I also saw this issue. It keeps stuck at the session even after command execution is finished.
I am facing the same problem. Can you please let me know how to fix this issue.
I expect this will be fixed by https://github.com/cloudsoft/winrm4j/pull/43.
same here
Fixed in the just released winrm4j 0.5.0.
Hi, I am using the cloudsoft/winrm4j version 0.3.5 library.In this I am creating a client as below. WinRmTool client = builder.build();
There is no method on client to stop the connection.After few seconds of command execution it gives me an error as below.
15:46:04.733 [I/O dispatcher 2] DEBUG o.a.h.i.n.client.InternalIODispatch - http-outgoing-1 [ACTIVE] Exception java.io.IOException: Connection reset by peer at sun.nio.ch.FileDispatcherImpl.read0(Native Method) ~[na:1.8.0_91] at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:39) ~[na:1.8.0_91] at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223) ~[na:1.8.0_91] at sun.nio.ch.IOUtil.read(IOUtil.java:197) ~[na:1.8.0_91] at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:380) ~[na:1.8.0_91] at org.apache.http.impl.nio.conn.LoggingIOSession$LoggingByteChannel.read(LoggingIOSession.java:204) ~[httpasyncclient-4.1.jar:4.1] at org.apache.http.impl.nio.reactor.SessionInputBufferImpl.fill(SessionInputBufferImpl.java:206) ~[httpcore-nio-4.4.1.jar:4.4.1] at org.apache.http.impl.nio.codecs.AbstractMessageParser.fillBuffer(AbstractMessageParser.java:138) ~[httpcore-nio-4.4.1.jar:4.4.1] at org.apache.http.impl.nio.DefaultNHttpClientConnection.consumeInput(DefaultNHttpClientConnection.java:243) ~[httpcore-nio-4.4.1.jar:4.4.1] at org.apache.http.impl.nio.client.InternalIODispatch.onInputReady(InternalIODispatch.java:81) [httpasyncclient-4.1.jar:4.1] at org.apache.http.impl.nio.client.InternalIODispatch.onInputReady(InternalIODispatch.java:39) [httpasyncclient-4.1.jar:4.1] at org.apache.http.impl.nio.reactor.AbstractIODispatch.inputReady(AbstractIODispatch.java:116) [httpcore-nio-4.4.1.jar:4.4.1] at org.apache.http.impl.nio.reactor.BaseIOReactor.readable(BaseIOReactor.java:164) [httpcore-nio-4.4.1.jar:4.4.1] at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvent(AbstractIOReactor.java:339) [httpcore-nio-4.4.1.jar:4.4.1] at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvents(AbstractIOReactor.java:317) [httpcore-nio-4.4.1.jar:4.4.1] at org.apache.http.impl.nio.reactor.AbstractIOReactor.execute(AbstractIOReactor.java:278) [httpcore-nio-4.4.1.jar:4.4.1] at org.apache.http.impl.nio.reactor.BaseIOReactor.execute(BaseIOReactor.java:106) [httpcore-nio-4.4.1.jar:4.4.1] at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor$Worker.run(AbstractMultiworkerIOReactor.java:590) [httpcore-nio-4.4.1.jar:4.4.1] at java.lang.Thread.run(Thread.java:745) [na:1.8.0_91] 15:46:04.733 [I/O dispatcher 2] DEBUG o.a.h.i.n.c.ManagedNHttpClientConnectionImpl - http-outgoing-1 192.168.2.113:55594<->192.168.2.58:5985[ACTIVE][r:r]: Shutdown 15:46:04.733 [I/O dispatcher 2] DEBUG o.a.h.i.n.client.InternalIODispatch - http-outgoing-1 [CLOSED]: Disconnected
Can you please help me out in this.