我正在运行这些行来将 R 连接到 Apache Druid 集群:
> library("RJDBC")
> conn_string = "jdbc:avatica:remote:url=http://<broker_url>:8082/druid/v2/sql/avatica-protobuf/;serialization=protobuf"
> drv <- JDBC("org.apache.calcite.avatica.remote.Driver", "~/Downloads/avatica-1.23.0.jar")
> conn <- dbConnect(drv, conn_string)
drv <- JDBC(...)
它在我的计算机上运行的 RStudio 桌面上运行良好,但它在我的其中一台虚拟机上运行的 RStudio Server 上卡在第三行( )。
我已经sudo R CMD javareconf JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/
在那台机器上运行过。我得到了以下答案:
Java interpreter : /usr/lib/jvm/java-8-openjdk-amd64//jre/bin/java
Java version : 1.8.0_382
Java home path : /usr/lib/jvm/java-8-openjdk-amd64/
Java compiler : /usr/lib/jvm/java-8-openjdk-amd64//bin/javac
Java headers gen.: /usr/lib/jvm/java-8-openjdk-amd64//bin/javah
Java archive tool: /usr/lib/jvm/java-8-openjdk-amd64//bin/jar
trying to compile and link a JNI program
detected JNI cpp flags : -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux
detected JNI linker flags : -L$(JAVA_HOME)/jre/lib/amd64/server -ljvm
gcc -I"/usr/share/R/include" -DNDEBUG -I/usr/lib/jvm/java-8-openjdk-amd64//include -I/usr/lib/jvm/java-8-openjdk-amd64//include/linux -fpic -g -O2 -ffile-prefix-map=/build/r-base-4A2Reg/r-base-4.1.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c conftest.c -o conftest.o
gcc -shared -L/usr/lib/R/lib -Wl,-Bsymbolic-functions -flto=auto -ffat-lto-objects -flto=auto -Wl,-z,relro -o conftest.so conftest.o -L/usr/lib/jvm/java-8-openjdk-amd64//jre/lib/amd64/server -ljvm -L/usr/lib/R/lib -lR
JAVA_HOME : /usr/lib/jvm/java-8-openjdk-amd64/
Java library path: $(JAVA_HOME)/jre/lib/amd64/server
JNI cpp flags : -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux
JNI linker flags : -L$(JAVA_HOME)/jre/lib/amd64/server -ljvm
Updating Java configuration in /usr/lib/R
Done.
我的 RStudio Server 安装有什么问题?