Skip to content

Troubleshooting

This guide covers common issues with Rack Gateway and how to diagnose and resolve them.

Terminal window
# Check gateway health
curl https://gateway.example.com/api/v1/health
# View recent logs (Convox)
convox logs -a rack-gateway --since 10m

Possible causes:

  • GOOGLE_ALLOWED_DOMAIN doesn’t match the user’s email domain
  • Redirect URI mismatch in Google Cloud Console
  • DOMAIN misconfigured (affects OAuth redirects)

Checks:

  1. Confirm redirect URIs include:
    • https://<DOMAIN>/api/v1/auth/web/callback
    • https://<DOMAIN>/api/v1/auth/cli/callback
  2. Verify GOOGLE_ALLOWED_DOMAIN matches your workspace domain.

Possible causes:

  • APP_SECRET_KEY changed between restarts
  • Session timeout set too low

Checks:

  • Ensure APP_SECRET_KEY is stable and stored in Convox env.
  • Adjust timeout with RGW_SETTING_SESSION_TIMEOUT_MINUTES if needed.

The CLI does not run a local callback server. It opens the browser and polls the gateway.

  1. Check gateway reachability

    Terminal window
    curl https://gateway.example.com/api/v1/health
  2. Use --no-open to capture the auth URL

    Terminal window
    rack-gateway login production https://gateway.example.com --no-open
  3. Complete the browser flow

    Ensure the browser can reach the gateway and Google OAuth endpoints.

Possible causes:

  • User role not updated in the gateway
  • Permission requires MFA step-up

Checks:

  • Verify roles in the web UI (Users page).
  • If MFA is required, rerun the command and supply --mfa-code when prompted.

Possible causes:

  • Token revoked or expired
  • Token not passed correctly

Checks:

  • Token must start with rgw_.
  • Use RACK_GATEWAY_API_TOKEN or --api-token.
  • Confirm token exists in the web UI (API Tokens).

Possible causes:

  • Convox API unreachable
  • RACK_TOKEN invalid or missing
  • RACK_HOST misconfigured

Checks:

  • Verify RACK_TOKEN is correct and set.
  • If running outside the rack network, set RACK_HOST to the Convox API URL.
  • Check gateway logs for upstream errors.
  • Ensure device clock is in sync
  • Try the next code window (30 seconds)
  • Ensure the CLI build has WebAuthn support (CGO + libfido2)
  • Fall back to TOTP when needed
  1. Use backup codes if available
  2. Ask an admin to remove MFA methods in the web UI

If the gateway fails to start or reports DB errors:

  1. Verify DATABASE_URL / RGW_DATABASE_URL is set
  2. Run migrations:
Terminal window
convox run admin -- ./rack-gateway-api migrate -a rack-gateway