> For the complete documentation index, see [llms.txt](https://developer.harness.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.harness.io/self-managed-enterprise-edition/troubleshooting-and-resources/troubleshooting/license-issues.md).

# License issues

License issues can occur even after you apply the license via a Helm values file. Use the following processes to identify and troubleshoot license issues.

### Check for a NextGen license <a href="#check-for-a-nextgen-license" id="check-for-a-nextgen-license"></a>

Follow these steps to confirm that your Harness installation includes a NextGen license:

1. Retrieve the MongoDB password:

   ```sh
   kubectl get secret -n <namespace> mongodb-replicaset-chart -o jsonpath={.data.mongodb-root-password} | base64 --decode | awk '{print $1}'
   ```
2. Open an interactive Shell session in the MongoDB container:

   ```sh
   kubectl exec -it mongodb-replicaset-chart-0 -n <namespace> -- /bin/sh
   ```
3. Connect to the MongoDB instance:

   ```sh
   mongo
   ```
4. Authenticate to the database in the `admin` role:

   ```sh
   use admin
   db.auth('admin', <password>)
   ```
5. Set the context to Harness NextGen and locate the license:

   ```sh
   use ng-harness
   db.moduleLicenses.find({})
   ```
6. If the licenses are present, proceed with refreshing the license.

### Refresh a NextGen license <a href="#refresh-a-nextgen-license" id="refresh-a-nextgen-license"></a>

Use the following strategies to refresh a NextGen license.

#### Discard the Redis cache for the NextGen license <a href="#discard-the-redis-cache-for-the-nextgen-license" id="discard-the-redis-cache-for-the-nextgen-license"></a>

1. Retrieve the Redis master host:

   ```sh
   kubectl exec -it redis-sentinel-harness-server-0 -n <namespace> -- redis-cli info | grep master_host | cut -c 13-
   ```
2. Find the Redis master service:

   ```sh
   kubectl get svc -n <namespace> | grep <IP-From-Previous-Command>
   ```

   Copy the service name from the result.
3. Delete license keys:

   ```sh
   kubectl exec -it <Pod-Name-From-Previous-Step> -n <namespace> -- redis-cli del "hCache/NGLicense" "jcache_timeout_set:{hCache/NGLicense}"
   ```
4. Reload the UI.

   If this does not refresh the license:

   * Repeat the process a second time.
   * Wait 5 minutes before you reload the UI.

### Additional troubleshooting for "Failed to Retrieve License Information" <a href="#additional-troubleshooting-for-failed-to-retrieve-license-information" id="additional-troubleshooting-for-failed-to-retrieve-license-information"></a>

#### Step 1: Rule Out Browser Cache Issues <a href="#step-1-rule-out-browser-cache-issues" id="step-1-rule-out-browser-cache-issues"></a>

1. Try logging in through Incognito Mode or a different browser:
   * If this resolves the issue, proceed to clear the browser cache.
2. Hard refresh the page:
   * Press `Cmd+Shift+R` (Mac) or `Ctrl+Shift+R` (Windows/Linux) to perform a hard refresh.
3. Clear browser cache and cookies:
   * Go to your browser settings and clear the cache and cookies for the affected webpage.

#### Step 2: Verify services status <a href="#step-2-verify-services-status" id="step-2-verify-services-status"></a>

Check all services:

* Run the following command to ensure all services are running correctly:

  ```sh
  kubectl get pods -n <namespace>
  ```
* If any services are in an unhealthy state, it might cause missing data in the database.

#### Step 3: Delete license cache <a href="#step-3-delete-license-cache" id="step-3-delete-license-cache"></a>

You can delete the license keys:

```sh
kubectl exec -it <Service-From-Previous-Step> -n <namespace> -- redis-cli del "hCache/NGLicense" "jcache_timeout_set:{hCache/NGLicense}"
```

#### Step 4: Restart services <a href="#step-4-restart-services" id="step-4-restart-services"></a>

1. Restart `ng-manager`:

   ```sh
   kubectl rollout restart deploy ng-manager -n <namespace>
   ```
2. Restart `harness-manager`:

   ```sh
   kubectl rollout restart deploy harness-manager -n <namespace>
   ```

#### Step 5: Reload the UI <a href="#step-5-reload-the-ui" id="step-5-reload-the-ui"></a>

* Try loading the UI again to check if the issue is resolved.

#### Step 6: Contact Support <a href="#step-6-contact-support" id="step-6-contact-support"></a>

* If the issue persists, generate a support bundle and send it to [Harness Support](mailto:support@harness.io). For more information, go to [Support Bundle Utility](/self-managed-enterprise-edition/troubleshooting-and-resources/support-bundle-utility.md).
