AgNO3 / jcifs-ng

A cleaned-up and improved version of the jCIFS library
GNU Lesser General Public License v2.1
318 stars 103 forks source link

Transport exception while reading data #253

Open felixRajkumar opened 3 years ago

felixRajkumar commented 3 years ago

Hi, I would like to know why these exceptions arrive and what are the conclusions we can arrive from this exception. What really does the Transport4497 represent and what can we infer from this "command=SMB2_READ,status=0,flags=0x0000,mid=8,wordCount=0,byteCount=49".Please note , there are no chained exceptions. Also will this issue occur, if ipv4 and ipv6 are enabled on server. I am using jcifs-ng 2.0.6.Thanks in Advance!

[00:06:03:558]|[10-29-2020]|[SYSERR]|[INFO]|[330]: jcifs.util.transport.TransportException: Transport4497 error reading response to command=SMB2_READ,status=0,flags=0x0000,mid=8,wordCount=0,byteCount=49| [00:06:03:558]|[10-29-2020]|[SYSERR]|[INFO]|[330]: at jcifs.util.transport.Transport.waitForResponses(Transport.java:351)| [00:06:03:558]|[10-29-2020]|[SYSERR]|[INFO]|[330]: at jcifs.util.transport.Transport.sendrecv(Transport.java:232)| [00:06:03:558]|[10-29-2020]|[SYSERR]|[INFO]|[330]: at jcifs.smb.SmbTransportImpl.sendrecv(SmbTransportImpl.java:978)| [00:06:03:558]|[10-29-2020]|[SYSERR]|[INFO]|[330]: at jcifs.smb.SmbTransportImpl.send(SmbTransportImpl.java:1475)| [00:06:03:558]|[10-29-2020]|[SYSERR]|[INFO]|[330]: at jcifs.smb.SmbSessionImpl.send(SmbSessionImpl.java:397)| [00:06:03:558]|[10-29-2020]|[SYSERR]|[INFO]|[330]: at jcifs.smb.SmbTreeImpl.send(SmbTreeImpl.java:465)| [00:06:03:558]|[10-29-2020]|[SYSERR]|[INFO]|[330]: at jcifs.smb.SmbTreeConnection.send0(SmbTreeConnection.java:399)| [00:06:03:558]|[10-29-2020]|[SYSERR]|[INFO]|[330]: at jcifs.smb.SmbTreeConnection.send(SmbTreeConnection.java:314)| [00:06:03:558]|[10-29-2020]|[SYSERR]|[INFO]|[330]: at jcifs.smb.SmbTreeConnection.send(SmbTreeConnection.java:294)| [00:06:03:558]|[10-29-2020]|[SYSERR]|[INFO]|[330]: at jcifs.smb.SmbTreeHandleImpl.send(SmbTreeHandleImpl.java:130)| [00:06:03:558]|[10-29-2020]|[SYSERR]|[INFO]|[330]: at jcifs.smb.SmbTreeHandleImpl.send(SmbTreeHandleImpl.java:117)| [00:06:03:558]|[10-29-2020]|[SYSERR]|[INFO]|[330]: at jcifs.smb.SmbFileInputStream.readDirect(SmbFileInputStream.java:331)| [00:06:03:558]|[10-29-2020]|[SYSERR]|[INFO]|[330]: at jcifs.smb.SmbFileInputStream.read(SmbFileInputStream.java:274)| [00:06:03:558]|[10-29-2020]|[SYSERR]|[INFO]|[330]: at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:284)| [00:06:03:558]|[10-29-2020]|[SYSERR]|[INFO]|[330]: at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:326)| [00:06:03:558]|[10-29-2020]|[SYSERR]|[INFO]|[330]: at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:178)| [00:06:03:558]|[10-29-2020]|[SYSERR]|[INFO]|[330]: at java.io.InputStreamReader.read(InputStreamReader.java:184)| [00:06:03:558]|[10-29-2020]|[SYSERR]|[INFO]|[330]: at java.io.BufferedReader.fill(BufferedReader.java:161)| [00:06:03:558]|[10-29-2020]|[SYSERR]|[INFO]|[330]: at java.io.BufferedReader.readLine(BufferedReader.java:324)| [00:06:03:558]|[10-29-2020]|[SYSERR]|[INFO]|[330]: at java.io.BufferedReader.readLine(BufferedReader.java:389)| [00:06:03:558]|[10-29-2020]|[SYSERR]|[INFO]|[330]: at com.manageengine.ela.server.importlog.protocols.ImportBufferedReader.readImportLine(ImportBufferedReader.java:49)| [00:06:03:558]|[10-29-2020]|[SYSERR]|[INFO]|[330]: at com.manageengine.ela.server.importlog.LogBuilder.open(LogBuilder.java:180)| [00:06:03:558]|[10-29-2020]|[SYSERR]|[INFO]|[330]: at com.manageengine.ela.server.importlog.processors.BaseLogProcessor.processNewSource(BaseLogProcessor.java:158)| [00:06:03:558]|[10-29-2020]|[SYSERR]|[INFO]|[330]: at com.manageengine.ela.server.importlog.processors.BaseLogProcessor.process(BaseLogProcessor.java:77)| [00:06:03:558]|[10-29-2020]|[SYSERR]|[INFO]|[330]: at com.manageengine.ela.server.importlog.processors.BaseLogProcessor.process(BaseLogProcessor.java:46)| [00:06:03:558]|[10-29-2020]|[SYSERR]|[INFO]|[330]: at com.manageengine.ela.server.common.executors.processor.CommonQueueProcessor.run(CommonQueueProcessor.java:68)| [00:06:03:558]|[10-29-2020]|[SYSERR]|[INFO]|[330]: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)| [00:06:03:558]|[10-29-2020]|[SYSERR]|[INFO]|[330]: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)| [00:06:03:558]|[10-29-2020]|[SYSERR]|[INFO]|[330]: at java.lang.Thread.run(Thread.java:745)| [00:06:03:558]|[10-29-2020]|[SYSERR]|[INFO]|[330]: Caused by: java.net.SocketException: Unrecognized Windows Sockets error: 0: recv failed| [00:06:03:558]|[10-29-2020]|[SYSERR]|[INFO]|[330]: at java.net.SocketInputStream.socketRead0(Native Method)| [00:06:03:558]|[10-29-2020]|[SYSERR]|[INFO]|[330]: at java.net.SocketInputStream.socketRead(SocketInputStream.java:116)| [00:06:03:558]|[10-29-2020]|[SYSERR]|[INFO]|[330]: at java.net.SocketInputStream.read(SocketInputStream.java:170)| [00:06:03:558]|[10-29-2020]|[SYSERR]|[INFO]|[330]: at java.net.SocketInputStream.read(SocketInputStream.java:141)| [00:06:03:558]|[10-29-2020]|[SYSERR]|[INFO]|[330]: at jcifs.util.transport.Transport.readn(Transport.java:70)| [00:06:03:558]|[10-29-2020]|[SYSERR]|[INFO]|[330]: at jcifs.smb.SmbTransportImpl.peekKey(SmbTransportImpl.java:783)| [00:06:03:558]|[10-29-2020]|[SYSERR]|[INFO]|[330]: at jcifs.util.transport.Transport.loop(Transport.java:420)| [00:06:03:558]|[10-29-2020]|[SYSERR]|[INFO]|[330]: at jcifs.util.transport.Transport.run(Transport.java:762)| [00:06:03:558]|[10-29-2020]|[SYSERR]|[INFO]|[330]: ... 1 more| [00:06:03:558]|[10-29-2020]|[SYSERR]|[INFO]|[330]: Status Code 0x1a07: IO operation failed| [00:06:03:558]|[10-29-2020]|[SYSERR]|[INFO]|[330]: at com.manageengine.ela.server.common.response.BaseStatusCode.getBaseStatusCode(BaseStatusCode.java:90)| [00:06:03:558]|[10-29-2020]|[SYSERR]|[INFO]|[330]: at com.manageengine.ela.server.common.response.BaseStatusCode.getBaseStatusCode(BaseStatusCode.java:82)| [00:06:03:558]|[10-29-2020]|[SYSERR]|[INFO]|[330]: at com.manageengine.ela.server.importlog.LogBuilder.open(LogBuilder.java:238)| [00:06:03:558]|[10-29-2020]|[SYSERR]|[INFO]|[330]: at com.manageengine.ela.server.importlog.processors.BaseLogProcessor.processNewSource(BaseLogProcessor.java:158)| [00:06:03:558]|[10-29-2020]|[SYSERR]|[INFO]|[330]: at com.manageengine.ela.server.importlog.processors.BaseLogProcessor.process(BaseLogProcessor.java:77)| [00:06:03:558]|[10-29-2020]|[SYSERR]|[INFO]|[330]: at com.manageengine.ela.server.importlog.processors.BaseLogProcessor.process(BaseLogProcessor.java:46)| [00:06:03:558]|[10-29-2020]|[SYSERR]|[INFO]|[330]: at com.manageengine.ela.server.common.executors.processor.CommonQueueProcessor.run(CommonQueueProcessor.java:68)| [00:06:03:558]|[10-29-2020]|[SYSERR]|[INFO]|[330]: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)| [00:06:03:558]|[10-29-2020]|[SYSERR]|[INFO]|[330]: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)| [00:06:03:558]|[10-29-2020]|[SYSERR]|[INFO]|[330]: at java.lang.Thread.run(Thread.java:745)|

These are the properties, I have used for SMB2 Configuration.

Properties prop = new Properties(); prop.putAll(System.getProperties()); prop.put("jcifs.smb.client.enableSMB2","true"); prop.put("jcifs.smb.client.maxVersion","SMB210"); prop.put("jcifs.smb.client.minVersion","SMB1");

mbechler commented 3 years ago

"Unrecognized Windows Sockets error: 0: recv failed" is really unspecific, either this is some low level system error or something is messing up the error reporting. You'll need to figure out what the socket error is actually supposed to be. Could be a timeout or the remote server could be closing the connection. Network capture might help.

Also, please try with a current version.