title: What is the cause of the error "Remote host closed connection during handshake"?
body: <p>I want connect to the Oracle database 11.2 with SSL. But the only error that I receive is:</p>
  
  <pre><code>Exception in thread "main" java.sql.SQLException: I/O-Fehler: Remote host closed connection during handshake
      at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:465)
      at oracle.jdbc.driver.PhysicalConnection.&lt;init&gt;(PhysicalConnection.java:534)
      at oracle.jdbc.driver.T4CConnection.&lt;init&gt;(T4CConnection.java:217)
      at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:28)
      at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:527)
      at java.sql.DriverManager.getConnection(DriverManager.java:582)
      at java.sql.DriverManager.getConnection(DriverManager.java:154)
      at TestOracle.testSSL(TestOracle.java:157)
      at TestOracle.main(TestOracle.java:131)
  Caused by: javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
      at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:808)
      at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1112)
      at com.sun.net.ssl.internal.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:623)
      at com.sun.net.ssl.internal.ssl.AppOutputStream.write(AppOutputStream.java:59)
      at oracle.net.ns.Packet.send(Packet.java:420)
      at oracle.net.ns.ConnectPacket.send(ConnectPacket.java:169)
      at oracle.net.ns.NSProtocol.connect(NSProtocol.java:301)
      at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:1406)
      at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:327)
      ... 8 more
  Caused by: java.io.EOFException: SSL peer shut down incorrectly
      at com.sun.net.ssl.internal.ssl.InputRecord.read(InputRecord.java:333)
      at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:789)
      ... 16 more
  </code></pre>
  
  <p>I have add a self signed certificate to a created wallet. But I does not understand how the Oracle server can use it because it need a password which the oracle server does not know. Must I see the password and where must I set it? </p>
  
  <p>On the network I can see that the Oracle server does not send any bytes. It close the socket after the client has start the handshake. That I think the problem is on the server side.</p>
  
  <p>My listener.ora</p>
  
  <pre><code>SID_LIST_LISTENER =
  (SID_LIST =
  (SID_DESC =
    (SID_NAME = CLRExtProc)
    (ORACLE_HOME = C:\app\Administrator\product\11.2.0\dbhome_2)
    (PROGRAM = extproc)
    (ENVS = "EXTPROC_DLLS=ONLY:C:\app\Administrator\product\11.2.0\dbhome_2\bin\oraclr11.dll")
  )
  )
  
  LISTENER =
  (DESCRIPTION_LIST =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = ora11.inetsoftware.local)(PORT = 1521))
    (ADDRESS = (PROTOCOL = TCPS)(HOST = ora11.inetsoftware.local)(PORT = 2484))
  )
  )
  
  ADR_BASE_LISTENER = C:\app\Administrator
  
  WALLET_LOCATION=(SOURCE=(METHOD=FILE)(METHOD_DATA=(DIRECTORY=C:\app\Administrator\product\11.2.0\dbhome_2\BIN\owm\wallets\Administrator)))
  SSL_CLIENT_AUTHENTICATION=FALSE
  </code></pre>
  
  <p>My sqlnet.ora:</p>
  
  <pre><code>SQLNET.AUTHENTICATION_SERVICES= (NTS)
  
  NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
  
  WALLET_LOCATION=(SOURCE=(METHOD=FILE)(METHOD_DATA=(DIRECTORY=C:\app\Administrator\product\11.2.0\dbhome_2\BIN\owm\wallets\Administrator)))
  SSL_CLIENT_AUTHENTICATION=FALSE
  </code></pre>