Troubleshooting¶
This guide covers common issues you may encounter when deploying and operating the API Platform Self-Hosted Gateway, along with their solutions.
Connection Issues¶
Gateway Not Connecting to Control Plane¶
Symptoms:
- Gateway status shows as "Disconnected" in API Platform Console
- Logs show connection timeout or refused errors
Solutions:
- Verify network connectivity:
# Test connectivity to API Platform endpoints
curl -v https://gateway.bijira.dev/health
curl -v https://config.bijira.dev/health
- Check firewall rules:
Ensure outbound HTTPS (443) is allowed to:
- gateway.bijira.dev
- config.bijira.dev
- telemetry.bijira.dev
- Verify DNS resolution:
- Check proxy settings:
If using a proxy, configure the gateway:
proxy:
http: http://proxy.example.com:8080
https: http://proxy.example.com:8080
noProxy: "localhost,127.0.0.1,.internal.example.com"
Intermittent Disconnections¶
Symptoms:
- Gateway alternates between Connected and Disconnected states
- Logs show reconnection attempts
Solutions:
- Check network stability:
- Review keep-alive settings:
- Check for network timeouts:
Ensure load balancers or firewalls don't have aggressive idle timeouts.
Registration Issues¶
Invalid Gateway Token¶
Symptoms:
- Logs show "authentication failed" or "invalid token" errors
- Gateway cannot register with control plane
Solutions:
- Verify token is correct:
Copy the token again from API Platform Console without any extra spaces or characters.
- Check token hasn't expired:
Tokens may have an expiration. Generate a new token if needed.
- Ensure token is properly set:
Kubernetes:
Docker:
VM:
Token Revoked¶
Symptoms:
- Previously working gateway stops connecting
- Logs show "token revoked" errors
Solutions:
- Generate a new token in API Platform Console.
- Update the gateway configuration.
- Restart the gateway.
Startup Issues¶
Gateway Pod/Container Not Starting¶
Symptoms:
- Pod stuck in CrashLoopBackOff (Kubernetes)
- Container exits immediately (Docker)
- Service fails to start (VM)
Solutions:
- Check logs for errors:
Kubernetes:
kubectl logs -n bijira-gateway -l app=bijira-gateway --previous
kubectl describe pod -n bijira-gateway -l app=bijira-gateway
Docker:
VM:
- Verify resource availability:
- Check configuration syntax:
Port Already in Use¶
Symptoms:
- Error: "address already in use" or "port binding failed"
Solutions:
- Identify the process using the port:
- Stop the conflicting process or change the port:
TLS/Certificate Issues¶
Certificate Not Valid¶
Symptoms:
- SSL/TLS handshake failures
- Browser shows certificate errors
- Logs show "certificate verify failed"
Solutions:
- Verify certificate validity:
- Check certificate chain:
- Ensure certificate matches private key:
# Compare MD5 hashes (should match)
openssl x509 -noout -modulus -in cert.crt | openssl md5
openssl rsa -noout -modulus -in private.key | openssl md5
Certificate Expired¶
Symptoms:
- SSL errors indicating expired certificate
- API consumers receive TLS errors
Solutions:
- Obtain a new certificate.
- Update the certificate files.
- Reload or restart the gateway:
# Kubernetes
kubectl rollout restart deployment/bijira-gateway -n bijira-gateway
# Docker
docker restart bijira-gateway
# VM
sudo systemctl reload bijira-gateway
Policy Issues¶
Policies Not Applied¶
Symptoms:
- Policies configured in console not enforced by gateway
- Policy sync status shows errors
Solutions:
- Check policy sync status:
- Force policy resync:
In API Platform Console, go to Settings > Self-Hosted Gateways > Sync Policies.
- Review gateway logs for sync errors:
Policy Conflicts¶
Symptoms:
- Unexpected behavior when multiple policies apply
- Some requests allowed that should be denied (or vice versa)
Solutions:
- Review policy precedence rules:
- API-level policies override gateway-level policies
-
Explicit deny overrides allow
-
Check for overlapping scopes in policy definitions.
-
Use the policy simulation tool in API Platform Console.
Performance Issues¶
High Latency¶
Symptoms:
- API response times higher than expected
- Latency increases under load
Solutions:
- Check resource utilization:
# Kubernetes
kubectl top pods -n bijira-gateway
# Docker
docker stats bijira-gateway
# VM
top -p $(pgrep bijira-gateway)
- Scale horizontally:
- Review logging level:
Debug logging can impact performance. Set to INFO or WARN in production:
- Check backend connectivity:
Ensure the gateway has low-latency access to backend services.
High Memory Usage¶
Symptoms:
- Memory consumption grows over time
- OOMKilled pods (Kubernetes)
Solutions:
- Check for memory leaks:
Monitor memory over time:
- Adjust resource limits:
- Review cache settings:
API Routing Issues¶
404 Not Found Errors¶
Symptoms:
- API requests return 404 errors
- APIs were working previously
Solutions:
- Verify API deployment:
Check if the API is deployed to this gateway in API Platform Console.
- Check configuration sync:
- Verify the request path matches the API configuration.
502 Bad Gateway Errors¶
Symptoms:
- Backend connection failures
- 502 errors returned to clients
Solutions:
- Verify backend is accessible from gateway:
- Check backend DNS resolution:
- Review timeout settings:
Logging and Diagnostics¶
Enable Debug Logging¶
Temporarily enable debug logging for troubleshooting:
Warning
Debug logging can generate large volumes of logs and impact performance. Disable after troubleshooting.
Collect Diagnostic Information¶
When opening a support request, collect:
-
Gateway version:
-
Configuration (redact sensitive values):
-
Recent logs:
-
Health check output:
-
Resource utilization:
Getting Help¶
If you cannot resolve an issue using this guide:
- Check the documentation: Review the relevant deployment and configuration guides.
- Search known issues: Check the API Platform status page and release notes.
- Contact support: Open a support ticket with diagnostic information.
What's Next?¶
- Overview: Self-Hosted Gateway overview
- Getting Started: Quick start guide
- Setting Up: Configuration guide
- Adding and Managing Policies: Configure and enforce policies
- Analytics: Monitor API traffic and performance