pxf command returns error "Set $JAVA_HOME in your environment before running PXF commands"
search cancel

pxf command returns error "Set $JAVA_HOME in your environment before running PXF commands"

book

Article ID: 378173

calendar_today

Updated On:

Products

VMware Tanzu Greenplum Greenplum Pivotal Data Suite Non Production Edition VMware Tanzu Data Suite VMware Tanzu Data Suite

Issue/Introduction

Platform eXtension Framework (PXF) commands are failing with the error

ERROR: $JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.412.b08-1.el7_9.x86_64/jre is invalid. Set $JAVA_HOME in your environment before running PXF commands.

Cause

The JAVA_HOME environment variable is not set correctly.

Resolution

Verify java has been installed on all hosts in the cluster and that it is in the same location on all hosts.

Set the environment variable JAVA_HOME to the directory so that ${JAVA_HOME}/bin/java is the location of the java binary.

It can be set in ONE of the following:

  1. If PXF_BASE is set, add the JAVA_HOME setting to ${PXF_BASE}/conf/pxf-env.sh file and run "pxf cluster sync"

  2. If using the default location for PXF configuration, add the JAVA_HOME setting to <PXF_INSTALL_DIR>/conf/pxf-env.sh and run "pxf custer sync"

 

Additional Information