Telemetry Script Fails with "The Network Adapter could not establish the connection"
search cancel

Telemetry Script Fails with "The Network Adapter could not establish the connection"

book

Article ID: 439542

calendar_today

Updated On:

Products

Autosys Workload Automation

Issue/Introduction

When running the telemetry.sh utility on AutoSys 12.1.0.0, the script fails with the following errors in the logs:

  • SEVERE: SQLException: IO Error: The Network Adapter could not establish the connection
  • SEVERE: Exception in collecting and publishing telemetry data : Connection to Primary or Single event server Failed
  • java.sql.SQLException: Connection to Primary or Single event server Failed

Despite these errors, the core AutoSys scheduler may be running without issue.

Environment

Autosys 12.1 , 24.x using Oracle

Cause

The root cause is a difference in how the core AutoSys scheduler and the Telemetry utility resolve database aliases:

  1. AutoSys Scheduler: Uses the native Oracle C/C++ client (OCI), which can resolve aliases via LDAP (as defined in sqlnet.ora).
  2. Telemetry Utility: This is a Java-based application that relies on the Oracle JDBC Thin Driver. By default, this driver does not natively resolve aliases via LDAP. If it cannot find a standard tnsnames.ora file containing the alias, it fails to resolve the host IPs

Resolution

To resolve this, provide a localized tnsnames.ora file for the Telemetry script to bypass the LDAP resolution limitation.

  1. Create a local TNS directory and file: Create a new folder and a tnsnames.ora file (e.g., in /tmp or the AutoSys user's home directory):

    mkdir -p /tmp/telemetry_tnsvi /tmp/telemetry_tns/tnsnames.ora
  2. Insert the TNS configuration: Paste the resolved connection string (from tnsping) into this file using the following format:

    [ALIAS_NAME] = 
      (DESCRIPTION_LIST=
        (LOAD_BALANCE=OFF)
        (DESCRIPTION=
          (ADDRESS=(PROTOCOL=TCP)(HOST=[DB_HOSTNAME])(PORT=1521))
          (CONNECT_DATA=(SERVICE_NAME=[SERVICE_NAME]))
        )
      )

  3. Run the telemetry script: Set the $TNS_ADMIN environment variable to point to the new directory before executing the script:

     

    export TNS_ADMIN=/tmp/telemetry_tns