Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Reg: ORA 28864 SSL connection closed gracefully.

chandra_1986May 19 2022

Hi experts,
SSL db while connecting giving an error : ORA 28864 SSL connection closed gracefully.
Listener.ora

# listener.ora Network Configuration File: D:\Oracle\Ora11\product\11.2.0\dbhome_1\NETWORK\ADMIN\listener.ora
# Generated by Oracle configuration tools.


SSL_CLIENT_AUTHENTICATION=FALSE
#SECURE_CONTROL_LISTENER = TCPS
#SECURE_REGISTER_LISTENER = TCPS
WALLET_LOCATION=(SOURCE=(METHOD=FILE)(METHOD_DATA=(DIRECTORY=D:\Oracle\Ora11\product\11.2.0\dbhome_1\BIN\wallet)))



U4N =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = SR-111-DB.SCT.VN)(PORT = 3001))
      (ADDRESS = (PROTOCOL = TCPS)(HOST = SR-111-DB.SCT.VN)(PORT = 2484))     
    )
  )


SID_LIST_U4N =
  (SID_LIST =
    (SID_DESC =
      (GLOBAL_DBNAME = U4N)
      (ORACLE_HOME = D:\Oracle\Ora11\product\11.2.0\dbhome_1)
      (SID_NAME = U4N)
    )
  )
  
ADR_BASE_U4N = D:\Oracle\Ora11\product\11.2.0\dbhome_1\log

sqlnet.ora:

# This file is actually generated by netca. But if customers choose to 
# install "Software Only", this file wont exist and without the native 
# authentication, they will not be able to connect to the database on NT.

SQLNET.AUTHENTICATION_SERVICES=(TCPS,NTS,NONE)
NAMES.DIRECTORY_PATH=(TNSNAMES,ONAMES,HOSTNAME)
SSL_CLIENT_AUTHENTICATION=FALSE
SSL_VERSION = 0
WALLET_LOCATION=(SOURCE=(METHOD=FILE)(METHOD_DATA=(DIRECTORY=D:\Oracle\Ora11\product\11.2.0\dbhome_1\BIN\wallet)))
SSL_CIPHER_SUITES=(SSL_RSA_WITH_AES_256_CBC_SHA,SSL_RSA_WITH_3DES_EDE_CBC_SHA)
SQLNET.AUTHENTICATION_SERVICES=(TCPS,NTS,NONE)
SQLNET.CRYPTO_CHECKSUM_CLIENT=REQUIRED
SQLNET.ENCRYPTION_TYPES_CLIENT=(AES256)
SQLNET.CRYPTO_CHECKSUM_TYPES_CLIENT=(SHA1)
#SQLNET.AUTHENTICATION_SERVICES = (NTS)
#sqlnet.fallback_authentication = TRUE
#SSL_CLIENT_AUTHENTICATION=FALSE
ADR_BASE_N4U = D:\Oracle\Ora11\product\11.2.0\dbhome_1\log
#NAMES.DEFAULT_DOMAIN = VN

tnsnames.ora

# tnsnames.ora Network Configuration File: D:\Oracle\Ora11\product\11.2.0\dbhome_1\NETWORK\ADMIN\tnsnames.ora
# Generated by Oracle configuration tools.

CUSU.SPCT.VN =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = SVR-1132-DB)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SID = CUSU)
    )
  )

EBSUAT.SPCT.VN =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = SVR-1135-EBS)(PORT = 3002))
    )
    (CONNECT_DATA =
      (SID = EBSU)
    )
  )

N4DEV.SPCT.VN =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = svr-1117-db)(PORT = 3002))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = N4D)
      (INSTANCE_NAME = N4D)
    )
  )


N4PROD.SPCT.VN =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(Host = 192.168.202.30)(Port = 1521))
      (ADDRESS = (PROTOCOL = TCP)(Host = 192.168.202.30)(Port = 1522))
    )
    (CONNECT_DATA =
      (SID = N4P)
    )
  )

N4BU.SPCT.VN =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = svr-1117-db)(PORT = 3003))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = n4bu)
    )
  )

EBS26UAT.SPCT.VN =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = ws-1054)(PORT = 3002))
    )
    (CONNECT_DATA =
      (SID = EBSU)
    )
  )

U4NAT.SPCT.VN =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = SR-111-DB.SCT.VN)(PORT = 3001))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = U4N)
      (INSTANCE_NAME = U4N)
    )
  )




U4NAT.SPCTSSL.VN=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCPS)(HOST=SR-111-DB.SCT.VN)(PORT=2484)))(CONNECT_DATA=(SERVICE_NAME=U4N)(INSTANCE_NAME=U4N)))

when doing sqlplus u4_owner/u4_onwer@U4NAT.SPCTSSL.VN
Error below :-
Error:

ORA-28864 : SSL connection closed gracefully.

please suggest, how to fix this issue, as listener status showing up and 2484 port is listening from db listener status, tnsping giving an error tns-protocol adaptor error TNS-12560 Tns protocol adaptor error.

Comments

Sdhamoth-Oracle Oct 16 2024

Check the error reported in “Control panel→System and Securities→Administrative Tools→Event Viewer” under Windows Log→Application.

How did you set the Instant Client path in PATH? In command prompt?

If you have set it in a command prompt, then make sure you start that command prompt as administrator (i.e. opening it by right clicking on command prompt icon and select “run as administrator” from popped context menu). Also, you should start ODBC data source administrator by executing “odbcad32” from that command prompt. Have you?

pczurak-JavaNet Oct 16 2024

Yes I started the cmd as run as Administrator.

I am using ODBC 64 bit not 32 bit.

I set the path using Windows UI (System properties), and if I open a cmd window and type set I can see the correct path.

starting “odbcad32” from the command line did not help.

I tried the same process on a different computer and got the same results.

Sdhamoth-Oracle Oct 16 2024

odbcad32 is for ODBC 64 bit on Windows x64 versions. You need to start odbcad32 from syswow64 directory to configure ODBC 32 bit on Windows x64 versions.

Have you checked the Application error logs in Event viewer? Did you find any error related to your ODBC application?

pczurak-JavaNet Oct 16 2024

I am running the 64bit version, if I start odbcad32 from syswow64 it starts the 32bit version.

There are no errors in the Event Viewer.

pczurak-JavaNet Oct 17 2024

I have tried basic driver version 19.24, but when I click on the Test button, I get the following error:

---------------------------
Testing Connection
---------------------------
Unable to connect
SQLState=S1000
[Oracle][ODBC][Ora]ORA-12504: TNS:listener was not given the SERVICE_NAME in CONNECT_DATA

---------------------------
OK
---------------------------

Sdhamoth-Oracle Oct 17 2024

Looks like the service name is missing in your connection string.

Here is a sample of connection string:

sales=
(DESCRIPTION=
(ADDRESS= (PROTOCOL=tcp)(HOST=sales-server)(PORT=1521))
(CONNECT_DATA=
(SERVICE_NAME=sales.us.acme.com)))
The part that is highlighted with bold characters seems to be missing in your connection string. Fix it.

pczurak-JavaNet Oct 17 2024

This is what I am using.

JDEPRD =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = testoda0)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = jdeprd.test.com)
)
)

Sdhamoth-Oracle Oct 17 2024

Are you able to connect to your database using SQL*Plus?

pczurak-JavaNet Oct 17 2024

No:

F:\instantclient_23_5>sqlplus

SQL*Plus: Release 19.0.0.0.0 - Production on Thu Oct 17 07:55:39 2024
Version 19.24.0.0.0

Copyright (c) 1982, 2024, Oracle. All rights reserved.

Enter user-name: testuser
Enter password:
ERROR:
ORA-12560: TNS:protocol adapter error

Enter user-name:

pczurak-JavaNet Oct 17 2024

The issue is fixed

In the ODBC Driver Configuration.

For the TNS Service Name you cannot type the name even if you type it exactly as it shows in the dropdown, you must select it from the dropdown, otherwise it won't work.

1 - 10

Post Details

Added on May 19 2022
4 comments
1,552 views