[GH-ISSUE #1510] REST API: DockerContainerLogs endpoint returns HTTP 500 (unable to read container logs via API) #27097

Open
opened 2026-07-12 11:00:13 -05:00 by GiteaMirror · 0 comments
Owner

Originally created by @XXXM1R0XXX on GitHub (Jul 4, 2026).
Original GitHub issue: https://github.com/moghtech/komodo/issues/1510

Description

The REST API endpoint for reading Docker container logs returns HTTP 500 Internal Server Error, making it impossible to retrieve container logs programmatically.

Related issues: #244 (Pull Stack 500), #349 (Pull image 500) — these suggest broader REST API stability issues.

Environment

  • Komodo Core/Periphery: v2.2.0
  • Periphery running on TrueNAS Scale (systemd mode)

Reproduction

  1. Have a running container on a server managed by Komodo
  2. Call the REST API to get container logs:
import json, urllib.request

body = json.dumps({"server": "Local", "container": "<container_id>", "tail": 50}).encode()
req = urllib.request.Request("https://komodo.example.com/read/DockerContainerLogs", data=body, method="POST")
req.add_header("Content-Type", "application/json")
req.add_header("X-Api-Key", "...")
req.add_header("X-Api-Secret", "...")
urllib.request.urlopen(req)
# → HTTP Error 500: Internal Server Error
  1. Server returns:
{"error":"unknown variant `DockerContainerLogs`, expected one of `GetVersion`, `GetCoreInfo`, `ListSecrets`, ..."}

Expected behavior

The API should return container logs (stdout + stderr) as a JSON response.

Actual behavior

HTTP 500 with unknown variant error. The error message lists valid endpoint names, but none of them appear to be a container logs endpoint.

Notes

  • Terminal-based log viewing through the Komodo UI (websocket) works fine.
  • This is specifically about the REST API — there does not seem to be a valid endpoint for reading container logs.
  • Related: #1198 (feature request for real-time image pull progress) suggests logging/observability via API is limited.

Suggestion

Either:

  1. Add a working DockerContainerLogs read endpoint that returns container stdout/stderr, or
  2. Document the correct endpoint name if it exists under a different name, or
  3. If logs are only available through websocket terminals, document that limitation.
Originally created by @XXXM1R0XXX on GitHub (Jul 4, 2026). Original GitHub issue: https://github.com/moghtech/komodo/issues/1510 ## Description The REST API endpoint for reading Docker container logs returns HTTP 500 Internal Server Error, making it impossible to retrieve container logs programmatically. Related issues: #244 (Pull Stack 500), #349 (Pull image 500) — these suggest broader REST API stability issues. ## Environment - Komodo Core/Periphery: **v2.2.0** - Periphery running on TrueNAS Scale (systemd mode) ## Reproduction 1. Have a running container on a server managed by Komodo 2. Call the REST API to get container logs: ```python import json, urllib.request body = json.dumps({"server": "Local", "container": "<container_id>", "tail": 50}).encode() req = urllib.request.Request("https://komodo.example.com/read/DockerContainerLogs", data=body, method="POST") req.add_header("Content-Type", "application/json") req.add_header("X-Api-Key", "...") req.add_header("X-Api-Secret", "...") urllib.request.urlopen(req) # → HTTP Error 500: Internal Server Error ``` 3. Server returns: ```json {"error":"unknown variant `DockerContainerLogs`, expected one of `GetVersion`, `GetCoreInfo`, `ListSecrets`, ..."} ``` ## Expected behavior The API should return container logs (stdout + stderr) as a JSON response. ## Actual behavior HTTP 500 with `unknown variant` error. The error message lists valid endpoint names, but none of them appear to be a container logs endpoint. ## Notes - Terminal-based log viewing through the Komodo UI (websocket) works fine. - This is specifically about the **REST API** — there does not seem to be a valid endpoint for reading container logs. - Related: #1198 (feature request for real-time image pull progress) suggests logging/observability via API is limited. ## Suggestion Either: 1. Add a working `DockerContainerLogs` read endpoint that returns container stdout/stderr, **or** 2. Document the correct endpoint name if it exists under a different name, **or** 3. If logs are only available through websocket terminals, document that limitation.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/komodo#27097