Error 'The following error code was provided as argument to script: 15' during setup of standby appliance in VMware Cloud Director
search cancel

Error 'The following error code was provided as argument to script: 15' during setup of standby appliance in VMware Cloud Director

book

Article ID: 399689

calendar_today

Updated On:

Products

VMware Cloud Director

Issue/Introduction

  • Standby cell was deployed, however system setup from VAMI 'https://Cell-IP-Address:5480' failed
  • In the /opt/vmware/var/log/vcd/configure-vcd.log of failed standby cell, you see errors while attempting clone database from primary database cell:

    2025-05-29 05:05:14 | configure-repmgr.sh | Writing /opt/vmware/vpostgres/current/etc/repmgr.conf
    Cloning primary database (PrimaryCell_DB_IP) to standby using repmgr. This may take a long time, depending on database size.
    2025-05-29 05:05:14 | setup-repmgr-standby.sh | Cloning primary database (PrimaryCell_DB_IP) to standby using repmgr. This may take a long time, depending on database size.
    NOTICE: destination directory "/var/vmware/vpostgres/current/pgdata" provided
    INFO: connecting to source node
    DETAIL: connection string is: user=repmgr host=PrimaryCell_DB_IP gssencmode=disable
    ERROR: connection to database failed
    DETAIL:
    connection to server at "PrimaryCell_DB_IP", port 5432 failed: Connection refused
            Is the server running on that host and accepting TCP/IP connections?

    Error creating clone of primary node to this standy server using repmgr
    2025-05-29 05:05:14 | setup-repmgr-standby.sh | [ERROR] Error creating clone of primary node to this standby server using repmgr
    2025-05-29 05:05:14 | setupvcd.sh | [ERROR] Failed to configure repmgr on this standby. Check /opt/vmware/var/log/vcd/configure-vcd.log for additional information. Aborting.
    2025-05-29 05:05:14 | configure-vcd.sh | [ERROR] setupvcd script failed to execute.
    2025-05-29 05:05:14 | cleanup-vcd.sh | Starting cleanup script.
    2025-05-29 05:05:14 | cleanup-vcd.sh | The following error code was provided as argument to script: 15

  • In /opt/vmware/vcloud-director/data/transfer/responses.properties of primary VCD database cell, we noticed the 'database.jdbcUrl' was pointing to incorrect IP address

Environment

VMware Cloud Director

Cause

This issue was caused by incorrect database address in /opt/vmware/vcloud-director/data/transfer/responses.properties of primary VCD database cell

Resolution

To resolve this issue,  perform the following actions:

  1. To verify the database IP address used by primary database cell, SSH to primary database cell and run any of the following commands:

    sudo -i -u postgres  /opt/vmware/vpostgres/current/bin/repmgr cluster show

    Note: Make a note of value associated with 'host='  under 'Connection string' for primary cell

    Or 

    ifconfig 

    Note: Make a note of IP address associated with eth1


  2. Backup file '/opt/vmware/vcloud-director/data/transfer/responses.properties' with following command:

    cp /opt/vmware/vcloud-director/data/transfer/responses.properties /opt/vmware/vcloud-director/data/transfer/responses.properties.bak

  3. Modify the file  '/opt/vmware/vcloud-director/data/transfer/responses.properties'  and update the value of 'database.jdbcUrl =' with correct database IP address  captured in step.1

Once the database address is corrected on primary cell, setup of newly deployed standby cell will complete