Problem
Horizon 8 Edge gets stuck in Connect Pending state.
Cause
Connection string was not provided while deploying the Horizon Edge Gateway in VMware vCenter®, which is required to create the Kubernetes namespace in the Horizon Edge Gateway that has the required modules to mark the edge in other states (it can take up to 15-20 minutes sometimes). The connection string is present on the second screen in VMware vCenter®, below the root password.
If the connection string was provided correctly, verify the edge-deployments API call, which looks something like.
admin/v2/edge-deployments/63da2d9216884348cf96a0f5?include_reported_status=true
For more information, see https://kb.vmware.com/s/article/92056
Solution
Make sure view-cs-module is under registeredModules and inside , view-cs-module should be present and be in the CONNECTED state.
Also,- Make sure the Horizon Edge Gateway is correctly deployed and is in the powered-on state. If there is some issue in deployment, check networking, storage, etc.
- Use Horizon Edge Gateway OVA versions
2.3.1.0
or later, if you want to specify public key forccadmin
user to login. Older versions of OVA have an issue while initialising Kubernetes when public key forccadmin
user is specified. - Run the diagnostic script in debug mode. For more information, see https://kb.vmware.com/s/article/92056. In the Kubernetes Cluster Section you should see a namespace created around the time when the Horizon Edge Gateway was powered on the first time.
- If this is not the case and if name space is not created, this could be because of step 2, the network was not configured properly, or the connection string was not provided during edge gateway creation while deploying edge gateway OVA.
The connection string can be configured after deploying Horizon Edge Gateway appliance, if it was not provided while deploying the Horizon Edge Gateway appliance. Copy the pairing code from Horizon Universal Console and run the following command to configure the connection string after deploying the Horizon Edge Gateway appliance
/opt/vmware/bin/pair-edge .sh ‘<Pairing_Code_Copied_From_Horizon_Universal_Console>
. - If the namespace was created and edge is still stuck in connect pending state, this could be because of some network connectivity issues or because of cloud urls not reachable from the edge (this might be due to proxy configuration or some other network-related issues) or because the proxy configuration is updated in the edge.
- After this, if the namespace was created successfully so after this it might take 15 - 20 minutes for the edge to come in Not Configured state as seen in UI or POST_PROVISIONING_CONFIG_IN_PROGRESS in API, if that happens, you should be able to configure the connection server.
If that still doesn't happen, run the diagnostic script and under Kubernetes Cluster Section and wait for
view-cs-module
pod to come up in the running state. Run the diagnostic script in debug mode. For more information, see https://kb.vmware.com/s/article/92056.
- If this is not the case and if name space is not created, this could be because of step 2, the network was not configured properly, or the connection string was not provided during edge gateway creation while deploying edge gateway OVA.
- Download the logs from the operations console, and analyze it to see any obvious issues , otherwise raise a bug and attach the logs there. Steps to download logs:
- Login to ops console, navigate to the specific customer, and verify customer info tab.
- Go to Edge Deployments and get the
deviceId
fromedgeGatewayLocation
field in API response of edge-deployment. - Go to Edgehub management and search with
deviceId
. - Click log collection and click , which will prepare the latest logs.
- Click logs to download the diagnostic logs.
- Unzip the file and go inside log folder to find the relevant module logs.