vmware-rhttpproxy service fails to start during vCenter FQDN change
search cancel

vmware-rhttpproxy service fails to start during vCenter FQDN change

book

Article ID: 407803

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

  • Changing vCenter FQDN in the VAMI (https://<current_vCenter_FQDN_or_IP>:5480) failed with below error:

    some services failed to start

  • The /var/log/vmware/applmgmt/pnid_change.log shows the rhttpproxy service failed to start:

    [YYYY-MM-DDTHH:MM:SS] pnid_utils-restart_services():#### - ERROR - Error executing start on service rhttpproxy. Details {
        "detail": [
            {
                "id": "install.ciscommon.service.failstart",
                "translatable": "An error occurred while starting service '%(0)s'",
                "args": [
                    "rhttpproxy"
                ],
                "localized": "An error occurred while starting service 'rhttpproxy'"
            }
        ],
        "componentKey": null,
        "problemId": null,
        "resolution": null
    }
    Service-control failed. Error: {
        "detail": [
            {
                "id": "install.ciscommon.service.failstart",
                "translatable": "An error occurred while starting service '%(0)s'",
                "args": [
                    "rhttpproxy"
                ],
                "localized": "An error occurred while starting service 'rhttpproxy'"
            }
        ],
        "componentKey": null,
        "problemId": null,
        "resolution": null
    }

  • In /var/log/vmware/rhttpproxy/rhttpproxy.log, the following error is recorded:

    [YYYY-MM-DDTHH:MM:SS] warning rhttpproxy[#####] [Originator@6876 sub=I0.Connection] Skip non-loopback interface address; <resolver p:0x########, 'localhost:549', next:(null)>, address: '<vCenter_IP>'
    [YYYY-MM-DDTHH:MM:SS] error rhttpproxy[#####] [Originator@6876 sub=Default] Application error: Cannot assign requested address

Environment

VMware vCenter Server 7.x

Cause

The issue occurs if the /etc/hosts file contains an incorrect entry.

For example:
  
# less /etc/hosts
<vCenter_IP> localhost    ---->This entry should not exist
# Generated by Studio VAMI service. Do not modify manually.
127.0.0.1  vcenter.sample.com vcenter localhost
::1  vcenter.sample.com vcenter localhost ipv6-localhost ipv6-loopback
# VAMI_EDIT_END

Resolution

Note: A valid backup or snapshot of the vCenter must be available before performing any changes.

  1. Connect to the vCenter through SSH.
  2. Navigate to the /etc/ directory:

    # cd /etc/

  3. Create a backup of the hosts file:

    # cp hosts hosts.bk

  4. Edit the hosts file
    • # vi hosts
    • Type i to enter insert mode.
    • Delete the incorrect entry.    -----> <vCenter_IP> localhost in the example
    • Press ESC to exit insert mode.
    • Type :wq! and press Enter to save and exit.
  5. Start vCenter services using the command below:

    # service-control --start --all