Troubleshooting workspaces
When working with GitLab workspaces, you might encounter the following issues.
Error: Failed to renew lease
When creating a workspace, you might encounter the following error message in the agent’s log:
{"level":"info","time":"2023-01-01T00:00:00.000Z","msg":"failed to renew lease gitlab-agent-remote-dev-dev/agent-123XX-lock: timed out waiting for the condition\n","agent_id":XXXX}
The error is because of a known issue in the GitLab agent for Kubernetes.
This error occurs when an agent instance cannot renew its leadership lease, causing leader-only modules like remote_development
to shut down.
To resolve this issue:
- Restart the agent instance.
- If the issue persists, check your Kubernetes cluster’s health and connectivity.
Error: No agents available to create workspaces
When you create a workspace in a project, you might get the following error:
No agents available to create workspaces. Please consult Workspaces documentation for troubleshooting.
To resolve this issue:
Check agent configuration:
Verify the
remote_development
module is enabled in your agent configuration:remote_development: enabled: true
- If the
remote_development
module is disabled for the GitLab agent, setenabled
totrue
.
- If the
Check permissions:
- Ensure you have at least the Developer role for both the workspace project and agent project.
- If you do not have at least the Developer role for the workspace and agent projects, contact your administrator.
- Verify the agent is allowed in an ancestor group of your workspace project.
- If the ancestor groups of the project do not have an allowed agent, allow an agent for any of these groups.
- Ensure you have at least the Developer role for both the workspace project and agent project.
Check agent logs:
kubectl logs -f -l app=gitlab-agent -n gitlab-workspaces
Docs
Edit this page to fix an error or add an improvement in a merge request.
Create an issue to suggest an improvement to this page.
Product
Create an issue if there's something you don't like about this feature.
Propose functionality by submitting a feature request.
Feature availability and product trials
View pricing to see all GitLab tiers and features, or to upgrade.
Try GitLab for free with access to all features for 30 days.
Get help
If you didn't find what you were looking for, search the docs.
If you want help with something specific and could use community support, post on the GitLab forum.
For problems setting up or using this feature (depending on your GitLab subscription).
Request support