Wiki Operations
Troubleshooting
Symptoms an operator or client sees from Mirexa — refusals, startup failures, slow stops, auth errors, dashboard statuses — with the cause behind each and what to do.
Most problems announce themselves in one of three places: an ERROR frame a client receives (a numeric code plus a message), a log line on the node, or the node refusing to start with a message naming the setting. This page is organised by what you see. Error codes are listed in full in error codes; this page covers what to do about them.
Errors a client receives
| Code | Typical message | Cause | What to do |
|---|---|---|---|
Overloaded (0x0007) |
server overloaded: |
The WAL write buffer (wal.) stayed full for wal., or a stream's hot cache had no room after ingestion. waits. Nothing was stored. |
Retry the whole batch after the hint in the frame; the SDKs do this. If it is persistent, ingest outruns the disk: check mirexa_ (wal_ or hot_), mirexa_, and disk latency. |
Overloaded (0x0007), on reads too |
(a shed while a partition moves or a new primary replays) | A partition is being cut over to another node, or a node just made primary is replaying the log it kept as a copy. Raised before anything is dispatched. | Retry; it clears by itself in moments. The SDKs retry reads and writes on this code. |
Protocol (0x0001) |
batch not admissible: |
A live batch is wider than the stream's hot cache. Per-stream cache sizes follow the timeframe: a 1h stream gets 2,048 slots by default, so 3,000 hourly bars in one live batch is refused. | Split the batch, send it through the history route (-, FlagHistory, mirexa-), or raise the stream's size with mirexa-. See the hot cache. |
Protocol (0x0001) |
batch not admissible: |
A bar's timestamp is not on the stream's interval grid (weekly bars must start on Monday). | Fix the timestamps. |
Protocol (0x0001) |
batch not admissible: |
One batch mixes bars reaching back into the hot cache with bars past the newest. | Send old and new bars in separate batches, or resend. |
HistoryRequired (0x000B) |
batch not admissible: |
The bars are older than anything the stream stores, or fall in a span between chunks that only the history route installs. | Resend the same bars with the history flag (mirexa-); mirexa- does this automatically. See corrections and history. |
DerivedStream (0x000A) |
<stream> is derived from its source by the node; writing it needs OVERWRITE |
The stream is written by the node from its source (a lineage was declared). | Write the source stream instead, or send with the overwrite flag deliberately. See derived streams. |
Unauthorized (0x0003) |
session lacks the write_ (or similar) |
The session's grant lacks the permission. The grant is the token's permissions ∩ security.. |
Issue a token with the permission; check the node's ceiling. With auth off, check the client actually asked for it. |
Unauthorized (0x0003), at connect |
session token has expired; issue a fresh one |
Token expired, or the client's clock and the node's disagree. | Issue a new token; use a TokenSource that re-reads a refreshed file. Check NTP on both ends. |
Unauthorized (0x0003), at connect |
session token expires further out than 1h0m0s; . |
Token validity over one hour (only possible with a tool other than mirexa-), or clocks far apart. |
Reissue with - ≤ 1h; check clocks. |
Unauthorized (0x0003), at connect |
session token signature is not from a trusted issuer; check security. |
Auth is on (the default) and the token is missing, signed by an untrusted key, or tampered with. | Supply a token — on a single node with no trusted_, the one in <data_ or one minted from <data_; otherwise add the issuer's public key to every node's trusted_. |
Unauthorized (0x0003), at connect |
session token is signed by a key this cluster has revoked; . |
The issuer key was revoked through the control API. | Issue under a trusted, unrevoked key. |
SlowConsumer (0x0006) |
(subscription evicted) | The client did not drain a subscription: network. consecutive batches were dropped. Only that subscription ends. |
Consume faster or subscribe to fewer streams per connection; resubscribe from the last bar received. See subscriptions. |
StalePlacement (0x0008) |
(with a retry hint) | Cluster: this node's view of the partition directory is behind the epoch the client's write carried, or it has no entry yet. | Retry after the hint; the SDK does. Persistent: the node is not catching up with the control plane — check its Raft metrics and connectivity. |
PartitionUnavailable (0x0009) |
names the partition and node | Cluster: the partition's primary is on a node the cluster has fenced, or this node is its primary but holds no current lease. No retry hint. | Wait for failover (about two liveness timeouts after the node went silent, if an in-sync copy exists) or for the node to come back. Reads that allow stale answers can be served by a copy meanwhile. See failover. |
PayloadTooLarge (0x0002) |
A frame exceeded network.. |
Send smaller batches. | |
Internal (0x0004) |
ingest failed |
A server-side failure, logged on the node as ingest failed with the real error. |
Read the node log. Do not blindly resend a write that failed this way after a disconnect; read back first. |
Unsupported (0x0005) |
A frame or flag this node does not implement (for example, asking for partial in-progress bars). | Check client and server versions. | |
client error ErrAmbiguous |
The connection broke while a write was in flight: it may or may not have been applied. | Read the range back, then resend only what is missing (a resent identical bar is a no-op). See durability. | |
| client: connection closed after a quiet period | The node closes a connection idle past network. (30 s). |
Normal; SDKs reconnect on the next request. |
A redirect (cluster) is not an error: the SDK's routing client follows it to the node that serves the partition.
The node does not start
The node prints mirexa: <reason> to stderr and exits 1. Configuration problems are
reported all at once, each prefixed by its section.
| Message (excerpt) | Cause | Fix |
|---|---|---|
no data directory: |
No data directory anywhere. | Set one. |
storage: (with - and -) |
The file is validated before - applies. |
Put data_ in the file or set MIREXA_. |
failed to load config file . |
An old file still has a streams: section. |
Set calendars through the control API (mirexa-), then delete the section. |
security: |
A clustered node with auth on (the default) and no keys. A single node would generate its own issuer; a cluster cannot. | Add the same public key from mirexa- to every node, or set security.. |
security. / is 45 bytes, want 32 |
A path or the wrong string pasted. | Paste the base64 line keygen printed, not the path to ops.. |
security. |
Unknown permission name. | Use names from permissions. |
wal: |
Bound below the flush trigger. | Raise max_ or set it to 0. |
cluster: |
Raise liveness_. |
|
cluster configuration: |
Library rule checked at start. | Keep leader_ ≤ heartbeat_. |
control: |
Clustered, control. routable or a hostname, admin_ off. |
Use a loopback IP, or enable control.. |
control admin auth: |
admin_ on with no trusted keys. |
Configure security.. |
control. |
Turn on data-plane TLS or turn off use_. |
|
replication_ |
No plaintext replication. | Issue node certificates with mirexa-. |
replication: |
Loose key permissions. | chmod 600. |
load TLS certificate: |
Data-plane cert or key missing or mismatched. | Check cert_/key_. |
network: |
Raise network.. |
|
WAL directory ". |
Another process has this data directory open. | Stop the other node; never run two on one directory. |
a listen tcp . on the data or control listener |
Port taken. | Change the address or stop the other process. |
ErrCorruptMidLog / corruption in the WAL before the last segment, or in the last segment with valid records after it |
Damaged WAL. | See corruption policy; restore from backup. |
a corrupt stream. |
Damaged index. | Single node: restore from backup. Clustered with an in-sync copy elsewhere: the node sets the partition aside and starts. |
join the control plane: after cluster. |
A joining node could not be admitted: seeds unreachable, wrong addresses (must be control addresses), or admin auth without admin_. |
Check seeds and connectivity; the orchestrator's restart is the retry. |
resolve cluster settings: |
With strict_, the agreed settings did not arrive in settings_; or this node's values are outside what the cluster can agree on. |
Check quorum and connectivity; fix the values named. |
exit status 0 with this node has been decommissioned and has left the cluster; not starting |
The node was decommissioned. | Intended. To reuse the id, deregister it through the control API. |
The node starts but something is missing
| Symptom | Cause | Fix |
|---|---|---|
/, /, / refuse connections; log has {"level": |
The observability address is taken — by default, control. (127.) collides with observability. (:) when the control listener is on. The node keeps running. |
Move one of the two. |
/ refuses connections for a long time after start |
Recovery is replaying a large WAL; the observability server starts after it. | Wait; lengthen probe start delays; keep wal. set. |
mirexa- cannot connect |
control. is false (the default). |
Enable the control listener. |
| A config edit had no effect | Only logging. is applied live; other changes need a restart, and some keys are not even reported as changed. |
Restart. See hot reload. |
[config warning] MIREXA_ on stderr |
An environment variable did not parse and was ignored. | Fix the value. |
| Every weekend appears as missing data | The stream has no trading calendar. | Set one with mirexa-. See gaps and trading calendars. |
Stopping takes too long
| Symptom | Cause | Fix |
|---|---|---|
Stop takes about network. (30 s) or more, then logs shutdown timed out after . |
Idle client connections never finish on their own; the listener waits the full timeout, then force-closes. | Expected. Allow for it in the orchestrator's grace period, or lower network.. |
| Stop takes minutes on a node with many streams | The final drain writes one chunk per stream, about 45 ms each (measured 2026-10-20, laptop NVMe). | Allow streams × ~45 ms in the grace period. If killed, nothing acknowledged is lost; the next start replays the WAL. |
stopping with copies not yet sent everything this node acknowledged; . |
Clustered primary: copies did not catch up within the hand-off timeout. | A failover now could promote a copy without the last writes. Check replication lag and the network between nodes. |
Dashboard
| Symptom | Cause | Fix |
|---|---|---|
| Every request answers 503; logins succeed but nothing loads | The dashboard's own token (upstream_) expired or its grant was withdrawn. |
Rewrite the token file; it recovers on the next reconnect (up to ~30 s), no restart. |
| 403 on an action | The user's role or the dashboard's grant lacks the permission; / shows which. |
Change the user's permissions, or reissue the dashboard's token with the permission (and check security.). |
| 401 | The user's session expired. | Sign in again. |
| 429 on sign-in, for everyone | Ten failed sign-ins in fifteen minutes from one address; behind a proxy all users share the proxy's address. | Wait up to fifteen minutes. |
| A page reload signs users out | The SPA and / are on different origins, so the _ refresh cookie is not sent; or refresh_; or session_ over plain HTTP. |
Serve both through one reverse proxy; set the cookie flag to match the scheme. |
Startup: dashboard. / dashboard. |
Required settings missing. | Generate a secret (head -) and a user (mirexa-). |
Startup refuses because the grant is narrower than upstream_ |
The node granted less than required. | Reissue the dashboard's token, or narrow upstream_. |
| The live chart updates in bursts | The proxy is buffering Server-Sent Events. | Disable buffering for / (the shipped nginx configuration does). |
Collecting evidence
- The node's log at
debuglevel: setlogging.level: debugand the server applies it without a restart. curl -s <observability.addr>/readyfor the check results.mirexa_errors_total{component,error_type}andmirexa_ingestion_shed_batches_totalfor refusal rates;mirexa_init_handshakes_total{result}for auth failures.- On a cluster, the control API's cluster status and partition health, and the
mirexa_cluster_partitions_*gauges — see operating a cluster.
References
Source
- Error codes —
ErrorCode*and their documented meaning. writeShed,writeBadBatch,tokenRefusal,derivedRefused.badBatchreasons,OverloadError.Config.Validate.acquireDirLock.requireLoopback.buildConfig,startControlPlane.configureUpstream,allows.
Tests
TestServer_ShedIngestAnswersOverloaded(/internal/network/server_overload_test.go).TestIngest_ABatchWiderThanTheArenaIsRefusedNotShed(/internal/ingestion/first_batch_admission_test.go).TestServer_APlainWriteNoChunkOrCacheCanHoldIsAnsweredHistoryRequired(/internal/network/history_required_test.go).TestServer_AWriteToADerivedStreamIsRefusedWithoutOverwrite(/internal/network/derived_write_test.go).TestServer_SlowSubscriberIsEvictedWithSlowConsumerError(/internal/network/subscription_eviction_test.go).TestUnavailable_APartitionWithADownPrimaryIsRefusedNotRedirected,TestUnavailable_APrimaryStillReplayingItsLogRefusesRetryably(/internal/network/unavailable_test.go).TestDashboard_ExpiredUpstreamSessionIsNotA500(/tests/dashboard_upstream_test.go).