You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are using implyr to connect to impala via JDBC. Usually this works fine, but in ca 25% of the attempt trying to establish the impala connection fails, we get at least three different errors that look a lot like each other:
for(i in 1:100){
impala <- CreateImpalaConnection(SSLTrustStorePwd = SSLTrustStorePwd)
}
Error in .jcall(conn@jc, "V", "close") :
java.sql.SQLNonTransientConnectionException: [Cloudera][JDBC](10060) Connection has been closed.
Error in .jcall(conn@jc, "Ljava/sql/Statement;", "createStatement") :
java.sql.SQLNonTransientConnectionException: [Cloudera][JDBC](10060) Connection has been closed.
Error in .jcall(.rJava.class.loader, "[Ljava/lang/String;", "getClassPath") :
java.sql.SQLNonTransientConnectionException: [Cloudera][JDBC](10060) Connection has been closed.
I noticed via traceback() that the errors are in different locations:
The '"[Ljava/lang/String;", "getClassPath")' error is in the .jinit function: 6: stop(list(message = "java.sql.SQLNonTransientConnectionException: [Cloudera][JDBC](10060) Connection has been closed.", call = .jcall(.rJava.class.loader, "[Ljava/lang/String;", "getClassPath"), jobj = new("jobjRef", jobj = <pointer: 0xac0e2b8>, jclass = "java/sql/SQLNonTransientConnectionException"))) 5: .jcheck() 4: .jcall(.rJava.class.loader, "[Ljava/lang/String;", "getClassPath") 3: .jclassPath() 2: .jinit(classpath = impala_classpath, force.init = TRUE)
Are these errors known, and what can we do about it? We now wrapped the CreateImpalaConnection function in a try catch loop and try multiple times, but that is not the desired way to do it.
The function CreateImpalaConnection is defined as:
Hi @ianmcook thanks for you reply. As answer to your questions:
We're running on Red Hat Enterprise Linux Server 7.6
We're using the most recent version of the impala jdbc driver from the cloudera website a few months ago, and more recently my collegue updated to the newest version (I cannot find a way to get the version number out of the jar?), but had the same issues.
We do not have admin rights so requested our admins to do install the driver. I seems not completely straightforward on Linux systems how to install and configure the driver, but we will try it.
We are using implyr to connect to impala via JDBC. Usually this works fine, but in ca 25% of the attempt trying to establish the impala connection fails, we get at least three different errors that look a lot like each other:
I noticed via traceback() that the errors are in different locations:
The '"[Ljava/lang/String;", "getClassPath")' error is in the .jinit function:
6: stop(list(message = "java.sql.SQLNonTransientConnectionException: [Cloudera][JDBC](10060) Connection has been closed.", call = .jcall(.rJava.class.loader, "[Ljava/lang/String;", "getClassPath"), jobj = new("jobjRef", jobj = <pointer: 0xac0e2b8>, jclass = "java/sql/SQLNonTransientConnectionException"))) 5: .jcheck() 4: .jcall(.rJava.class.loader, "[Ljava/lang/String;", "getClassPath") 3: .jclassPath() 2: .jinit(classpath = impala_classpath, force.init = TRUE)
The "Ljava/sql/Statement;", "createStatement" is within the dbConnect function (https://github.com/ianmcook/implyr/blob/master/R/src_impala.R#L126)
13: .getClassesFromCache(Class) 12: getClassDef(classi, where = where) 11: validObject(.Object) 10: initialize(value, ...) 9: initialize(value, ...) 8: new("jobjRef", jobj = r, jclass = substr(returnSig, 2, nchar(returnSig) - 1)) 7: new("jobjRef", jobj = r, jclass = substr(returnSig, 2, nchar(returnSig) - 1)) 6: .jcall("java/sql/DriverManager", "Ljava/sql/Connection;", "getConnection", as.character(url)[1], as.character(user)[1], as.character(password)[1], check = FALSE) 5: .local(drv, ...) 4: dbConnect(drv, ...) 3: dbConnect(drv, ...) 2: src_impala(drv = drv, ....)
The "conn@jc, "V", "close"" error is in the db_disconnector function: https://github.com/ianmcook/implyr/blob/master/R/src_impala.R#L506
and seems to occur less often when I set auto_disconnect to FALSE.
Are these errors known, and what can we do about it? We now wrapped the CreateImpalaConnection function in a try catch loop and try multiple times, but that is not the desired way to do it.
The function CreateImpalaConnection is defined as:
The text was updated successfully, but these errors were encountered: