[GH-ISSUE #18] Container names exceed 63-character DNS label limit, breaking proxy routing #4

Closed
opened 2026-10-18 21:13:18 +00:00 by bsakaguchi · 1 comment
Owner

Originally created by @dMwJr on GitHub (Apr 2, 2026).
Original GitHub issue: https://github.com/open-webui/terminals/issues/18

The Terminals orchestrator names spawned Open Terminal containers using the pattern terminals-{policy_id}-{user_id}, which produces hostnames ~85 characters long. This exceeds the 63-character DNS label limit (RFC 952/1123), causing all proxy requests to fail with Name or service not known.

Environment

Terminals: ghcr.io/open-webui/terminals:latest
Backend: docker
Network: User-defined bridge network (ai-net)
Docker: 28.3.3 on Debian 13.1
Oauth through M365

Steps to Reproduce

Run Terminals with TERMINALS_BACKEND=docker and TERMINALS_NETWORK=
Connect from Open WebUI using integration with API key auth
Open a terminal as any user

Expected Behavior

Terminal opens and proxied requests reach the spawned container.

Actual Behavior

The spawned container starts successfully and is healthy, but Terminals cannot reach it by hostname. All proxy requests return 502:
connect_tcp.failed exception=ConnectError(gaierror(-2, 'Name or service not known'))
Proxy request to http://terminals-a30916d1-fcb4-4cac-a412-034a7bd287e3-bb7386a4-d66a-4f9b-b30e-912c57512118:8000/api/config failed after 5 retries

Root Cause

The generated container name is 85 characters:

terminals-a30916d1-fcb4-4cac-a412-034a7bd287e3-bb7386a4-d66a-4f9b-b30e-912c57512118
DNS labels are limited to 63 characters. Python's IDNA encoder confirms:
python>>> import socket

socket.getaddrinfo('terminals-a30916d1-fcb4-4cac-a412-034a7bd287e3-bb7386a4-d66a-4f9b-b30e-912c57512118', 8000)
UnicodeError: label too long

Direct IP access to the container works fine:

urllib.request.urlopen('http://172.19.0.12:8000/health').read()
b'{"status":"ok"}'

Verification

Container is running and healthy, works
Container is on the correct network, works
DNS resolution from Terminals container, doesnt work (label too long)
Direct IP access from Terminals container, works

Originally created by @dMwJr on GitHub (Apr 2, 2026). Original GitHub issue: https://github.com/open-webui/terminals/issues/18 The Terminals orchestrator names spawned Open Terminal containers using the pattern terminals-{policy_id}-{user_id}, which produces hostnames ~85 characters long. This exceeds the 63-character DNS label limit (RFC 952/1123), causing all proxy requests to fail with Name or service not known. Environment Terminals: ghcr.io/open-webui/terminals:latest Backend: docker Network: User-defined bridge network (ai-net) Docker: 28.3.3 on Debian 13.1 Oauth through M365 Steps to Reproduce Run Terminals with TERMINALS_BACKEND=docker and TERMINALS_NETWORK=<user-defined-network> Connect from Open WebUI using integration with API key auth Open a terminal as any user Expected Behavior Terminal opens and proxied requests reach the spawned container. Actual Behavior The spawned container starts successfully and is healthy, but Terminals cannot reach it by hostname. All proxy requests return 502: connect_tcp.failed exception=ConnectError(gaierror(-2, 'Name or service not known')) Proxy request to http://terminals-a30916d1-fcb4-4cac-a412-034a7bd287e3-bb7386a4-d66a-4f9b-b30e-912c57512118:8000/api/config failed after 5 retries Root Cause The generated container name is 85 characters: terminals-a30916d1-fcb4-4cac-a412-034a7bd287e3-bb7386a4-d66a-4f9b-b30e-912c57512118 DNS labels are limited to 63 characters. Python's IDNA encoder confirms: python>>> import socket >>> socket.getaddrinfo('terminals-a30916d1-fcb4-4cac-a412-034a7bd287e3-bb7386a4-d66a-4f9b-b30e-912c57512118', 8000) UnicodeError: label too long Direct IP access to the container works fine: >>> urllib.request.urlopen('http://172.19.0.12:8000/health').read() b'{"status":"ok"}' Verification Container is running and healthy, works Container is on the correct network, works DNS resolution from Terminals container, doesnt work (label too long) Direct IP access from Terminals container, works
Author
Owner

@james-westbrook commented on GitHub (Apr 2, 2026):

Thank you for submitting this @dMwJr, I've confirmed the validity of this issue and am working on a fix now.

<!-- gh-comment-id:4181026612 --> @james-westbrook commented on GitHub (Apr 2, 2026): Thank you for submitting this @dMwJr, I've confirmed the validity of this issue and am working on a fix now.
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
open-webui/terminals#4
No description provided.