Skip to content
Sourcegraph Help Center home
Sourcegraph Help Center home

Resolving Sourcegraph License Validity Issues

Overview

If you encounter issues with your Sourcegraph license validity, this guide will help you troubleshoot and resolve them.

Before 6.11.1446, applying a new license key would not clear messages from the old, expired license key until the next license validity check, which runs every 12 hours. Common errors include messages indicating that the license has already been used by another instance.
The Sourcegraph license is invalid. Reason: license has already been used by another instance.

Steps to Resolve License Issues

1. Verify License Status

Check the license status by running the following command:

kubectl -n <namespace> exec -it <redis-store-pod> -- redis-cli GET "tnt_1:licensing:is_license_valid"

The output will be 0 or 1. If the output is 0, it indicates an invalid license. Proceed to the next steps.

2. Delete Invalid License Entries

These commands will reset the cached state, set the license check result to true, and delete the invalid reason for the license key so that admins no longer see warnings in the UI. Run these commands to delete invalid license entries:

kubectl -n <namespace> exec -it <redis-store-pod> -- redis-cli DEL "tnt_1:licensing:is_license_valid" kubectl -n <namespace> exec -it <redis-store-pod> -- redis-cli DEL "tnt_1:licensing:license_invalid_reason"

3. Restart Frontend Pods

After updating the license key, restart the frontend pods to clear the errors in the UI.

5. Wait for Changes to Take Effect

Note that changes may take 10-15 minutes to take effect. If issues persist, contact Sourcegraph support for further assistance.

Additional Resources