Github Enterprise cloud (github.com) Endpoint test connection fails with java.net.UnknownHostException when proxy mapping is enabled in Aria Suite Lifecycle Manager
search cancel

Github Enterprise cloud (github.com) Endpoint test connection fails with java.net.UnknownHostException when proxy mapping is enabled in Aria Suite Lifecycle Manager

book

Article ID: 387142

calendar_today

Updated On:

Products

VMware Aria Suite

Issue/Introduction

After adding Github Enterprise cloud endpoint (github.com) with proxy mapping in Aria Suite Lifecycle Manager, We see an UnKnownHost exception with the below events:

2024-11-11 01:03:05.570 ERROR <FQDN> — [nio-8083-exec-6] c.v.b.BlackstoneProxySelector [allowProxy] : Received exception while fetching ip:
2024-11-11 01:03:05.570 ERROR <FQDN> — [nio-8083-exec-6] c.v.b.s.g.GitHubServiceImpl [validateSourceControl] : Client Exception : response status - 400 BAD_REQUEST
2024-11-11 01:03:05.570 ERROR <FQDN> — [nio-8083-exec-6] c.v.b.s.g.GitHubServiceImpl [validateSourceControl] : Failed to get files in repository [Domain/Username] org.springframework.web.client.HttpClientErrorException: 400 I/O error on GET request for "https://api.github.com/repos/########/#########/git/trees/main": api.github.com; nested exception is java.net.UnknownHostException: api.github.com

Environment

Aria Suite Lifecycle Manager 8.12 and later.

Cause

DNS does not resolve the hostname and is unable to get the IP Address leading to the Test Connection Failure.

Resolution

The fix will be available in the release 8.18 Patch-2.

To resolve the issue, please replace the Jar file with the one provided in this KB.

Replace the jar file:

Steps to apply the jar :

  1. Take a snapshot of the LCM Appliance.
  2. Replace the existing jar file in the below location with the jar file attached to this KB.
    # /opt/vmware/vlcm/blackstone/spring-common
  3. Restart the service with the command
    # systemctl restart blackstone-spring
  4. Try to add the endpoint again.

The above steps should enable us to Communicate with the Github Enterprise cloud (github.com) with Proxy Mapping in Aria Suite Lifecycle Manager.

 

Workaround:

Whitelist the Proxy in LCM:

  1. Edit the proxy.list file.
    # vi /var/lib/vrlcm/final/proxy/proxy.list

  2. Add the below URLs to the end of the list.
  3. This proxy.list file will have urls which will be whitelisted for the proxy from the LCM perspective.

Note: By design, you must add the URLs to the proxy list in Aria Suite Lifecycle Manager to whitelist them for passing through the proxy server.

The above step should fix the issue, If the Test connection fails with the same error, Add the   in the /etc/hosts file this seems to work.

  1. Edit /etc/hosts file.

    # vi /etc/hosts


  2. Add the Github FQDN/IP as below

    VAMI_EDIT_BEGIN
    Generated by Studio VAMI service. Do not modify manually.
    127.0.0.1 <FQDN> <Alias-ShortName> localhost
    ::1 <FQDN> <Alias-ShortName> localhost ipv6-localhost ipv6-loopback
    <github-IP> github.com ---> Github FQDN/IP
    <api-github-IP> api.github.com ----> Github FQDN/IP
    VAMI_EDIT_END

  3. Run the below cURL command to confirm.
    # curl -x http://<Proxy-Server-FQDN>:8080 -vvv telnet://api.github.com:443

    Response:
    Uses proxy env variable no_proxy == 'localhost, 127.0.0.1'
    Trying ##.##.##.##:8080...
    Connected to <Proxy-Server-FQDN> (##.##.##.##) port 8080 (#0)
    CONNECT tunnel: HTTP/1.1 negotiated

The endpoint test connection should complete successfully.

Attachments

blackstone-external-new-8.18.0.jar get_app