"ORA-12154: TNS:could not resolve the connect identifier specified" error during AutoSys upgrade when using a custom tmp folder
search cancel

"ORA-12154: TNS:could not resolve the connect identifier specified" error during AutoSys upgrade when using a custom tmp folder

book

Article ID: 404487

calendar_today

Updated On:

Products

Autosys Workload Automation

Issue/Introduction

Upgrade of AutoSys fails to resolve Oracle database when using a custom /tmp folder (example: /opt/CA/WorkloadAutomationAE/tmp  instead of /tmp) as /tmp has a NOEXEC bit set on it.

 

cawa_installer.log has errors like this:

2025-06-27 06:09:28,287 [main] DEBUG com.ca.autosys.db.connection.DBConnectionOracle(466) - Trying to connect with password authentication
2025-06-27 06:09:28,287 [main] DEBUG com.ca.autosys.db.connection.DBConnectionOracle(472) - Running command: sqlplus -S -L "aedbadmin"/"########"@<oracle-database-name> @"/opt/CA/WorkloadAutomationAE/tmp/751527.tmp/pre_upgrade_tmp.sql"
2025-06-27 06:09:28,288 [main] DEBUG com.ca.autosys.db.utils.CommandExecutor(22) - In execute Command
2025-06-27 06:09:28,288 [main] DEBUG com.ca.autosys.db.utils.CommandExecutor(28) - Command Env : PATH = /oracle-client/current_version/bin:/oracle-client/current_version:/usr/xpg4/bin:/opt/CA/WorkloadAutomationAE/autosys/bin:/opt/CA/WorkloadAutomationAE/JRE_WA/bin:/opt/CA/WorkloadAutomationAE/autosys/bin:/opt/CA/WorkloadAutomationAE/JRE_WA/bin:/sbin:/bin:/usr/sbin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin
2025-06-27 06:09:28,288 [main] DEBUG com.ca.autosys.db.utils.CommandExecutor(28) - Command Env : LD_LIBRARY_PATH = /oracle-client/current_version/lib:/mnt/v24/modules/LIBS:/opt/CA/WorkloadAutomationAE/JRE_WA/lib:/opt/CA/WorkloadAutomationAE/autosys/lib:/opt/CA/SharedComponents/Csam/SockAdapter/lib:/opt/CA/CAlib:/oracle-client/current_version/lib:/opt/CA/WorkloadAutomationAE/JRE_WA/lib:/opt/CA/WorkloadAutomationAE/autosys/lib:/opt/CA/SharedComponents/Csam/SockAdapter/lib:/opt/CA/CAlib:/oracle-client/current_version/lib:/lib:
2025-06-27 06:09:28,288 [main] DEBUG com.ca.autosys.db.utils.CommandExecutor(28) - Command Env : ORACLE_HOME = /oracle-client/current_version
2025-06-27 06:09:28,288 [main] DEBUG com.ca.autosys.db.utils.CommandExecutor(28) - Command Env : TNS_ADMIN =
2025-06-27 06:09:29,043 [Thread-26] DEBUG com.ca.autosys.db.utils.CommandExecutorThread(39) - ERROR:
2025-06-27 06:09:29,043 [Thread-26] DEBUG com.ca.autosys.db.utils.CommandExecutorThread(39) - ORA-12154: TNS:could not resolve the connect identifier specified
2025-06-27 06:09:29,043 [Thread-26] DEBUG com.ca.autosys.db.utils.CommandExecutorThread(39) -
2025-06-27 06:09:29,044 [Thread-26] DEBUG com.ca.autosys.db.utils.CommandExecutorThread(39) -
2025-06-27 06:09:29,044 [Thread-26] DEBUG com.ca.autosys.db.utils.CommandExecutorThread(39) - SP2-0751: Unable to connect to Oracle.  Exiting SQL*Plus
2025-06-27 06:09:29,054 [main] INFO  com.ca.autosys.db.utils.CommandExecutor(52) - Command return value:1
2025-06-27 06:09:29,055 [main] DEBUG com.ca.autosys.db.utils.CommandExecutor(54) - RetVal =1
2025-06-27 06:09:29,057 [main] WARN  com.ca.autosys.db.install.CreateInstanceSchema(528) - Found error pattern ORA-12154
2025-06-27 06:09:29,057 [main] ERROR com.ca.autosys.db.install.CreateInstanceSchema(181) - database was not created or updated.
2025-06-27 06:09:29,057 [main] ERROR com.ca.wla.ae.installer.mm.action.UpgradeDatabaseAction(124) - Database was not created or updated.
2025-06-27 06:09:29,057 [main] ERROR com.ca.wla.ae.installer.logger.LogHelper(45) - FatalException : E_AE_Create_Database_Error [CAUAJM_E_116408] An error occurred while creating or upgrading the ACE database. For more information, refer to the log file.
2025-06-27 06:09:29,063 [main] INFO  com.ca.wla.ae.installer.mm.rules.UpgradeDatabaseRule(26) - Evalute custom rule before upgrading database
2025-06-27 06:09:29,063 [main] INFO  com.ca.wla.ae.installer.mm.rules.UpgradeDatabaseRule(31) - Upgrading database
2025-06-27 06:09:31,850 [main] INFO  com.ca.wla.ae.installer.customaction.AEComposePostInstallMessage(33) - Composing post install message
2025-06-27 06:09:31,851 [main] DEBUG com.ca.wla.ae.installer.customaction.AEComposePostInstallMessage(41) - Error message=Encountered fatal error:
    [CAUAJM_E_116408] An error occurred while creating or upgrading the ACE database. For more information, refer to the log file.
 

 

Below environment variables were exported into the shell where the installer was executed, to force the installer to use a custom tmp folder, but the same error continues to happen:

IAXTEMPDIR=/opt/CA/WorkloadAutomationAE/tmp
TEMP=/opt/CA/WorkloadAutomationAE/tmp
TMP=/opt/CA/WorkloadAutomationAE/tmp
IATEMPDIR=/opt/CA/WorkloadAutomationAE/tmp
TMPDIR= /opt/CA/WorkloadAutomationAE/tmp
TEMPDIR=/opt/CA/WorkloadAutomationAE/tmp
INSTALLER_TEMP_DIR=/opt/CA/WorkloadAutomationAE/tmp
LAX_DEBUG=true

 

Cause

Though several potential environment variables were tried, none of them help, the installer ends up attempting to create a temporary shell script in /tmp and execute it.  This is denied by the OS because /tmp has NOEXEC bit set on it, so scripts/executables cannot be executed.

2025-06-27 06:07:49,597 [main] DEBUG com.ca.autosys.db.helper.Utils(98) - exec cmd arg:/bin/sh
2025-06-27 06:07:49,597 [main] DEBUG com.ca.autosys.db.helper.Utils(98) - exec cmd arg:-c
2025-06-27 06:07:49,597 [main] DEBUG com.ca.autosys.db.helper.Utils(98) - exec cmd arg:chmod +x /tmp/tempfile.sh
2025-06-27 06:07:49,612 [main] DEBUG com.ca.autosys.db.helper.Utils(116) - output form process-
2025-06-27 06:07:49,613 [main] DEBUG com.ca.autosys.db.helper.Utils(117) - RetVal =0
2025-06-27 06:07:49,613 [main] DEBUG com.ca.autosys.db.helper.Utils(98) - exec cmd arg:/bin/sh
2025-06-27 06:07:49,613 [main] DEBUG com.ca.autosys.db.helper.Utils(98) - exec cmd arg:-c
2025-06-27 06:07:49,613 [main] DEBUG com.ca.autosys.db.helper.Utils(98) - exec cmd arg:/tmp/tempfile.sh
2025-06-27 06:07:49,620 [main] INFO  com.ca.autosys.db.helper.Utils(149) - Read error stream = /bin/sh: /tmp/tempfile.sh: Permission denied
2025-06-27 06:07:49,620 [main] DEBUG com.ca.autosys.db.helper.Utils(116) - output form process-
2025-06-27 06:07:49,621 [main] DEBUG com.ca.autosys.db.helper.Utils(117) - RetVal =126
2025-06-27 06:07:49,622 [main] DEBUG com.ca.autosys.db.config.EnvVarsParser(72) - Variable value in shell file: null
2025-06-27 06:07:49,623 [main] DEBUG com.ca.autosys.db.config.EngineConfigParser(94) - Invoked for instance:ACE
2025-06-27 06:07:49,623 [main] DEBUG com.ca.autosys.db.config.EngineConfigParser(101) - installPath=/opt/CA/WorkloadAutomationAE instanceName=ACE
2025-06-27 06:07:49,652 [main] INFO  com.ca.autosys.db.helper.Utils(73) - loadProperties : loading /tmp/tempFile.properties, escape true 
2025-06-27 06:07:49,682 [main] DEBUG com.ca.autosys.db.config.EnvVarsParser(176) - Value from webservive conf file: 
2025-06-27 06:07:49,683 [main] DEBUG com.ca.autosys.db.config.EnvVarsParser(87) - Value in webservice file: 
2025-06-27 06:07:49,683 [main] DEBUG com.ca.autosys.db.config.EnvVarsParser(89) - Value of variable is not found: TNS_ADMIN
2025-06-27 06:07:49,683 [main] DEBUG com.ca.autosys.db.config.EnvVarsParser(99) - TNS_ADMINvalue is: 
2025-06-27 06:07:49,684 [main] DEBUG com.ca.autosys.db.config.EngineConfigParser(94) - Invoked for instance:ACE
2025-06-27 06:07:49,685 [main] DEBUG com.ca.autosys.db.config.EngineConfigParser(101) - installPath=/opt/CA/WorkloadAutomationAE instanceName=ACE
2025-06-27 06:07:49,686 [main] DEBUG com.ca.autosys.db.helper.Utils(296) - Content of File:  . /opt/CA/WorkloadAutomationAE/autouser.ACE/autosys.sh.* 
echo $TNS_ADMIN

 

 

That's the reason why $TNS_ADMIN shows up as NULL.

Resolution

  1. copy the AutoSys ISO contents to a location which is editable

  2. change directory to <above location>   and edit the install.bin shell script to make couple of changes highlighted below:

    #!/usr/bin/env sh

    INSTALLER_DIR=`( cd "$(dirname "$0")" && pwd )`

    LD_LIBRARY_PATH=${INSTALLER_DIR}/modules/LIBS:${LD_LIBRARY_PATH}; export LD_LIBRARY_PATH
    _JAVA_OPTIONS=-Djava.io.tmpdir=/opt/CA/WorkloadAutomationAE/tmp; export _JAVA_OPTIONS
    IATEMPDIR=/opt/CA/WorkloadAutomationAE/tmp; export IATEMPDIR
    ${INSTALLER_DIR}/aeinstallhelper $@

  3. Save the file and execute the installer now and the resulting (AutoSys _Workload_Automation_Install*.log file should now show something like:

    ./install.bin

    java.home                     ==/opt/CA/WorkloadAutomationAE/tmp/install.dir.21259/Linux/resource/jre
    java.io.tmpdir                == /opt/CA/WorkloadAutomationAE/tmp
    user.dir                      ==/opt/CA/WorkloadAutomationAE/tmp/install.dir.21259