Skip to content

Thin client error: DPY-6000: cannot connect to database. Listener refused connection. (Similar to ORA-12660) #47

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
harri-pasanen opened this issue Aug 19, 2022 · 4 comments
Labels
question Further information is requested

Comments

@harri-pasanen
Copy link

harri-pasanen commented Aug 19, 2022

  1. What versions are you using?

python-oracledb 1.0.3
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0
platform.platform: Linux-3.10.0-1160.71.1.el7.x86_64-x86_64-with-glibc2.17
platform.python_version: 3.9.6
sys.maxsize > 2**32: True

  1. Is it an error or a hang or a crash?

Connection fails to Exadata RAC with the thin client.

connection = oracledb.connect(user=admin, password=args.adminpwd,
dsn=args.service_name, config_dir = tnsdir)

  1. What error(s) or behavior you are seeing?

With thin client connection to a single instance non RAC db seems to work fine.
But I cannot connect to Exadata RAC instance with thin client, it causes the exception:

oracledb.exceptions.OperationalError: DPY-6000: cannot connect to database. Listener refused connection. (Similar to ORA-12660)

Problem tns entry is like:
x01 =
(DESCRIPTION =
(ADDRESS_LIST =
(FAILOVER = ON)
(LOAD_BALANCE = ON)
(ADDRESS = (PROTOCOL = TCP)(HOST = xt01dev-scan.home.net)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = xt02dev-scan.home.net)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = dbox_svc.tst.tns)
)
)

if I call init_oracle_client() it starts working.

  1. Does your application call init_oracle_client()?

No.

But if I call init_oracle_client(), it starts working.

  1. Include a runnable Python script that shows the problem.
# Uncomment below line and the problem goes away
# oracledb.init_oracle_client()  
connection = oracledb.connect(user=admin, password=args.adminpwd, 
                                dsn=args.service_name, config_dir = tnsdir)

@harri-pasanen harri-pasanen added the bug Something isn't working label Aug 19, 2022
@harri-pasanen
Copy link
Author

Note that I tried pretty much all connection modes, including those not using tnsnames.ora, but could not make a connection to this particular db with the thin client. Thick client works fine.

@anthony-tuininga anthony-tuininga added question Further information is requested and removed bug Something isn't working labels Aug 19, 2022
@anthony-tuininga
Copy link
Member

This is a known limitation of the thin driver as can be seen in the documentation. The only solution (if you want to use thin mode) is to make the native network encryption and checksumming not mandatory; otherwise, you will have to use thick mode. You can make this an enhancement request if you'd like, but I'm not sure where the priority would be as we have a long list of enhancement requests for thin mode!

@bassg0navy
Copy link

This thread helped a lot 👍 and saved an unnecessary issue being opened.

@cjbj
Copy link
Member

cjbj commented Sep 14, 2022

Closing. We have NNE support on our 'todo' list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants