From 2063d9ca3cbe1591f034dcae957839567d3f3c2f Mon Sep 17 00:00:00 2001 From: Louis-Alexander Kerst Date: Mon, 24 Aug 2026 22:19:57 +0200 Subject: [PATCH] docs: address Gunicorn control socket hangs --- store/templates/installation.php | 8 ++++++++ store/tests/run.php | 2 ++ 2 files changed, 10 insertions(+) diff --git a/store/templates/installation.php b/store/templates/installation.php index 7a5c909..04609c2 100644 --- a/store/templates/installation.php +++ b/store/templates/installation.php @@ -53,6 +53,14 @@ PLUGINS_CONFIG = {
sudo /opt/netbox/venv/bin/python /opt/netbox/netbox/manage.py migrate
 sudo /opt/netbox/venv/bin/python /opt/netbox/netbox/manage.py collectstatic --no-input
 sudo systemctl restart netbox netbox-rq
+

Gunicorn 25/26: Control-Socket deaktivieren

+

Wenn journalctl -u netbox den Fehler Control server error: Permission denied: '/nonexistent' zeigt oder Gunicorn trotz laufender Worker nicht antwortet, deaktiviere den optionalen Control-Socket:

+
grep -qE '^[[:space:]]*control_socket_disable[[:space:]]*=[[:space:]]*True' /opt/netbox/gunicorn.py \
+  || echo 'control_socket_disable = True' | sudo tee -a /opt/netbox/gunicorn.py
+
+sudo systemctl restart netbox
+curl -sS -o /dev/null -w 'HTTP %{http_code} in %{time_total}s\n' --max-time 10 http://127.0.0.1:8001/login/
+

Die Control-Schnittstelle wird von NetBox nicht für den normalen WSGI-Betrieb benötigt. Der Test muss innerhalb von zehn Sekunden einen HTTP-Status ausgeben.

4. Sicheren Host-Agent einrichten

dry_run verändert das System nicht. Für Installieren, Aktualisieren, Aktivieren und Entfernen wird der mitgelieferte Linux Host-Agent benötigt. Installiere ihn aus host_agent/, prüfe /etc/netbox-store-agent/agent.toml und stelle anschließend execution_mode auf agent.

Source-Kandidaten werden nur nach Admin-Freigabe verarbeitet. Der Agent prüft Commitbindung, Größe und SHA-256, baut daraus lokal ein Wheel und installiert nicht direkt aus einem beweglichen Branch.

diff --git a/store/tests/run.php b/store/tests/run.php index a24c4bd..48f0568 100644 --- a/store/tests/run.php +++ b/store/tests/run.php @@ -498,6 +498,8 @@ test('public and admin templates render safely with complete artifact evidence', assertTrue(str_contains($installation, 'API_TOKEN_PEPPERS')); assertTrue(str_contains($installation, '/opt/netbox/netbox/generate_secret_key.py')); assertTrue(str_contains($installation, 'python -m py_compile')); + assertTrue(str_contains($installation, 'control_socket_disable = True')); + assertTrue(str_contains($installation, 'http://127.0.0.1:8001/login/')); $admin = $view->render('admin/dashboard', [ 'title' => 'Admin', 'currentPath' => '/admin', 'adminEnabled' => true, 'adminUser' => 'admin', 'csrf' => 'safe-token', 'ok' => '', 'error' => '', 'sources' => $state['sources'],