Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add extra logging around network issues (EDE: network error) #1930

Merged
merged 2 commits into from
Apr 18, 2024

Conversation

DL6ER
Copy link
Member

@DL6ER DL6ER commented Apr 2, 2024

What does this implement/fix?

This PR adds further error logging concerning (intermittent) network issues. Currently, dnsmasq doesn't provide any further details, making debugging quite hard. This PR was triggered by pi-hole/pi-hole#5608 which, eventually, turned out to be an external issue with other services on the same machine.

Example: Simulating network outage by unplugging the Ethernet cable

UDP

dig google.com

Before:

Apr  2 12:14:43 dnsmasq[3791404]: query[A] 154.google.com from 127.0.0.1
Apr  2 12:14:43 dnsmasq[3791404]: config error is REFUSED (EDE: network error)

Now:

Apr  2 12:14:43 dnsmasq[3791404]: query[A] 154.google.com from 127.0.0.1
Apr  2 12:14:43 dnsmasq[3791404]: failed to send UDP request: Network is unreachable
Apr  2 12:14:43 dnsmasq[3791404]: config error is REFUSED (EDE: network error)

TCP

dig google.com +tcp

Before:

Apr  2 11:53:02 dnsmasq[3801913]: query[A] google.com from 127.0.0.1
(editor's note: nothing else gets printed, the TCP connection silently dies)

Now:

Apr  2 11:53:02 dnsmasq[3801913]: query[A] google.com from 127.0.0.1
Apr  2 11:53:02 dnsmasq[3801913]: failed to send TCP(fast-open) packet: Network is unreachable
Apr  2 11:53:02 dnsmasq[3801913]: failed to send TCP(connect) packet: Network is unreachable

Other possible errors could be Connection reset by peer or No memory available.

These errors are also logged to the diagnosis system (rate-limited to not hammer the database):

grafik

These messages are de-duplicated based on the peer address (192.168.2.1#53 in the screenshot).


Related issue or feature (if applicable): N/A

Pull request in docs with documentation (if applicable): N/A


By submitting this pull request, I confirm the following:

  1. I have read and understood the contributors guide, as well as this entire template. I understand which branch to base my commits and Pull Requests against.
  2. I have commented my proposed changes within the code.
  3. I am willing to help maintain this change if there are issues with it later.
  4. It is compatible with the EUPL 1.2 license
  5. I have squashed any insignificant commits. (git rebase)

Checklist:

  • The code change is tested and works locally.
  • I based my code and PRs against the repositories developmental branch.
  • I signed off all commits. Pi-hole enforces the DCO for all contributions
  • I signed all my commits. Pi-hole requires signatures to verify authorship
  • I have read the above and my PR is ready for review.

@DL6ER DL6ER requested a review from a team April 2, 2024 11:51
@DL6ER DL6ER merged commit 4734e01 into development-v6 Apr 18, 2024
15 checks passed
@DL6ER DL6ER deleted the tweak/ede_neterr branch April 18, 2024 19:28
DL6ER added a commit that referenced this pull request Apr 20, 2024
DL6ER added a commit that referenced this pull request Apr 21, 2024
Fix a crash resulting from a bad interaction between PRs #1928 and #1930
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants