Common Issues
Port already in use
Symptom: Simfra fails to start with bind: address already in use on port 4599.
Solutions:
-
Check for an existing Simfra process:
ps aux | grep simfraStop it gracefully (with
kill <PID>or Ctrl-C), then retry. -
Use a different port:
export SIMFRA_PORT=4600Update your
AWS_ENDPOINT_URLto match. -
If another application is using the port, find it with:
lsof -i :4599
Warning: Do not run
lsofagainst the port if Docker-backed services are running - it may interfere with Docker containers that have port bindings.
Access Denied errors
Symptom: API calls return AccessDenied or AccessDeniedException.
Simfra enforces IAM policies on every request, matching real AWS behavior. "Access Denied" means the request was authenticated but not authorized.
Check these in order:
-
Identity policies - Does the IAM user or role have a policy that allows the action? Check attached policies with
aws iam list-attached-user-policiesoraws iam list-attached-role-policies. -
Resource policies - Some services (S3, SQS, SNS, Lambda, KMS) have resource-based policies. An explicit deny in a resource policy overrides any allow.
-
Permission boundaries - If the IAM entity has a permission boundary, the action must be allowed by both the identity policy and the boundary.
-
SCPs - If the account is part of an Organization, Service Control Policies restrict what actions are allowed. Check with
aws organizations list-policies. -
Root account - Root credentials bypass IAM policy evaluation. If you need to quickly verify whether the issue is IAM-related, retry with root credentials:
export AWS_ACCESS_KEY_ID=AKIAIOSFODNN7EXAMPLE export AWS_SECRET_ACCESS_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
S3 operations failing
Symptom: S3 API calls fail with hostname resolution errors or 404s.
Simfra does not support virtual-hosted-style S3 requests (e.g. mybucket.s3.localhost). You must use path-style addressing.
Set the environment variable:
export AWS_S3_USE_PATH_STYLE=true
For AWS CLI:
aws s3api list-objects --bucket mybucket --endpoint-url http://localhost:4599
For SDKs: Enable forcePathStyle / use_path_style in the S3 client configuration.
Health check returns 503
Symptom: GET /_simfra/health returns HTTP 503 with {"status": "bootstrapping"}.
Simfra returns 503 during startup while it loads persisted state and runs any configured bootstrap. This typically takes a few seconds.
Solutions:
-
Wait and retry. Most startups complete in under 5 seconds.
-
If bootstrapping is configured (
SIMFRA_BOOTSTRAP=standard), the Terraform bootstrap may take longer depending on the resources being created. -
Check the Simfra logs for errors:
# Look for ERROR level messages in the output
Credential errors
Symptom: InvalidClientTokenId, SignatureDoesNotMatch, or IncompleteSignature errors.
Check these:
-
Access key format - Access keys must be valid SigV4 format. The default root key is
AKIAIOSFODNN7EXAMPLE. Custom keys created via IAM or the admin API also work. -
Secret key match - The secret key must match the access key. Check that
AWS_SECRET_ACCESS_KEYcorresponds to theAWS_ACCESS_KEY_IDyou are using. -
Endpoint URL - Ensure
AWS_ENDPOINT_URLpoints to Simfra (e.g.http://localhost:4599). If you are using HTTPS, the signing will fail unless TLS is properly configured. -
Region mismatch - SigV4 signatures include the region. If you sign with
us-west-2but the request routes to a different region, the signature may be invalid. -
Clock skew - SigV4 requires the client clock to be within 15 minutes of the server. This is rarely an issue on modern systems but can occur in containers with incorrect time.
-
Expired temporary credentials - STS temporary credentials (from
AssumeRole,GetSessionToken, etc.) expire after their configured duration. Refresh them if expired.
Stale state after restart
Symptom: Resources created in a previous session are missing after restarting Simfra.
By default, all state is in-memory and lost on restart. To persist state across restarts, set SIMFRA_DATA_DIR:
export SIMFRA_DATA_DIR=/path/to/data
This enables SQLite write-through persistence. Resource metadata (queues, topics, IAM entities, tags, etc.) survives restarts. Transient data (SQS messages, in-flight state, FIFO dedup entries) does not persist.
If persistence is enabled but state is still missing:
- Verify the data directory exists and is writable.
- Check that
SIMFRA_DATA_DIRpoints to the same directory used in the previous session. - Look for errors in the startup logs related to persistence loading.
- If you changed
SIMFRA_PERSISTENCE_KEYbetween sessions, encrypted fields will not decrypt correctly.