Chapter 12. Troubleshoot OpenShift Dev Spaces
Diagnose and resolve common OpenShift Dev Spaces workspace issues by collecting logs and applying targeted fixes.
When a workspace fails to start, runs slowly, or displays unexpected errors, start by reviewing logs from the workspace pod, the OpenShift Dev Spaces operator, and the language server.
12.1. OpenShift Dev Spaces workspace logs Copy linkLink copied to clipboard!
OpenShift Dev Spaces workspace logs capture IDE extension activity, container memory events, and process errors. Review these logs to diagnose workspace failures, debug misbehaving extensions, and identify memory issues.
- An IDE extension misbehaves or needs debugging
- The logs list the plugins that have been loaded by the editor.
- The container runs out of memory
-
The logs contain an
OOMKillederror message. Processes running in the container attempted to request more memory than is configured to be available to the container. - A process runs out of memory
-
The logs contain an error message such as
OutOfMemoryException. A process inside the container ran out of memory without the container noticing.
12.1.1. View workspace logs in CLI Copy linkLink copied to clipboard!
Use the OpenShift command-line interface (CLI) to observe OpenShift Dev Spaces workspace logs to troubleshoot startup failures and runtime errors.
Prerequisites
- You have the OpenShift Dev Spaces workspace <workspace_name> running.
- You have an OpenShift CLI session with access to the OpenShift project <namespace_name> containing this workspace.
Procedure
Get the logs from the pod running the <workspace_name> workspace in the <namespace_name> project:
$ oc logs --follow --namespace='<workspace_namespace>' \ --selector='controller.devfile.io/devworkspace_name=<workspace_name>'
12.1.2. View workspace logs in OpenShift console Copy linkLink copied to clipboard!
Use the OpenShift console to observe OpenShift Dev Spaces workspace logs.
Prerequisites
- You have a running OpenShift Dev Spaces workspace.
- You have access to the OpenShift web console.
Procedure
- In the OpenShift Dev Spaces dashboard, go to Workspaces.
- Click a workspace name to display the workspace overview page. This page displays the OpenShift project name <project_name>.
- Click the upper right Applications menu, and click the OpenShift console link.
- Run the next steps in the OpenShift console, in the Administrator perspective.
- Click Workloads > Pods to see a list of all the active workspaces.
- In the Project drop-down menu, select the <project_name> project to narrow the search.
- Click the name of the running pod that runs the workspace. The Details tab contains the list of all containers with additional information.
- Go to the Logs tab.
12.1.3. View language server and debug adapter logs in the editor Copy linkLink copied to clipboard!
In the Microsoft Visual Studio Code - Open Source editor running in your workspace, configure the installed language server and debug adapter extensions to view their logs.
Prerequisites
- You have a running OpenShift Dev Spaces workspace with Microsoft Visual Studio Code - Open Source as the editor.
- You have a language server or debug adapter extension installed in the editor.
Procedure
-
Configure the extension: click File > Preferences > Settings, expand the Extensions section, search for your extension, and set the
trace.serveror similar configuration toverbose, if such configuration exists. Refer to the extension documentation for further configuration. - View your language server logs by clicking View > Output, and selecting your language server in the drop-down list for the Output view.
12.2. Slow workspace troubleshooting Copy linkLink copied to clipboard!
Identify configuration changes that reduce OpenShift Dev Spaces workspace startup time and improve runtime performance, including image pre-pulling, storage strategy tuning, and resource adjustments.
12.2.1. Improving workspace start time Copy linkLink copied to clipboard!
- Caching images with Image Puller
Role: Administrator
When starting a workspace, OpenShift pulls the images from the registry. A workspace can include many containers meaning that OpenShift pulls Pod’s images (one per container). Depending on the size of the image and the bandwidth, it can take a long time.
Image Puller is a tool that can cache images on each of OpenShift nodes. As such, pre-pulling images can improve start times.
- Choosing better storage type
Role: Administrator and user
Every workspace has a shared volume attached. This volume stores the project files, so that when restarting a workspace, changes are still available. Depending on the storage, attach time can take up to a few minutes, and I/O can be slow.
- Installing offline
Role: Administrator
Components of OpenShift Dev Spaces are OCI images. Configure Red Hat OpenShift Dev Spaces in offline mode to reduce any extra download at runtime because everything needs to be available from the beginning.
- Reducing the number of public endpoints
Role: Administrator
For each endpoint, OpenShift is creating OpenShift Route objects. Depending on the underlying configuration, this creation can be slow.
To avoid this problem, reduce the exposure. For example, Microsoft Visual Code - Open Source has three optional routes. These routes automatically detect a new port listening inside containers and redirect traffic for processes using a local IP address (
127.0.0.1).By reducing the number of endpoints and checking endpoints of all plugins, workspace start can be faster.
12.2.2. Improving workspace runtime performance Copy linkLink copied to clipboard!
- Providing enough CPU resources
Plugins consume CPU resources. For example, when a plugin provides IntelliSense features, adding more CPU resources can improve performance.
Ensure the CPU settings in the devfile definition,
devfile.yaml, are correct:components: - name: tools container: image: quay.io/devfile/universal-developer-image:ubi8-latest cpuLimit: 4000m cpuRequest: 1000m- cpuLimit
- Specifies the CPU limit.
- cpuRequest
- Specifies the CPU request.
- Providing enough memory
Plug-ins consume CPU and memory resources. For example, when a plugin provides IntelliSense features, collecting data can consume all the memory allocated to the container.
Providing more memory to the container can increase performance. Ensure that memory settings in the devfile definition
devfile.yamlfile are correct.components: - name: tools container: image: quay.io/devfile/universal-developer-image:ubi8-latest memoryLimit: 6G memoryRequest: 512Mi- memoryLimit
- Specifies the memory limit.
- memoryRequest
- Specifies the memory request.
12.3. Troubleshoot network problems Copy linkLink copied to clipboard!
Diagnose and resolve OpenShift Dev Spaces network connectivity issues including WebSocket failures, proxy configuration problems, and Domain Name System (DNS) resolution errors.
Prerequisites
- You have an active workspace URL or the OpenShift Dev Spaces dashboard URL.
Procedure
Verify that the browser supports WebSocket connections by opening the browser developer tools (F12), navigating to the Console tab, and running:
var ws = new WebSocket('wss://echo.websocket.org'); ws.onopen = function() { console.log('WebSocket OK'); ws.close(); }; ws.onerror = function() { console.log('WebSocket FAILED'); };If the output is
WebSocket FAILED, WebSocket connections are blocked. Contact your network administrator to allow WSS connections on port 443.- Verify that firewall rules allow WebSocket Secure (WSS) connections on port 443 to the OpenShift Dev Spaces hostname.
- If your network uses a proxy server, verify that the proxy allows WebSocket upgrade requests. Some proxies block HTTP upgrade headers by default.
Verify DNS resolution from a workspace terminal:
nslookup <devspaces_hostname>If the DNS lookup fails, the workspace Pod cannot resolve the OpenShift Dev Spaces hostname. Verify the cluster DNS configuration and any custom DNS settings in the workspace namespace.
If you encounter
x509: certificate signed by unknown authorityerrors when connecting to an HTTPS endpoint from inside a workspace, the workspace does not trust the TLS certificate.Contact your administrator to import the required Certificate Authority (CA) certificates.
Verification
- Open a workspace and verify that the IDE loads without connection errors.
- Verify that Git operations (clone, push, pull) complete without network timeouts.
12.4. Webview loading error troubleshooting Copy linkLink copied to clipboard!
If you use Microsoft Visual Studio Code - Open Source in a private browsing window, you might encounter an error message. The error is: Error loading webview: Error: Could not register service workers.
This is a known issue affecting the following browsers:
- Google Chrome in Incognito mode
- Mozilla Firefox in Private Browsing mode
| Browser | Workarounds |
|---|---|
| Google Chrome |
Go to Settings |
| Mozilla Firefox | Webviews are not supported in Private Browsing mode. See the Mozilla bug report for details. |
12.5. Troubleshooting devfile issues Copy linkLink copied to clipboard!
Diagnose and resolve common devfile issues that prevent workspaces from starting or operating correctly. Issues include syntax errors, component failures, lifecycle command problems, and volume or endpoint misconfigurations.
12.5.1. Devfile syntax and validation errors Copy linkLink copied to clipboard!
| Symptom | Resolution |
|---|---|
|
Workspace fails to start with | The devfile contains a syntax error. Validate the devfile YAML against the devfile schema. Check for incorrect indentation, missing required fields, or unsupported properties. |
| Workspace starts but ignores devfile changes. | OpenShift Dev Spaces caches devfile content. Delete the workspace and create a new one from the updated repository URL to apply devfile changes. |
|
Error: |
The devfile is missing the |
12.5.2. Component and container errors Copy linkLink copied to clipboard!
| Symptom | Resolution |
|---|---|
|
Workspace Pod shows | The container image specified in the devfile component fails to start. Verify that the image exists and runs correctly outside of OpenShift Dev Spaces. Check container logs for details. |
|
|
The container image is missing libraries required by VS Code. Add |
|
Devfile component does not have enough memory and is |
The default memory limit is insufficient for the workload. Add or increase |
12.5.3. Command and lifecycle errors Copy linkLink copied to clipboard!
| Symptom | Resolution |
|---|---|
|
A | The command exits with a non-zero code. Check workspace logs for the command output. Verify the command path and syntax. Ensure the command is executable inside the container. |
|
Multiple |
The devfile specification allows only one |
12.5.4. Volume and endpoint errors Copy linkLink copied to clipboard!
| Symptom | Resolution |
|---|---|
| Source code changes are lost after workspace restart. |
The |
|
Endpoint URL returns |
The application inside the workspace is not listening on the port declared in the devfile endpoint. Verify the |
| Endpoint is not accessible from outside the workspace. |
By default, endpoints use |
Revised on 2026-06-15 09:58:13 UTC