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.
| Symptom | Likely cause | Fix |
|---|---|---|
| The service does not start | An invalid variable, an inactive reserved boundary, or a held lock | Read the error line. Each one names its cause |
NotEnrolled on create | The person did not finish enrollment, or was denied | Check the enrollment mode and allow lists |
| A write is rejected | The record's boundary, the caller, or the rate limit | Match the error name in the table |
| The sync stream closes or stays empty | The service identity lacks an enrollment or a boundary | Grant the service identity a boundary in Enrollments |
| OAuth callback fails | STRATOS_PUBLIC_URL or the proxy routes are wrong | Check the public URL, client metadata, and proxy |
invalid_scope from a spaces PDS | The space type record is not published | Check that zone.stratos.space.feed is still published |
| Admin login fails | The DID is not an admin, or the session expired | Add the DID, or sign in again on the service's own host |
| Space credential requests fail | No replay store | Set STRATOS_VALKEY_URL |
| DPoP nonce errors | A proxy replaces the CORS headers | Let the service's CORS headers through |
| A member's PDS record is out of date | The PDS sync queue has not caught up | Inspect and requeue jobs |
| High latency under load | Connection pool exhaustion | Raise 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 onlytrueorfalse.The reserved boundary must be active in the boundary catalog. The boundary named bySTRATOS_RESERVED_DOMAINis missing or inactive in the database. Restore the previous name.- The signing identity lock fails. Another Stratos process holds the same data directory, or
flockis not installed. Run one process for each data directory. - PostgreSQL refuses the connection over TLS. A URL built from
STRATOS_PG_*usessslmode=require. SetSTRATOS_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, andSTRATOS_ALLOWED_PDS_ENDPOINTS.
Check directly:
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
| Error | Cause |
|---|---|
InvalidDomainCount | The record has zero boundaries or more than one |
ForbiddenBoundary | The author is not a member of the record's boundary |
ServiceMismatch | The boundary belongs to another Stratos service |
ServiceWriteForbidden | A service identity tried to write |
RateLimitExceeded | The 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.
| Message | Cause |
|---|---|
Service auth required | The token is missing or is not a service-auth token |
Enrollment is missing or deactivated | No active service enrollment. An operator hold keeps it deactivated on restarts |
Service is not enrolled in any boundary | Grant the service identity a boundary in Enrollments |
Subscription authorization changed | The 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
pdscustody 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/callbackand{publicUrl}/admin/oauth/callback. - Check that
https://<host>/client-metadata.jsonis 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
| Message | Cause |
|---|---|
Not an authorized admin | The DID is not in STRATOS_ADMIN_DIDS and was never granted |
Admin session invalid or expired | Sessions last 12 hours. Sign in again |
Cross-origin admin request rejected | The 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
- 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'smax_connections. - Database storage saturation. Check write latency and queue depth on the database volume.
- 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
LOG_LEVEL=debug node dist/bin/stratos.js