You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ranger.apache.org by "Ramachandran (Jira)" <ji...@apache.org> on 2023/04/15 14:49:00 UTC
[jira] [Created] (RANGER-4190) Apache Ranger does not recover from a recoverable SQL exception
Ramachandran created RANGER-4190:
------------------------------------
Summary: Apache Ranger does not recover from a recoverable SQL exception
Key: RANGER-4190
URL: https://issues.apache.org/jira/browse/RANGER-4190
Project: Ranger
Issue Type: Improvement
Components: Ranger
Reporter: Ramachandran
Assignee: Ramachandran
Fix For: 3.0.0
It seems the Ranger instance is not able to connect Oracle ATP. This issue could be the loss of network connectivity to the load balancer which will connect to oracle ATP.
java.sql.SQLRecoverableException: I/O Exception: Connection reset
Internal Exception: java.sql.SQLRecoverableException: No more data to read from socket
Error Code: 17410
As we discussed with Abhi, this issue could happen due to the loss of connectivity to the oracle ATP network load balancer.
ADB network properties - [https://docs.oracle.com/en/cloud/paas/autonomous-database/adbsa/connect-prepare-jdbc-thin.html#GUID-0A619DFE-5F5F-4302-BF43-B08AEDA05A6C] [https://docs.oracle.com/en/database/oracle/oracle-database/12.2/rilin/load-balancing-of-connections-to-oracle-rac-databases.html#GUID-06B4373D-1217-44E4-BD86-DE353DA657F6]
part of the Ranger start we need to add the below JVM parameters to disable the network cache by lowering its TTL to 0;-Djava.security.egd=file:///dev/urandom -Dnetworkaddress.cache.ttl=0 -Dnetworkaddress.cache.negative.ttl=0
By default, the [OpenJDK 8 InetAddress|http://hg.openjdk.java.net/jdk8/jdk8/jdk/file/687fd7c7986d/src/share/classes/java/net/InetAddress.java#l189] will cache failed DNS queries, referred to as "negative caching", for 10 seconds. It's recommended to disable both the positive and negative cache by setting them to 0 seconds, and rely on the DNS caching implemented inside OCI's DNS systems.
{panel}
{panel}
|{{{}java.security.Security.setProperty({}}}{{{}"networkaddress.cache.ttl"{}}}{{{}, {}}}{{{}0{}}}{{{});{}}}
{{{}java.security.Security.setProperty({}}}{{{}"networkaddress.cache.negative.ttl"{}}}{{{}, {}}}{{{}0{}}}{{{});{}}}
{{// (Optional) Force Java to use a specific DNS provider}}
{{// By default it will use whatever lookup is defined in the system => files,nis,dns}}
{{// as in /etc/nsswitch.conf on linux}}
{{{}System.setProperty({}}}{{{}"sun.net.spi.nameservice.provider.1"{}}}{{{}, {}}}{{{}"dns,sun"{}}}{{{});{}}}|
Or as an argument when invoking Java:
{panel}
{panel}
|{{{}java -Dnetworkaddress.cache.ttl={}}}{{{}0{}}} {{{}-Dnetworkaddress.cache.negative.ttl={}}}{{{}0{}}} {{app.jar}}|
--
This message was sent by Atlassian Jira
(v8.20.10#820010)