Troubleshooting
This page is the diagnosis and solution guide for common issues encountered in Apinizer's installation environments. Pick the section matching your deployment method.
- Docker
- Virtual Server
- Kubernetes
API Manager
Container exits with URI is not set or DATABASE is not set
A required env var is empty. Recreate the container with the variables populated. Watch out for shell quoting around ?replicaSet=…&authSource=… — pass via -e SPRING_DATA_MONGODB_URI="…" quoted or via an env-file.
Health endpoint returns 503 OUT_OF_SERVICE
MongoDB is unreachable. Test from inside the container:
docker exec apinizer-apimanager sh -lc 'nc -zv mongo 25080'
Memory tier: 1GB (heap 50%…) even though the host has 32 GB
You did not pass --memory / mem_limit. The cgroup default is max and the auto-tuner falls back to total host memory. Set mem_limit to match what you want the container to use.
MongoDB connection times out
- Verify network reach:
docker exec apinizer-apimanager sh -lc 'nc -zv mongo 25080'. - Check that the URI carries the correct
replicaSet=andauthSource=. - TLS to MongoDB: append
&tls=trueand mount the CA file.
Worker (Gateway)
APINIZER_ENVIRONMENT_NAME mismatch → container starts but proxies don't load
If the name does not match an Environment in the Manager UI exactly (case sensitive), no proxy snapshot is fetched and every request returns 404. Fix: correct the env var or create the Environment.
UnsatisfiedLinkError: brotli
You are running a custom build of the Worker on Alpine. Switch back to the official apinizercloud/worker image (Ubuntu noble base).
EMFILE: too many open files
Add --ulimit nofile=1048576:1048576 to docker run. Also check that /etc/security/limits.conf / the host's LimitNOFILE allows it.
Cache
Members {size:1} on every node even though the peer list is correct
- Check
HAZELCAST_CLUSTER_NAMEmatches on every node (case sensitive). - Verify
5701/tcpis reachable both ways:nc -zv <peer-ip> 5701from each container. - On multi-host setups behind NAT (cloud), TCP/IP discovery requires routable, symmetric addresses.
Quotas reset unexpectedly
The CACHE_QUOTA_TIMEZONE value differs from the Worker / Manager timezone. They must all agree.
Integration (Quartz)
Quartz job didn't fire at the expected time
- Check
INTEGRATION_TIMEZONEagainst the cron expression in the Manager. - Multiple Integration nodes with mismatched timezones cause inconsistent fires.
Container exits with Locked by another scheduler after a hard kill
The previous container was SIGKILLed mid-trigger. The new container's lock-recovery sweep clears the stale row on startup; wait one clusterCheckin cycle (default 7.5 s) if needed.
Manager UI shows Integration as offline
The Manager cannot reach http://<integration-host>:8092/. Verify the host/port in Manager UI, firewall, and that the Integration container has finished its boot sequence.
API Portal
Container restarts in a loop with API_PORTAL_ID is not set
A required env var is empty. Pass all three of API_PORTAL_ID, API_PORTAL_MANAGEMENT_API_BASE_URL, API_PORTAL_MANAGEMENT_API_KEY.
Home page returns 502 Bad Gateway
The Portal cannot reach the Manager REST API. Check from inside the container:
docker exec apinizer-apiportal sh -lc \
"wget --header='X-Apinizer-Api-Key: $API_PORTAL_MANAGEMENT_API_KEY' \
-qO- $API_PORTAL_MANAGEMENT_API_BASE_URL/api/portal/v1/ping"
API Manager
Service exits immediately with "is not set"
SPRING_DATA_MONGODB_URI or SPRING_DATA_MONGODB_DATABASE is empty in conf/application.env. Edit the file and re-run encryption.
Read-only file system on /tmp
The systemd unit hardening (ProtectSystem=strict) gives the service an isolated /tmp via PrivateTmp=true. If you replaced the unit and removed PrivateTmp, Undertow cannot create /tmp/undertow-docbase.*. Re-add PrivateTmp=true, then daemon-reload and restart.
Encryption fails with "Master key file not found"
apimanager-install.sh was never run, or the installer was run but did not generate a key. Re-run:
sudo /opt/apinizer-manager/bin/apimanager-install.sh
MongoDB connection times out
- Check that the MongoDB hosts in
SPRING_DATA_MONGODB_URIare reachable from the server (nc -zv host 25080). - Verify replica set name and
authSourceare correct. - If TLS is required, append
&tls=true(and any required CA file options) to the URI.