Snowflake JDBC Connection using Talend - jdbc

I am using tDBConnection(JDBC) component to connect with a snowflake.
After all the setup I am getting the below error
net.snowflake.client.jdbc.RestRequest execute
SEVERE: Stop retrying since elapsed time due to network issues has reached
timeout. Elapsed: 71,253(ms), timeout: 60,000(ms)
Exception in component tDBConnection_1 (sf_test)
java.lang.RuntimeException: JDBC driver encountered communication error. Message: Exception encountered for HTTP request: Certificate for <xxxxxxxxxx.ap-southeast-1.snowflakecomputing.com> doesn't match any of the subject alternative names: [*.ap-southeast-1.snowflakecomputing.com, *.global.snowflakecomputing.com, *.sg.ap-southeast-1.aws.snowflakecomputing.com].
at snowflake_poc.sf_test_0_1.sf_test.tDBConnection_1Process(sf_test.java:397)
at snowflake_poc.sf_test_0_1.sf_test.runJobInTOS(sf_test.java:700)
at snowflake_poc.sf_test_0_1.sf_test.main(sf_test.java:550)
I am using latest snowflake JDBC driver 3.12.2
Any leads would be really helpful
Thanks

I had the similar issue, in the Talend account box just give your account name alond which is "<xxxxxxxxxx.ap-southeast-1" don't postfix snowflakecomputing.com to your account name

Related

DB Link throws ORA-28511: lost RPC connection to heterogeneous remote agent using SID

I use a DBLINK/Oracle Gateway to connect to an external non-oracle database. i have a timeout setting of 5 minutes.
when I connect using dblink, for the first time, it runs fine. After the idle time of 5 minutes, when I run the same sql again, it throws me the bellow error -
ORA-28511: lost RPC connection to heterogeneous remote agent using SID. ****
ORA-28509: unable to establish a connection to non-Oracle system
ORA-02063: preceding line from DB2T
Then when i run the sql again, its connecting fine. i guess its establishing a new connection.
Why am i getting the connection error and why oracle is not simply establishing a new connection when the previous connection is timed out?
Is there a way to not get the error and connect seamlessly or to suppress the error?
Easily replicable in sql developer by running a sql and waiting for 5 minutes.
Thanks in Advance.

ORA-12518 TNS:listener could not hand off client connection in data source from JBOSS 6,X

I am using ORACLE 12c database in our Application while starting Applications
showing below error.
WARN [JBossManagedConnectionPool] Throwable while attempting to get a new connection: null: org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (java.sql.SQLException: Listener refused the connection with the following error:
ORA-12518, TNS:listener could not hand off client connection
)
Could not obtain connection to query metadata: org.jboss.util.NestedSQLException: Unable to get managed connection for FooDB; - nested throwable: (javax.resource.ResourceException: Unable to get managed connection for FooDB)
Here is My connections URL:
jdbc:oracle:thin:#(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=mydomain.com)(PORT=1521))
(LOAD_BALANCE=ON)(FAILOVER=ON)(CONNECT_DATA=(SERVER=SHARED)(SERVICE_NAME=FOODB)(FAILOVER_MODE=(.......
this unknown issue leads application performance issue while longing into app looking for any parameters to add from jboss as database is in 2 node clustered environment.
Thanks in advance.

coldfusion v 10 std unable to connect to oracle via jdbc oci driver

I am trying to establish a jdbc-oci connection to an oracle database on a coldfusion v 10 std server.
The reason for employing jdbc oci is the necessity to encrypt data flowing between the app server and the database (by using common settings in sqlnet.ora). However, no matter what syntax we try, neither a service
based nor a tnsnames based jdbc url will work. Immediately after saving (and automatically testing) the connection, coldfusion errors out with "java.sql.SQLException: Timed out trying to establish connection".
It looks weird that a timeout may have happened since the error will always be thrown immediately. Therefor I suppose there is another root cause for failing to establish the connection.
Any ideas out there?
Please note that we simulated connection establishment with a console application aside coldfusion but using the same jvm and jdbc driver successfully. it does therefore not seem to be a jvm or driver or oci.dll
related issue.
data source settings :
Driver Class : oracle.jdbc.driver.OracleDriver
JDBC URL (using tnsnames.ora) : jdbc:oracle:oci:#<theName>
JDBC URL (using ip, port, service) : jdbc:oracle:oci:#//<IP>:1521/<SID>
error message :
Connection verification failed for data source: theName
java.sql.SQLException: Timed out trying to establish connection
The root cause was that: java.sql.SQLException: Timed out trying to establish connection
environment :
ojdbc6 driver lives in a directory known to coldfusion
oci.dll lives in a directory known to the system path variable, verified by sysinternals processexplorer on the coldfusion service
for the JDBC URL (using tnsnames.ora), the directory containing tnsnames.ora is known as a system variable TNS_ADMIN, verified by sysinternals processexplorer on the coldfusion service
along with tnsnames.ora there is a sqlnet.ora file comprising settings to switch on data encryption
Stacktrace:
A non-SQL error occurred while requesting a connection from "datasource-name here".
Timed out trying to establish connection
Exception in thread "Thread-2120" java.lang.UnsatisfiedLinkError: no ocijdbc11 in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1860)
at java.lang.Runtime.loadLibrary0(Runtime.java:845)
at java.lang.System.loadLibrary(System.java:1084)
at oracle.jdbc.driver.T2CConnection$1.run(T2CConnection.java:3560)
at java.security.AccessController.doPrivileged(Native Method)
at oracle.jdbc.driver.T2CConnection.loadNativeLibrary(T2CConnection.java:3556)
at oracle.jdbc.driver.T2CConnection.logon(T2CConnection.java:269)
at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:553)
at oracle.jdbc.driver.T2CConnection.<init>(T2CConnection.java:165)
at oracle.jdbc.driver.T2CDriverExtension.getConnection(T2CDriverExtension.java:53)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:528)
at coldfusion.server.j2ee.sql.pool.JDBCPool.createPhysicalConnection(JDBCPool.java:614)
at coldfusion.server.j2ee.sql.pool.ConnectionRunner$RunnableConnection.run(ConnectionRunner.java:67)
at java.lang.Thread.run(Thread.java:722)
A non-SQL error occurred while requesting a connection from "datasource-name here".
Timed out trying to establish connection
[Fatal Error] :2662:4: The element type "view" must be terminated by the matching end-tag "</view>".
Adding of the Path to the oracle instant client at the configuration file cf-directory\cfusion\bin\jvm.config has solved the problem.

java.sql.SQLRecoverableException: Connection has been administratively disabled by console/admin command. Try later

When our application tries to connect Oracle database, this exception is thrown:
java.sql.SQLRecoverableException: Connection has been administratively disabled by console/admin command. Try later. java.lang.Exception: It was disabled at Tue Oct 20 23:55:14 CEST 2015
But, from Weblogic console the connection test returns OK.
Weblogic version: 12.1.3.0.0
Any explanation is welcome. Thanks
The reason the test works is because that is creating a connection and running a test query. That is not what your code is doing when it is using the data source in an ejb. The code is going through the connection pool and that is what has been marked as bad. There is no solution provided by Oracle that I have found except to: restart the server and that will re-enable the connection pool.
I suspect you have "Test connections on reserve" set because that is when this usually arises. What Weblogic does is: before it returns a connection from the pool it will run a test query, if the test query fails it waits and runs it one more time. If the query fails again it marks the connection as unhealthy. If all the connections in the pool become unhealthy it will mark the pool as disabled and gives you the error message you see: 'Connection has been administratively disabled by console/admin command. Try later.'
In regards to the 'Try Later' part of the error message, as far as I can tell Oracle is wrong about trying again later. I have never seen it recover later.
I'd like to share this article that help me out to understand better my problem:
https://www.techpaste.com/2012/09/connection-administratively-destroyed-reconnect-oracle-weblogic-server/
The “java.sql.SQLException: Connection has been administratively destroyed.” is expected:
the DB was shutdown; even if it was restarted later, the JDBC connection are pointing to DB processes
that have been destroyed.
You need to restart your WebLogic Server to recreate new JDBC connections.
All the current transactions are lost, as the database was shutdown.
High availability of your RDBMS is required to minimize this issue.
Is there any other error before that one ?
Maybe in the log you can find that connection is been closed.
You can avoid this by selecting "Test on Connection Reserve" in the datasource.

Socket Exception : recv failed with oracle thin driver

I am facing an issue where my test suite randomly fails with an socket exception
oracle.jdbc.driver.T4CStatement 1267 - Throwing SQLException: java.net.SocketException: Software caused connection abort: recv failed
The test suite fails with this exception when a given set of test cases are executed in a particular order. I got the above error log after enabling the oracle jdbc driver logs. The query which leads to this error is always a "DROP SEQUENCE query". There is nothing special about this query since it is fired 'n' number of times during the execution flow.
One of the blog link points out that the above error is because the server side sockets gets closed before the client expects. To troubleshoot more on this point I tried analyzing the Oracle TNSListener logs - listener.log file but was not able to gather much information since the log file only contained information about the socket CONNECT function call.
What could be the possible causes of the above error in addition to the one the blog link mentions?
How can I configure the Oracle TNSListener to provide more detailed information about the socket communication? For e.g. Trace information when the server socket close event is fired.
I would appreciated if anyone could point out to a possible cause of this error or provide more information which could help me to troubleshoot this issue further based on the above two points
You can set the trace level if you have access to the lsnrctl utility:
LSNRCTL> show trc_level
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=xxx)(PORT=1521)))
LISTENER parameter "trc_level" set to off
The command completed successfully
LSNRCTL> set trc_level admin
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=xxx)(PORT=1521)))
LISTENER parameter "trc_level" set to admin
The command completed successfully
LSNRCTL> show trc_level
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=xxx)(PORT=1521)))
LISTENER parameter "trc_level" set to admin
The command completed successfully
LSNRCTL>
From the docs, trc_level is one of:
Specify one of the following trace levels:
off for no trace output
user for user trace information
admin for administration trace information
support for Oracle Support Services trace information

Resources