Severity: info

GitNexus Service Recovery

Recuperación del servicio GitNexus: health, restart seguro, conflictos de puerto y verificación de index cargado.

Health rápido

Terminal window
curl -s http://127.0.0.1:4747/api/health
curl -s http://127.0.0.1:4747/api/repos | jq '.[0].stats'

Esperado:

  • /api/health{"status":"ok"}
  • /api/reposnodes > 0 y edges > 0

Si el puerto 4747 no responde

  1. Ver listener:
Terminal window
ss -tlnp | grep ':4747'
  1. Reiniciar service (si existe):
Terminal window
sudo systemctl restart gitnexus
sudo systemctl status gitnexus --no-pager

Conflicto de puerto

Si gitnexus no arranca por “address already in use”, hay un proceso manual ocupando :4747.

Terminal window
ss -tlnp | grep ':4747'
# matar PID manual solo si es el gitnexus antiguo
kill <pid>
sudo systemctl restart gitnexus

Verificación final

Terminal window
/opt/ai-lab/scripts/gitnexus-health.sh