Error: "java.lang.NumberFormatException: null" when trying to add a standby cell to the Cloud Director cluster
search cancel

Error: "java.lang.NumberFormatException: null" when trying to add a standby cell to the Cloud Director cluster

book

Article ID: 446925

calendar_today

Updated On:

Products

VMware Cloud Director

Issue/Introduction

  • You see issues while trying to add cells to the cluster after VMware Cloud Director(VCD) upgrade.
  • You can see the below errors from /opt/vmware/var/log/vcd/configure-vcd.log:

    NOTICE: destination directory "/var/vmware/vpostgres/current/pgdata" provided
    INFO: connecting to source node
    DETAIL: connection string is: user=repmgr host=##.##.##.## gssencmode=disable
    ERROR: connection to database failed
    DETAIL:
    connection to server at "##.##.##.##", port #### 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
    yyyy-mm-dd hh:mm:ss | setup-repmgr-standby.sh | [ERROR] Error creating clone of primary node to this standy server using repmgr
    yyyy-mm-dd hh:mm:ss | setupvcd.sh | [ERROR] Failed to configure repmgr on this standby. Check /opt/vmware/var/log/vcd/configure-vcd.log for additional information. Aborting.
    yyyy-mm-dd hh:mm:ss | configure-vcd.sh | [ERROR] setupvcd script failed to execute.
    yyyy-mm-dd hh:mm:ss | cleanup-vcd.sh | Starting cleanup script.
    yyyy-mm-dd hh:mm:ss | cleanup-vcd.sh | The following error code was provided as argument to script: 15
    yyyy-mm-dd hh:mm:ss | cleanup-vcd.sh | Attempting cleanup on standby appliance.
    yyyy-mm-dd hh:mm:ss | cleanup-vcd.sh | Executing configure_vcd_base_cleanup.
    yyyy-mm-dd hh:mm:ss | cleanup-vcd.sh | Executing repmgr_standby_cleanup.
    yyyy-mm-dd hh:mm:ss | cleanup-vcd.sh | standby unregister not required, based upon error code provided.
    yyyy-mm-dd hh:mm:ss | cleanup-vcd.sh | Resetting remaining repmgr and vpostgres configuration back to initial state.
    yyyy-mm-dd hh:mm:ss | cleanup-vcd.sh | Unmounting NFS share and cleaning up /etc/fstab.
    yyyy-mm-dd hh:mm:ss | cleanup-vcd.sh | Executing clear_ovfenv_params

Environment

VMware Cloud Director 10.6.1.2

Cause

The issue was caused because the VCD DB URL was pointing to the previous eth1 I.P address(previous primary VCD DB) and hence when you try to configure standby cell it throws an error saying database is not accepting connections.

Resolution

To resolve the issue copy the correct response.properties from primary cell to the transfer folder. So follow the below steps to copy the correct response.properties to transfer folder:

  1. Open ssh to the primary VCD cell and go to the folder: /opt/vmware/vcloud-director/data/transfer and make a backup of the response.properties. Use the below command:

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

  2. Now go to /opt/vmware/vcloud-director/etc and copy the correct response.properties file to the transfer location using the below command:

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

  3.  Now open VAMI and try registering the new standby node. It should proceed without any further error.