Skip to content
  • Our Product
    • Namazu Elements
      • What is Elements?
      • Why open source?
      • Docs
        • Namazu Elements in Five Minutes or Less
        • RESTful APIs Library
        • Security Model
        • Accessing the Web UI (CMS)

    Our Product

    A logomark with three layered rhombuses adorning the lettermark that says Elements in bold all-caps sans-serif letters.
    • What is Namazu Elements? Discover our easy-to-use backend network solution built for online games. Rapidly enables full-scale multiplayer games or online solo adventures.
    • Why open source? Is there a truly open source server backend for connected games? There is now. Download and run a local copy of Namazu Elements and try it for yourself.
    Download Namazu Elements

    Get started

    • Quick start Read our Elements 5-minute quick start guide
    • Documentation Read our developer docs for learning more about Elements
    • RESTful APIs A full list of core API specs for working with the Elements framework
    • Security An overview of the server-authoritative security model of Elements
    • Accessing the CMS Manage your game with ease via the Namazu Elements CMS.

    Co-development Reimagined

    • Best real-time game backends in 2026 If you're researching an alternative to your current backend solution, we've prepared a report of all of the backend solutions on the market in 2026 and how Namazu Elements compares.
      Co-dev

    Recent Posts

    • The watercolor-styled Namazu Studios logo over a giant namazu lurking in the depth
      Namazu Studios Featured in San Diego Business Journal
      22 Sep 2025 Press
    • Namazu Elements 3.1 Released – Service Layer Fixes, Secure APIs, and Steam Bug Fix
      22 Apr 2025 Release Notes
  • Case Studies
  • About Us
  • News
  • Services
  • Book a call
namazu-studios-logo
Book a call
Popular Search Roblox

Getting Started

  • Namazu Elements in Five Minutes or Less
  • Overview
  • Accessing the Web UI (CMS)
  • CMS Feature Overview

Fundamentals

  • Why You Need a Server (and What “Authoritative” Means)
  • Elements as a Game Runtime
  • Where Your Authoritative Code Runs
  • Lifecycles and Flows

General Concepts

  • Custom Elements
  • Data Models
  • Security Model
  • N-Tier Architecture

Namazu Elements Core Features

  • Email Service
  • Applications
  • Sessions
  • Users and Profiles
  • Digital Goods
  • Progress and Missions
  • Progress and Missions (3.4+)
  • Leaderboards
  • Matchmaking – Comprehensive Guide
  • Friends
  • Followers
  • Product Bundles and SKUs
  • Item Ledger
  • Receipts
  • Reward Issuances
  • Save Data
  • Metadata
  • Metadata (3.4+)
  • Queries
  • Application CDN Git Deployment
  • Large Object API
  • Firebase Push Notifications
  • Email Templates
  • Event Reference
  • Element Static Content and Dashboard UI Plugins
  • User Authentication / Sign In
    • What is a User?
    • Email Verification
    • User Authentication in Elements
    • Account Linking
    • Setting Up Twitch OIDC Login (Backend)
    • OIDC Login for Thick Clients (Browser Redirect Flow)
    • Auth Schemes
      • Auth Schemes
      • OAuth2
      • OIDC
  • Features
    • Web3
      • Wallets
      • Vaults
      • Omni Chain Support
      • Smart Contracts
        • Smart Contracts
  • Queries
    • Advanced Operators
    • Object Graph Navigation
    • Boolean Queries
    • Base Query Syntax
  • Advanced Operators
    • .name
    • .ref

Your Game Code - Adding Custom Elements

  • Custom Code Overview
  • Windows Setup
  • Mac OS Setup
  • Ubuntu Linux Setup
  • Element Anatomy: A Technical Deep Dive
  • Introduction to Guice and Jakarta in Elements
  • Structuring your Element
  • Events
  • Packaging an Element with Maven
  • Deploying an Element
  • Preparing for code generation
  • Properties
  • Websockets
  • RESTful APIs
  • Direct MongoDB Access (3.5+)
  • Building the Example Element: A Complete Walkthrough
  • Building the Kotlin Example Element: A Complete Walkthrough

Configuration

  • Configuring External URLs for Deployment
  • Matchmaking – Comprehensive Guide
  • Direct Database Access and Batch Configuration
  • Connecting Namazu Elements to a TLS-Enabled MongoDB Replica Set
  • Batch Samples
    • Mission Upload Bash Script Sample
    • Item Upload Bash Script Sample

RESTful APIs

  • Importing into Postman
  • RESTful APIs Library
  • Swagger and Swagger UI

Add-Ons

  • Crossplay
    • Crossfire Client Libraries (JVM & Browser)
    • Crossfire Protocol Reference
    • Crossfire: Custom Matchmaking Algorithms
    • Namazu Crossfire (Multiplayer)
    • Deploying Namazu Crossfire in your game
  • Roblox
    • Roblox Overview
    • Secure Player Authentication & Registration
    • Global Matchmaking
    • Roblox Security Best Practices
  • Container on Demand
    • Namazu Conductor
    • Namazu Conductor Admin API
    • Configuring Namazu Conductor Providers
    • Streaming Job Stdio in Namazu Conductor
  • Commerce
    • Stripe
      • Stripe
      • Configuring the Stripe Element
      • Stripe REST API Reference
      • Stripe REST API Reference
      • Stripe Webhooks and the Typed Event Bus

Game Engine & Client Support

  • Unity
    • Elements Unity Plugin
    • Unity Crossfire Plugin
  • Gamemaker
    • Incorporating GMEXT-Elements into a GameMaker Project

Troubleshooting

  • Common Issues with Docker
  • Local SDK
    • Unable to deploy application : dev.getelements.elements.sdk.exception.SdkElementNotFoundException
    • Could not load class : java.lang.NoClassDefFoundError
  • Namazu Elements Community Edition
    • Common Issues with Docker
    • Unable to deploy application : dev.getelements.elements.sdk.exception.SdkElementNotFoundException
    • Running in the IDE
      • Exception in monitor thread while connecting to server localhost:27017
      • Could not deployAvailableApplications Jetty server Failed to bind to /0.0.0.0:8080 Address already in use

Releases

  • Release Process (3.9+)
  • 3.8 Release Notes
  • 3.9 Release Notes
  • 3.7 Release Notes
  • 3.6 Release Notes
  • 3.5 Release Notes
  • 3.4 Release Notes
  • 3.3 Release Notes
  • 3.2 Release Notes
  • 3.1 Release Notes

Namazu Agent

  • Namazu Agent Overview
  • Common Agent Tasks
  • Tips for Using the Namazu Agent

Namazu Cloud

  • Namazu Cloud Overview
  • Namazu Cloud Organizations
  • Namazu Cloud Subdomains
  • Namazu Cloud Instances
  • Namazu Cloud Products and SKUs
  • Namazu Cloud Add-ons
  • Namazu Cloud Account
  • Namazu Cloud Backups
  • Namazu Cloud Billing
View Categories
  • Home
  • Docs
  • Add-Ons
  • Container on Demand
  • Streaming Job Stdio in Namazu Conductor

Streaming Job Stdio in Namazu Conductor

Est. read time: 5 min read

0:00 / 5:15
  • View as Markdown Open this page as plain Markdown (opens in a new tab)
  • Open in ChatGPT Ask questions about this page (opens in a new tab)
  • Open in Claude Ask questions about this page (opens in a new tab)
  • Open in Google AI Studio Ask questions about this page (Google account required) (opens in a new tab)
AI Doc Summarizer Doc Summary
AI Doc Summarizer Thinking Thinking

OrchestrationService.streamStdio(execution) returns a live, bidirectional connection to a running job’s stdin/stdout/stderr — a JobStdio exposing stdin as an OutputStream and stdout/stderr as InputStreams. What backs that connection differs by provider: it’s native on Kubernetes, and sidecar-based on EdgeGap and ECS, whose platforms have no built-in container-exec API of their own.


Support by Provider #

ProviderMechanismNotes
KubernetesNative — equivalent to kubectl attachRequires the pod to be in the Running phase.
ECSnamazu-stdio-bridge sidecarRequires the bridge baked into your task’s container image.
EdgeGapnamazu-stdio-bridge sidecarRequires the bridge baked into your app version’s container image.
MultiplayNot supportedThe Multiplay allocation API has no equivalent; calling streamStdio() throws UnsupportedOperationException.

Note

On EdgeGap and ECS, streamStdio() only works on a JobExecution obtained directly from execute() (or a copy derived from it via getFutureForStatus/getStageForStatus). An execution reconstructed from listExecutions() has no credential attached and throws StdioUnavailableException. Hold on to the object execute() gives you if you plan to stream stdio.


Why a Sidecar for EdgeGap/ECS #

Kubernetes exposes a container-exec/attach API that Conductor can call into directly. EdgeGap and ECS don’t — there’s no platform-level API to reach into a running container’s stdio. namazu-stdio-bridge closes that gap: a small wrapper process (conceptually similar to dockerize) that you make the entrypoint of your own container image. It execs your real entrypoint, forwards your image’s CMD (or the command/args a JobRequest supplies at runtime) as that process’s argv, and exposes the child’s stdin/stdout/stderr over three WebSocket endpoints that Conductor’s EdgeGap and ECS providers know how to speak to.

The bridge is published as a standalone binary (PyInstaller + staticx — no Python runtime required in your final image, and portable across glibc- and musl-based base images) at ghcr.io/namazustudios/namazu-stdio-bridge:latest. Vendor it into your image with a multi-stage build:

COPY --from=ghcr.io/namazustudios/namazu-stdio-bridge:latest 
     /usr/local/bin/namazu-stdio-bridge /usr/local/bin/namazu-stdio-bridge
ENTRYPOINT ["/usr/local/bin/namazu-stdio-bridge"]

By default the bridge looks for your real entrypoint at /Docker-entrypoint.sh, /usr/local/bin/Docker-entrypoint.sh, or /app/Docker-entrypoint.sh (first match wins) — override the candidate list with NAMAZU_CONDUCTOR_STDIO_ENTRYPOINT if your entrypoint lives elsewhere. Declare the bridge’s listen port (10080 by default) in your app version’s or task definition’s port mappings, since it has to be reachable from Conductor.


Wire Protocol #

The bridge exposes three WebSocket endpoints, carrying raw bytes with no additional framing:

PathDirectionSemantics
{base}/0client → serverstdin — frames forwarded to the child process’s stdin
{base}/1server → clientstdout — raw chunks as produced
{base}/2server → clientstderr — raw chunks as produced

{base} is the bridge’s configured URI prefix — set it via NAMAZU_CONDUCTOR_STDIO_URI on the bridge, and the matching ...stdio.bridge.base.path attribute on the Conductor provider (see Configuring Namazu Conductor Providers).

When the child process exits, the server closes /1 and /2 with WebSocket close code 4000 + <exit code> (e.g. 4000 for a clean exit, 4007 for exit code 7 — clamped to the 4000–4255 range). If the process was killed by a signal instead, the close reason string carries the signal name (e.g. "SIGTERM").

Connecting to /1 or /2 immediately replays a bounded ring buffer of the most recent output — up to 16 KiB for stdout and 4 KiB for stderr by default — before switching to live streaming, so a client that attaches a moment after the process started producing output still sees recent history rather than only what’s written from that point on. This is a replay buffer, not a log API: output older than its capacity is gone for good.


Authentication #

Every WebSocket connection to /0, /1, or /2 must present Authorization: Bearer <token> at the handshake. Connections that omit it, or present the wrong token, are rejected with HTTP 401 at the handshake itself — the connect call fails outright rather than appearing to succeed and then closing. The bridge refuses to start at all if no token is configured; its stdio endpoints would otherwise be reachable, unauthenticated, by anyone who can reach the port.

You never set this token by hand. Conductor generates a fresh one per job execution, injects it into the container as the NAMAZU_CONDUCTOR_STDIO_TOKEN environment variable, and carries it internally on the JobExecution returned by execute() so that a later streamStdio() call can present it automatically.


Bridge Configuration Reference #

These environment variables configure the bridge itself, inside your image — they’re independent of the Conductor-side attributes covering the same concerns (port, base path) on the EdgeGap/ECS providers.

VariableDefaultDescription
NAMAZU_CONDUCTOR_STDIO_TOKENrequiredBearer token every WebSocket connection must present. The bridge refuses to start without it.
NAMAZU_CONDUCTOR_STDIO_URI/Base path prefix for the three WebSocket endpoints.
NAMAZU_CONDUCTOR_STDIO_ENTRYPOINT/Docker-entrypoint.sh:/usr/local/bin/Docker-entrypoint.sh:/app/Docker-entrypoint.shos.pathsep-separated list of candidate entrypoint paths, tried in order; the first existing, executable path wins.
NAMAZU_CONDUCTOR_STDIO_BUFFER_SIZE4096Chunk size in bytes per WebSocket message (Distinct from the replay buffers below).
NAMAZU_CONDUCTOR_STDIO_STDOUT_BUFFER_SIZE16kRing buffer capacity for stdout replay. Accepts a plain byte count or a k/m suffix. 0 disables replay.
NAMAZU_CONDUCTOR_STDIO_STDERR_BUFFER_SIZE4096Same, for stderr.
NAMAZU_CONDUCTOR_STDIO_PORT10080WebSocket listen port.
NAMAZU_CONDUCTOR_STDIO_LOG_LEVELINFOThe bridge’s own log level.

Whatever you set for NAMAZU_CONDUCTOR_STDIO_PORT and NAMAZU_CONDUCTOR_STDIO_URI inside the image must match the corresponding ...stdio.bridge.port and ...stdio.bridge.base.path attributes on the Conductor provider Element, or Conductor won’t be able to reach the bridge.

What are your Feelings
Still stuck? How can we help?

How can we help?

Updated on September 23, 2026
Configuring Namazu Conductor ProvidersNamazu Conductor
Table of Contents
  • Support by Provider
  • Why a Sidecar for EdgeGap/ECS
  • Wire Protocol
  • Authentication
  • Bridge Configuration Reference
  • Documentation
  • Terms of Service
  • Privacy Policy
  • Contact us
  • Linkedin
  • Join our Discord

Namazu Studios LLC is powered by Namazu Elements, an open source modular backend framework for connected games.

Namazu Elements
  • Download
  • About Elements
  • Open source
  • Documentation
  • Support
Namazu Studios
  • Case Studies
  • About Us
  • News
Best realtime game backends 2026
Get in Touch
  • info@namazustudios.com
  • Book a call
  • (619) 862-2890
  • Linkedin
  • Discord

©2008-2026 Namazu Studios. All Rights Reserved.