Failed to configure vCenter HA after restoring vCSA
search cancel

Failed to configure vCenter HA after restoring vCSA

book

Article ID: 378495

calendar_today

Updated On:

Products

VMware vCenter Server 7.0 VMware vCenter Server 8.0

Issue/Introduction

  • Unable to configure vCenter HA after restoring vCSA from a file-based backup.
  • The /var/log/vmware/vcha/prepare-vcha.log contains the following errors:

    2024-08-28T06:40:11.137Z INFO prepare-vcha Configuring lighttpd for splash screen...
    2024-08-28T06:40:11.137Z INFO prepare-vcha reloading vami-lighttp
    2024-08-28T06:40:11.335Z ERROR prepare-vcha Failed to configure VCHA splash screen: rc = [1], stdout = [], stderr = [Job for vami-lighttp.service failed because the control process exited with error code.
    See "systemctl status vami-lighttp.service" and "journalctl -xe" for details.
    ]

  • The /var/log/vmware/message contains the following error

    2024-08-28T06:40:11.142890+00:00 localhost systemd[1]: Stopping vami-lighttp.service...
    2024-08-28T06:40:11.278740+00:00 localhost vami-lighttp[111038]: Stopping vami-lighttpd:[  OK  ]
    2024-08-28T06:40:11.279432+00:00 localhost systemd[1]: vami-lighttp.service: Succeeded.
    2024-08-28T06:40:11.279805+00:00 localhost systemd[1]: Stopped vami-lighttp.service.
    2024-08-28T06:40:11.281221+00:00 localhost systemd[1]: Starting vami-lighttp.service...
    2024-08-28T06:40:11.300531+00:00 localhost vami-lighttp[111059]: Starting vami-lighttpd:
    2024-08-28T06:40:11.300608+00:00 localhost vami-lighttp[111074]: cgi.assign += ( ".cgi"  => "/usr/bin/python" )
    2024-08-28T06:40:11.304812+00:00 localhost vami-lighttp[111067]: Firstboot status: succeeded
    2024-08-28T06:40:11.306954+00:00 localhost vami-lighttp[111067]: Granting permission to lighttpd for reading vecs store
    2024-08-28T06:40:11.312895+00:00 localhost vami-lighttp[111082]: Permissions for store [MACHINE_SSL_CERT] set successfully
    2024-08-28T06:40:11.313091+00:00 localhost vami-lighttp[111082]:  
    2024-08-28T06:40:11.313119+00:00 localhost vami-lighttp[111067]: Extracting SSL certificate from VECS
    2024-08-28T06:40:11.324372+00:00 localhost vami-lighttp[111067]: SSL certificate extracted
    2024-08-28T06:40:11.331688+00:00 localhost vami-lighttp[111094]: Duplicate config variable in conditional 8 global/SERVERsocket==:11081: server.document-root
    2024-08-28T06:40:11.331738+00:00 localhost vami-lighttp[111094]: 2024-08-28 06:40:11: (/build/mts/release/bora-16973022/studio/src/vami/apps/lighttpd/src/configfile.c.1175) source: /opt/vmware/etc/lighttpd/lighttpd.conf line: 729 pos: 21 parser failed somehow near here: (EOL)
    2024-08-28T06:40:11.334286+00:00 localhost vami-lighttp[111059]: [FAILED]
    2024-08-28T06:40:11.334531+00:00 localhost systemd[1]: vami-lighttp.service: Control process exited, code=exited, status=1/FAILURE
    2024-08-28T06:40:11.334599+00:00 localhost systemd[1]: vami-lighttp.service: Failed with result 'exit-code'.
    2024-08-28T06:40:11.334963+00:00 localhost systemd[1]: Failed to start vami-lighttp.service.

Cause

This issue occurs when attempting to rebuild vCenter HA with a vCenter Server restored from a file-based backup taken while configuring vCenter HA.
The restored vCenter Server already has the vCenter HA settings in lighttpd.conf, so vami-lighttp service fails to restart because of duplicate settings.

Resolution

VMware is aware of this issue and working towards a fix.

Workaround:
To workaround this issue, maunally deleting vCenter HA settings from lighttpd.conf after restoring.


1. Change the directory
    cd /opt/vmware/etc/lighttpd
2. Create a backup of the lighttpd.conf
    cp lighttpd.conf lighttpd.conf.bak
3. Edit the lighttpd.conf
    vi lighttpd.conf
4. Delete following entry and save
    
    #######################################################################
    ##
    ## AUTOMATICALLY EDITED PART, DO NOT EDIT!
    ## Splash configuration for VCHA.
    ##
    $SERVER["socket"] == ":11081" {
        server.document-root = server_root + "/vchadocs"
        url.rewrite-once = ( "^/(.*)" => "/index.html" )
    }
    ##
    #######################################################################


5. Retry configure vCenter HA
6. If successful, delete the backed up file
    rm lighttpd.conf.bak