Repository navigation
fix(ns-monitoring): start ns-flows before netifyd - #2042
Merged
Merged
Conversation
Both services started at position 99, so netifyd came up first and its sink-ns-flows plugin logged 15-40 "Failed to connect to 127.0.0.1:8080" errors at every boot until ns-flows was listening, dropping the flows of those first seconds. Assisted-by: Claude Code:claude-opus-5-5
gsanchietti
force-pushed
the
fix/ns-flows-start-order
branch
from
November 25, 2026 08:56
4b853fb to
553848a
Compare
gsanchietti
marked this pull request as ready for review
November 25, 2026 08:56
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
At every boot the Deep Packet Inspection agent (netifyd) started before ns-flows, because both used start position 99 and netifyd comes first alphabetically. Its sink-ns-flows plugin then logged 15 to 40 lines of
sink-ns-flows: default: http://127.0.0.1:8080/flows: Failed to connect to 127.0.0.1:8080in the first seconds, and the flows of those seconds were lost. ns-flows now starts at position 98, so it is already listening when netifyd starts.This only takes effect on new images and fresh installs. A unit that receives the updated ns-monitoring as a package update keeps its old
/etc/rc.d/S99ns-flowslink, because OpenWrt does not re-run disable/enable on package upgrades, so the boot errors stay there until/etc/init.d/ns-flows disable && /etc/init.d/ns-flows enableis run. The service starts in both cases; only the log noise differs.How to test
/etc/rc.dcontainsS98ns-flowsandS99netifydgrep -c "sink-ns-flows.*Failed to connect" /var/log/messages: expected 0 (before the change: 15 to 40)curl -s http://127.0.0.1:8080/flowsreturns flowsGenerated by Claude Code:claude-opus-5-5 with nethserver-pr