infra:services:netbox
Table of Contents
Netbox - ip.hackeriet.no
Deployment
- Deployed in Docker
- Lives on app-01 (
/root/services/netbox-docker) in the klynge001 cluster - Is deployed with plugins (custom Docker image setup)
- More info at Netbox Github
- Exposed through ingress.hackeriet.no
- Docker compose → nginx on app-01 -ssl→ nginx on ingress -ssl→ Internet
Update
docker compose build --no-cache docker compose up -d
Troubleshooting
502 Bad Gateway from ip.hackeriet.no
A 502 from https://ip.hackeriet.no/ means nginx is reachable, but the NetBox upstream is not answering correctly.
On app-01:
cd /root/services/netbox-docker docker compose ps docker compose logs --tail=120 netbox postgres redis redis-cache netbox-worker df -h /storage /var/lib/docker
If the containers are confused after a restart, a full compose stop/start has worked better than restarting selected containers:
cd /root/services/netbox-docker docker compose down docker compose up -d
NetBox can take a little while to become healthy after docker compose up -d, especially while Postgres and the NetBox container settle. Do not treat the 502 as final immediately after starting the stack; watch the compose status and retry the service after a short wait.
Useful checks:
docker compose ps curl -v http://127.0.0.1:8000/ curl -v http://127.0.0.1:8000/api/status/ sudo tail -n 100 /var/log/nginx/error.log
Interpretation:
- If
http://127.0.0.1:8000/fails locally on app-01, focus on the NetBox Docker stack. - If the local app-01 check works but
https://ip.hackeriet.no/still returns 502, focus on nginx or the path through ingress. - If Postgres logs mention
No space left on device, free space before restarting the stack.
/srv/hackeriet-wiki/dokuwiki/data/pages/infra/services/netbox.txt · Last modified: by atluxity_idp.hackeriet.no