Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8278539

FTP Explicit PROT P, Zero byte file transfer Error

XMLWordPrintable

      A DESCRIPTION OF THE PROBLEM :
      I am trying to perform FTP transfer using Explicit PROT P communication. It is working fine with all the files except blank (zero byte) file. I am getting the below error trace -

      javax.net.ssl.SSLHandshakeException: Remote host terminated the handshake
              at java.base/sun.security.ssl.SSLSocketImpl.handleEOF(Unknown Source)
              at java.base/sun.security.ssl.SSLSocketImpl.decode(Unknown Source)
              at java.base/sun.security.ssl.SSLSocketImpl.readHandshakeRecord(Unknown Source)
              at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
              at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
              at securelink.ftp.server.FTPDConnection.buildDataConnection(FTPDConnection.java:374)
              at securelink.ftp.server.FTPDConnection.storInternal(FTPDConnection.java:1313)
              at securelink.ftp.server.FTPDConnection.STOR(FTPDConnection.java:1265)
              at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
              at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
              at java.base/java.lang.reflect.Method.invoke(Unknown Source)
              at securelink.ftp.server.FTPDConnection.run(FTPDConnection.java:675)
      Caused by: java.io.EOFException: SSL peer shut down incorrectly
              at java.base/sun.security.ssl.SSLSocketInputRecord.read(Unknown Source)
              at java.base/sun.security.ssl.SSLSocketInputRecord.readHeader(Unknown Source)
              at java.base/sun.security.ssl.SSLSocketInputRecord.decode(Unknown Source)
              at java.base/sun.security.ssl.SSLTransport.decode(Unknown Source)
              ... 12 more

      After checking the class SSLSocketInputRecord, the method decode() which is being executed as per the trace, It is written that it reads the data bytes from the input stream and if the bytes are < 0 then it throws new EOFException("SSL peer shut down incorrectly").


      So is this the default behavior or this is a bug that has been fixed in the latest release. If the issue is resolved then please specify the release of it.


      FREQUENCY : always


            Unassigned Unassigned
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: