Skip to content

At a glance

Audience
Operators
Type
Troubleshooting
Status
current

At a glance

Audience
Operators
Type
Troubleshooting
Status
current

Troubleshoot the service ​

Most Stratos problems come from one of three places: the caller is not who the service expects, the caller is not in the boundary, or a setting names something that no longer exists. Find your symptom below. Every error name is listed in Error codes.

SymptomLikely causeFix
The service does not startAn invalid variable, an inactive reserved boundary, or a held lockRead the error line. Each one names its cause
NotEnrolled on createThe person did not finish enrollment, or was deniedCheck the enrollment mode and allow lists
A write is rejectedThe record's boundary, the caller, or the rate limitMatch the error name in the table
The sync stream closes or stays emptyThe service identity lacks an enrollment or a boundaryGrant the service identity a boundary in Enrollments
OAuth callback failsSTRATOS_PUBLIC_URL or the proxy routes are wrongCheck the public URL, client metadata, and proxy
invalid_scope from a spaces PDSThe space type record is not publishedCheck that zone.stratos.space.feed is still published
Admin login failsThe DID is not an admin, or the session expiredAdd the DID, or sign in again on the service's own host
Space credential requests failNo replay storeSet STRATOS_VALKEY_URL
DPoP nonce errorsA proxy replaces the CORS headersLet the service's CORS headers through
A member's PDS record is out of dateThe PDS sync queue has not caught upInspect and requeue jobs
High latency under loadConnection pool exhaustionRaise STRATOS_PG_ACTOR_POOL_SIZE below max_connections

The service does not start ​

  • Configuration error: Invalid environment variables. The lines that follow name each bad variable. Boolean settings accept only true or false.
  • The reserved boundary must be active in the boundary catalog. The boundary named by STRATOS_RESERVED_DOMAIN is missing or inactive in the database. Restore the previous name.
  • The signing identity lock fails. Another Stratos process holds the same data directory, or flock is not installed. Run one process for each data directory.
  • PostgreSQL refuses the connection over TLS. A URL built from STRATOS_PG_* uses sslmode=require. Set STRATOS_PG_SSLMODE="disable" for a local database without TLS.

NotEnrolled when creating records ​

  • The person has not completed OAuth enrollment.
  • Enrollment was denied. Check STRATOS_ENROLLMENT_MODE, STRATOS_ALLOWED_DIDS, and STRATOS_ALLOWED_PDS_ENDPOINTS.

Check directly:

bash
curl "https://stratos.example.com/xrpc/zone.stratos.enrollment.status?did=<did>"

A DID that is not enrolled gets enrolled: false, with eligible when Stratos could decide whether it may enroll.

A write is rejected ​

ErrorCause
InvalidDomainCountThe record has zero boundaries or more than one
ForbiddenBoundaryThe author is not a member of the record's boundary
ServiceMismatchThe boundary belongs to another Stratos service
ServiceWriteForbiddenA service identity tried to write
RateLimitExceededThe author passed the write rate limit. Retry after the cooldown

The sync stream closes or stays empty ​

zone.stratos.sync.subscribeRecords needs a service-auth token from a service enrollment.

MessageCause
Service auth requiredThe token is missing or is not a service-auth token
Enrollment is missing or deactivatedNo active service enrollment. An operator hold keeps it deactivated on restarts
Service is not enrolled in any boundaryGrant the service identity a boundary in Enrollments
Subscription authorization changedThe caller's membership changed. Reconnect

When the stream is open but silent:

  • Confirm the member has records in a boundary the service identity holds.
  • A cursor ahead of the newest event resumes from the newest event. Stratos logs subscribeRecords: cursor ahead of latest.
  • A member with pds custody has no records in Stratos. Their posts come from their own PDS. See Mixed-mode custody.

OAuth callback fails ​

  • Check STRATOS_PUBLIC_URL. Stratos builds its redirect URIs from it: {publicUrl}/oauth/callback and {publicUrl}/admin/oauth/callback.
  • Check that https://<host>/client-metadata.json is reachable from the member's PDS.
  • Check that the member's PDS is reachable from the Stratos server for the token exchange.
  • Check that the proxy routes /oauth/* and /admin/* to the service.

invalid_scope from a spaces PDS ​

The PDS could not resolve the zone.stratos.space.feed space type, or it refused the declaration it found. Nothing in the Stratos logs shows either. Check that the lexicon record is still published. A PDS older than the November release refuses a declaration that has no name. See Keep the space type published.

Admin login fails ​

MessageCause
Not an authorized adminThe DID is not in STRATOS_ADMIN_DIDS and was never granted
Admin session invalid or expiredSessions last 12 hours. Sign in again
Cross-origin admin request rejectedThe request came from an origin other than the service's own

Open the admin interface on the same host as STRATOS_PUBLIC_URL.

Space credential requests fail ​

When STRATOS_VALKEY_URL is not set, delegation requests fail with InvalidToken and attested clients fail with AttestationRequired. The log says no replay store (cache) configured. Set STRATOS_VALKEY_URL.

A delegation whose aud is not <Stratos DID>#atproto_pds fails with InvalidToken. The log line space-credential delegation token rejected carries the reason, Invalid aud claim: expected "<Stratos DID>#atproto_pds". A client attestation with another audience fails with AttestationRequired. A request that presents a credential with the earlier Atproto-Space scheme is not recognised. The five space and sync read routes refuse it with 401. zone.stratos.repo.hydrateRecord and hydrateRecords answer it as an anonymous request, which returns nothing private. See November upgrade and rollback.

DPoP nonce errors ​

Stratos answers the first request with use_dpop_nonce and a DPoP-Nonce response header. The client must repeat the request with that nonce in its proof.

A browser can read the header only when it is exposed. Stratos exposes it already. Check that your proxy does not replace the CORS headers. See CORS.

A member's PDS record is out of date ​

Stratos applies a boundary change locally first and publishes the enrollment record through a queue. See PDS sync queue to inspect and requeue jobs.

High latency under load ​

  1. Connection pool exhaustion. Latency is high while CPU and database load are low. Raise STRATOS_PG_ACTOR_POOL_SIZE, and keep it below the database's max_connections.
  2. Database storage saturation. Check write latency and queue depth on the database volume.
  3. CPU pinned on one core. Node.js runs requests on one thread. Give the process a faster core.

The record created log line reports durationMs for each write. Watch its trend during a load test.

Debug logging ​

bash
LOG_LEVEL=debug node dist/bin/stratos.js