As per Apache Livy guidelines we have exported the below config parameters before starting Livy server.
export JAVA_HOME export SPARK_HOME export SPARK_CONF_DIR export HA