JAVA_HOME is being set by the Autosys Agent
search cancel

JAVA_HOME is being set by the Autosys Agent

book

Article ID: 74503

calendar_today

Updated On:

Products

CA Workload Automation AE - Business Agents (AutoSys) CA Workload Automation AE - Scheduler (AutoSys) Workload Automation Agent

Issue/Introduction

After Agent upgrades/migrations it was seen that Agent is loading the JAVA_HOME variable to /opt/CA/WorkloadAutomationAE/JRE_WA.   Options to prevent JAVA_HOME to be set for the agent are discussed here.

Environment

Workload Automation Autosys

Cause

If the agent is installed on the same server as the scheduler OR if there is a client installed with the agent, the JAVA_HOME gets set when the auto.profile gets sourced.

In the auto.profile, we source the Autosys host environment script, which is the other script containing JAVA_HOME variables. 


case $AUTOSERV in
ACE)
        AUTOUSER=/opt/CA/WorkloadAutomationAE/autouser.ACE
        test -f $AUTOUSER/autosys.sh.test.example.com &&
        . $AUTOUSER/autosys.sh.test.example.com <<<<<<<
        ;;
esac
 

The autosys.sh.test-example.com  script in this case has entries like this:

JRE_PATH=/opt/CA/WorkloadAutomationAE/JRE_WA ; export JRE_PATH
JRE_HOME=/opt/CA/WorkloadAutomationAE/JRE_WA ; export JRE_HOME
JAVA_HOME=/opt/CA/WorkloadAutomationAE/JRE_WA ; export JAVA_HOME

Resolution

Any variables that are not needed by the Agent, those can be commented out in the appropriate scripts mentioned above. 

Exit all the open shell prompts, restart the Agent using a brand new shell to make the changes to be effective to the Agent.