Quantcast
Viewing all articles
Browse latest Browse all 6136

Ubuntu 18.04 RJDBC:JDBC connection to oracle hangs no response

I developed a shiny application using data from an oracle database, my app is developed and running smoothly in my windows environment. To deploy my app within my colleges I wrote it as a package and installed this packages on a ubuntu server. Ubuntu 18.04.2 LTS (GNU/Linux 4.15.0-50-generic x86_64)Shiny server is installed and finding the package, app is running.

But when I try to create a connection to oracle, my app disconnects and ask me to reload the session.

So I extracted just the code to build the connection and included several messages and it hangs while using dbconnet from RJDBC package.

I checked several environment variables like PATH, JAVA_HOME, LD_LIBRARY_PATH. I have next to no experience with linux.

My R VersionR version 3.6.0 (2019-04-26) -- "Planting of a Tree"Copyright (C) 2019 The R Foundation for Statistical ComputingPlatform: x86_64-pc-linux-gnu (64-bit)

Java Versionopenjdk version "11.0.3" 2019-04-16OpenJDK Runtime Environment (build 11.0.3+7-Ubuntu-1ubuntu218.04.1)OpenJDK 64-Bit Server VM (build 11.0.3+7-Ubuntu-1ubuntu218.04.1, mixed mode, sharing)

Oracle DatabaseOracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production

I am using the driver ojdbc7.jar since it seems to be the latest version.

    library(rJava)    library(DBI)    library(RJDBC)    options(java.parameters="-Xmx2g")    .jinit()    print(.jcall("java/lang/System", "S", "getProperty", "java.version"))    initialize_db_con <- function(driverClass = 'oracle.jdbc.driver.OracleDriver',                          classPath = "pathtomyfile/ojdbc7.jar",                          dbn = 'jdbc:oracle:thin:@xx.xx.xx.xx:xxxx/mydb',                          usr = NULL, pwd = NULL) {      driverClass <- 'oracle.jdbc.driver.OracleDriver'      message("Setting user and password manually")      creds <- list(user = usr, pw = pwd)      drv <- RJDBC::JDBC(driverClass = driverClass, classPath = classPath, identifier.quote = '´')      message("driver is set")      con <- RJDBC::dbConnect(drv = drv, dbn, creds$user, creds$pw)      message("connection has been build")      return(con)    }    usr <- "myuser"    pwd <- "mypassword"    con <- initialize_db_con(usr=usr, pwd = pwd)

So after waiting for about 30 seconds this error message appears.

    Error in .jcall("java/sql/DriverManager", "Ljava/sql/Connection;",      "getConnection",  :    ignoring SIGPIPE signal

Why can the connection not be build, any suggestions?


Viewing all articles
Browse latest Browse all 6136

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>