Skip to main content

Server setup

The Owl server exposes owl.v1.OwlService over HTTP and stores event history in RabbitMQ streams. It does not serve the browser interface. For end-user operations, see the CLI and browser guides.

The supplied SPHERE deployment installs RabbitMQ and the server on the experiment's control node. A separate Helm chart supports Kubernetes.

Requirements and configuration​

The server requires a reachable RabbitMQ broker with the rabbitmq_stream plugin enabled and credentials allowed to create, read, and delete streams. Use its stream protocol port, normally 5552, rather than AMQP port 5672 or management port 15672. RabbitMQ's advertised stream host and port must be reachable from the Owl server as well as its initial connection address.

Environment variableRequiredMeaning
RABBIT_SERVICEYesRabbitMQ hostname reachable by the server.
RABBIT_PORTYesStream protocol port, usually 5552.
RABBIT_USERYesRabbitMQ username.
RABBIT_PASSWORDYesPassword for that user.
LOGLEVELNoLogging level; default info. Accepts panic, fatal, error, warn/warning, info, debug, trace.
LOGFORMATNojson or text; default text output.

All four RabbitMQ variables must be set before startup. The server listens on 0.0.0.0:80; there is currently no environment setting or flag to change its listen address. It supports HTTP/1.1 and cleartext HTTP/2 (h2c). Put TLS termination in your deployment's gateway when needed.

Build and run​

Install Git and a Go toolchain compatible with go.mod (Go 1.23.5 or later) on your build host, with access to the versioned API module and the other dependencies. Download the separate server repository, enter its root directory, and compile:

mkdir -p ~/src/owl
git clone https://gitlab.com/mergetb/frontends/owl/server.git ~/src/owl/server
cd ~/src/owl/server
CGO_ENABLED=0 go build -o build/owlserver .

If you already have the checkout, enter ~/src/owl/server instead of cloning it again. For a private repository, authenticate with a GitLab account and a token with read_repository access when prompted for a password. Go module downloads also need access to the API module's repository.

Run the binary in an environment allowed to bind port 80, with the four RabbitMQ variables supplied by your service manager or container runtime. The included image runs the binary on port 80 inside the container, so a host port mapping can expose a different port.

To build that image after compiling the binary, install Podman and run from ~/src/owl/server/:

podman build -t owlserver:local .

The Makefile's default target also pushes an image to a registry. Use the explicit commands above when you only need a local binary or image.

The settings in owlserver-vars.yml in the separate deployment checkout configure the container image, published address and port, RabbitMQ connection, and log format. The viewer deployment guide explains how the XDC proxy locates this backend.

Verify a deployment​

From a host on the backend's network, replace the server URL as needed:

owl --server http://control.infra --owlid owl-check \
send node server --state ok --message "Owl connectivity check"
owl --server http://control.infra --owlid owl-check get stream 0 --speed 0

The reader should print the state event, then wait for more. Press Ctrl+C to close it. This creates a separate test stream. To erase its history after verification:

owl --server http://control.infra --owlid owl-check delete stream

There is no dedicated HTTP health endpoint. A successful live connection or keepalive alone does not verify event storage; publishing and reading an event checks the backend and RabbitMQ together.

Operational behavior​

Streams are created on demand with a hard-coded maximum length of 2 GB per stream. This is bounded history, not unlimited archival storage. Legend and topology records share the same history and retention as entity events.

Deleting an entity appends a deletion record. Deleting a stream removes its history and immediately declares a new empty stream with the same ID. Event publishers can continue writing to that ID. A stop request affects one active reader, identified by Owl ID and client ID. The registry of active readers lives in one server process, so a stop request routed to a different replica will not find that reader.

The backend has no authentication or per-stream authorization and permits cross-origin requests. Restrict access to the intended private network or gateway. The XDC viewer's login and materialization checks protect only requests through that viewer. The server currently logs RabbitMQ credentials at startup; restrict access to its logs as well.

GetLegend and GetTopology are declared by the API but are not implemented. Read their snapshots through event history. See the API reference for request formats and other limitations.

Troubleshooting​

SymptomCheck
Process exits immediatelyAll required variables are set, RABBIT_PORT is numeric, and port 80 is available and permitted.
Publishing or reading hangs/failsBroker connectivity, credentials, enabled stream plugin, and advertised RabbitMQ stream address.
Works locally but not from the XDCPublished host port, network routing, and OWL_UPSTREAM_HOST / OWL_UPSTREAM_PORT on the viewer.
Stop cannot find an active readerMatching Owl ID and client ID, and routing to the server process handling the reader.
Old history or legend missingStream retention or deletion may have removed it. Restart publishers to send setup records again if needed.
HTTP 404 at /The backend serves RPC paths such as /owl.v1.OwlService/SetEvent; the browser UI is a separate service.