sslConfig.sh fails with count_certs_in_CF_FILENAME: command not found
search cancel

sslConfig.sh fails with count_certs_in_CF_FILENAME: command not found

book

Article ID: 444197

calendar_today

Updated On:

Products

Network Observability CA Performance Management

Issue/Introduction

When attempting to configure SSL on the DX NetOps Data Aggregator using a PKCS12 (.p12 or .pfx) keystore, the sslConfig.sh script fails with the following error:

/opt/IMDataAggregator/scripts/sslConfig.sh: line 941: count_certs_in_CF_FILENAME: command not found

Environment

  • Product: DX NetOps Performance Management
  • Component: Data Aggregator (DA)
  • Version: 25.4.1 - 25.4.6 

Cause

There is a hardcoded typo in the /opt/IMDataAggregator/scripts/sslConfig.sh script. On line 941, the script incorrectly attempts to call a function named count_certs_in_CF_FILENAME. However, the correct function name defined elsewhere in the script is count_certs_in_FILENAME.

This issue is tracked via defect DE183857.

Resolution

Prerequisites

  • Shell access to the Data Aggregator host as the DA service owner (or root).
  • sed or vi available on the system path.
  • Write permission on /opt/IMDataAggregator/scripts/sslConfig.sh.

Procedure

  1. 1

    Confirm the defect is present

    Run the following command. If it returns output, the defect is present and the patch is needed. If it returns nothing, the file is already corrected — stop here.

    # Should print approximately: 941: count_certs_in_CF_FILENAME "${CF_FILENAME}"
    grep -n 'count_certs_in_CF_FILENAME' \
        /opt/IMDataAggregator/scripts/sslConfig.sh
  2. 2

    Create a dated backup

    Always back up the original before editing. The backup name includes today's date to avoid collisions.

    cp /opt/IMDataAggregator/scripts/sslConfig.sh \
       /opt/IMDataAggregator/scripts/sslConfig.sh.bak.$(date +%Y%m%d)
  3. 3

    Apply the one-line fix

    Choose one of the two methods below.

    Option A — sed (recommended)
    sed -i 's/count_certs_in_CF_FILENAME/count_certs_in_FILENAME/g' \
        /opt/IMDataAggregator/scripts/sslConfig.sh

    The -i flag edits the file in place. The g modifier handles the unlikely case of duplicate typos.

    Option B — vi
    vi +941 /opt/IMDataAggregator/scripts/sslConfig.sh

    Navigate to line 941 and change the line to match the after row in the diff below, then save with :wq.

  4. 4

    Verify the patch

    Run both checks. The first must return nothing; the second must return exactly four lines.

    # Must return empty — bad symbol is gone
    grep -n 'count_certs_in_CF_FILENAME' \
        /opt/IMDataAggregator/scripts/sslConfig.sh
    
    # Must return 4 lines: 1 function definition + 3 pre-existing + 1 repaired call site
    grep -n 'count_certs_in_FILENAME' \
        /opt/IMDataAggregator/scripts/sslConfig.sh

    Before patch

    941: count_certs_in_CF_FILENAME "${CF_FILENAME}"

    After patch

    # grep CF_FILENAME: (no output)
    # grep FILENAME: 4 matching lines
  5. 5

    Confirm the function definition exists

    If this returns nothing, the build has additional corruption and this patch alone is insufficient. Escalate to support.

    grep -n 'count_certs_in_FILENAME\(\)' \
        /opt/IMDataAggregator/scripts/sslConfig.sh

    Expected: one line with the function declaration, e.g. count_certs_in_FILENAME() {