top of page

Experienced Technology Product Manager adept at steering success throughout the entire product lifecycle, from conceptualization to market delivery. Proficient in market analysis, strategic planning, and effective team leadership, utilizing data-driven approaches for ongoing enhancements.

  • Twitter
  • LinkedIn
White Background

vRA services health check failed. For more information, see Services page


Though all services on my vRealize Automation node are showing up as "REGISTERED",

I would see an exception stating "vRA services health check failed. For more information, see Services page"


There was a vRA hardening which was done and post that this issue was seen


This is the script inside an appliance responsible for the above exception


/opt/vmware/share/htdocs/service/café/utils.py

This the code responsible


def vra_healthcheck():
    url = 'http://127.0.0.1:8082/vcac/services/api/health'
    code = 0
    try:
        request = urllib2.Request(url)
        response = urllib2.urlopen(request)
        code = response.getcode()
    except urllib2.HTTPError as e:
        code = e.code
    except urllib2.URLError as e:
        pass
 
    return True if code >= 200 and code < 300 else False

When this issue is seen if you just execute a curl to check the health of services, it would return an exception stating the combination of host and port requires TLS.


curl -kv http://127.0.0.1:8082/vcac/services/api/health
 * Expire in 0 ms for 6 (transfer 0x2595030)
 *   Trying 127.0.0.1...
 * TCP_NODELAY set
 * Expire in 200 ms for 4 (transfer 0x2595030)
 * Connected to 127.0.0.1 (127.0.0.1) port 8082 (#0)
 > GET /vcac/services/api/health HTTP/1.1
 > Host: 127.0.0.1:8082
 > User-Agent: curl/7.64.0-DEV
 > Accept: */*
 >
 < HTTP/1.1 400
 < Content-Type: text/plain;charset=ISO-8859-1
 < Connection: close
 <
 Bad Request
 This combination of host and port requires TLS.
 * Closing connection 0

To fix this issue we have to change the code in the above mentioned script as follows


Script Path

/opt/vmware/share/htdocs/service/café/utils.py


def vra_healthcheck():
    url = 'https://127.0.0.1:8082/vcac/services/api/health'
    code = 0
    try:
        request = urllib2.Request(url)
        response = urllib2.urlopen(request)
        code = response.getcode()
    except urllib2.HTTPError as e:
        code = e.code
    except urllib2.URLError as e:
        pass
 
    return True if code >= 200 and code < 300 else False

So your just change the URL section from HTTP to HTTPS, the exception seen in the UI is gone

1,129 views0 comments

Comments

Rated 0 out of 5 stars.
No ratings yet

Add a rating
bottom of page