PXF Error: server error : 'sun.misc.Cleaner sun.nio.ch.DirectBuffer.cleaner() on Tanzu Greenplum
search cancel

PXF Error: server error : 'sun.misc.Cleaner sun.nio.ch.DirectBuffer.cleaner() on Tanzu Greenplum

book

Article ID: 296773

calendar_today

Updated On:

Products

VMware Tanzu Greenplum

Issue/Introduction

Customer is accessing Hive tables using external tables and PXF.
It works for tables with a small number of attributes/columns.
When accessing Hive tables with a large number of columns (greater than 15) a error similar to the following is received:
SQL Error [08000]: ERROR: PXF server error : 'sun.misc.Cleaner sun.nio.ch.DirectBuffer.cleaner()' (seg1 slice1 192.168.1.5:6001 pid=13434)
Hint: Check the PXF logs located in the '/usr/local/pxf-conf/logs' directory on host 'sdw1' or 'set client_min_messages=LOG' for additional details.


Environment

Product Version: 6.18

Resolution

Check the version of Java used by PXF in the cluster.
In the Example below it shows that PXF is using Java 1.8.0:
[gpadmin@mdw ~]$ ps -aef | egrep pxf
gpadmin  25853     1  0 May22 ?        00:05:01 /usr/java/default/bin/java -Dsun.misc.URLClassPath.disableJarChecking=true -Xmx2g -Xms1g -Djava.util.logging.manager=org.apache.logging.log4j.jul.LogManager -Dlogging.config=/home/gpadmin/pxf/conf/pxf-log4j2.xml -XX:OnOutOfMemoryError=/usr/local/pxf-gp6/bin/kill-pxf.sh %p -jar /usr/local/pxf-gp6/application/pxf-app-6.3.1.jar --spring.config.location=classpath:/application.properties,file:/home/gpadmin/pxf/conf/pxf-application.properties
[gpadmin@mdw ~]$ 
[gpadmin@mdw ~]$ /usr/java/default/bin/java -version
java version "1.8.0_271"
Java(TM) SE Runtime Environment (build 1.8.0_271-b09)
Java HotSpot(TM) 64-Bit Server VM (build 25.271-b09, mixed mode)

The current Hadoop jar file libraries delivered with PXF are incompatible with Java 11 in some cases.
If the Java version used is Java 11, install Java 1.8 on all the hosts in the cluster in the same location.
The tar file can be downloaded fromĀ https://www.oracle.com/ie/java/technologies/javase/javase8-archive-downloads.html

Edit the file ${PXF_BASE}/conf/pxf-env.sh and change the JAVA_HOME environment variable to the location of the "jre" directory of the installed Java 1.8

Example:
Install Java 1.8 from the downloaded tar file to /usr/java_1.8
The "jre" directory with be "/usr/java_1.8/jdk1.8.0_202/jre".
In the pxf-env.sh file change JAVA_HOME to be:
export JAVA_HOME=/usr/java_1.8/jdk1.8.0_202/jre