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

Once again getting spammed with Internet Down/Reconnect notifications #937

Closed
3 of 7 tasks
XxAcielxX opened this issue Jan 6, 2025 · 18 comments
Closed
3 of 7 tasks
Labels
bug 🐛 Something isn't working Waiting for reply⏳ Waiting for the original poster to respond, or discussion in progress.

Comments

@XxAcielxX
Copy link

Is there an existing issue for this?

The issue occurs in the following browsers. Select at least 2.

  • Firefox
  • Chrome
  • Edge
  • Safari (unsupported) - PRs welcome
  • N/A - This is an issue with the backend

Current Behavior

I'm getting spammed with Internet Down/Reconnect notifications.

Expected Behavior

Notifications from Internet should only be send when there is genuine reason.

Steps To Reproduce

It's happening by itself after upgrading to v24.12.23.

app.conf

No response

docker-compose.yml

netalertx:
    image: jokobsk/netalertx
    container_name: netalertx
    network_mode: host
    environment:
      - TZ=${TZ}
      - PORT=20211
      - APP_CONF_OVERRIDE={"UI_theme":"Dark"}
    volumes:
      - ${APP_CONF}/netalertx/config:/app/config
      - ${APP_CONF}/netalertx/db:/app/db
      - ${APP_CONF}/netalertx/log:/app/front/log
    restart: always

What branch are you running?

Production

app.log

No response

Debug enabled

  • I have read and followed the steps in the wiki link above and provided the required debug logs and the log section covers the time when the issue occurs.
@XxAcielxX XxAcielxX added the bug 🐛 Something isn't working label Jan 6, 2025
@jokob-sk
Copy link
Owner

jokob-sk commented Jan 6, 2025

Hi @XxAcielxX,

Can you please confirm that you read the notification documentation and adjusted your settings according your needs?

https://github.com/jokob-sk/NetAlertX/blob/main/docs/NOTIFICATIONS.md

If you still get unexpected notifications, can you please provide:

  1. Your settings related to notifications mentioned in the above article.
  2. Enabled plugins
  3. A couple of examples of notifications you don't want to get
  4. A screenshot before and after of a device triggering the unexpected notification

Thanks in advance,
J

@jokob-sk jokob-sk added the Waiting for reply⏳ Waiting for the original poster to respond, or discussion in progress. label Jan 6, 2025
@XxAcielxX
Copy link
Author

  1. Screenshot_20250107-110727~2
  2. Screenshot_20250107-110925~2
  3. I only have Alert Down ticked for Internet Device
  4. Before:
    Screenshot_20250107-114152~3
    After: Screenshot_20250107-132640~2
    Reconnected: Screenshot_20250107-133113~2

@jokob-sk
Copy link
Owner

jokob-sk commented Jan 7, 2025

Hi @XxAcielxX ,

If the Internet device is actually reported as offline then the alerts are sent out correctly.

If it's a false positive you can:

  1. Adjust the INTRNT_RETRIES or INTRNT_DIG_GET_IP_ARG settings to make the check more resilient.
  2. Increse the report down setting to only report a device down after it was offline for a given time period.

image
image

Hope this helps,
j

@XxAcielxX
Copy link
Author

XxAcielxX commented Jan 7, 2025

I found the culprit I think

$ dig -4 myip.opendns.com @resolver1.opendns.com
;; communications error to 208.67.222.222#53: timed out
;; communications error to 208.67.222.222#53: timed out
;; communications error to 208.67.222.222#53: timed out

; <<>> DiG 9.18.28-1~deb12u2-Debian <<>> -4 myip.opendns.com @resolver1.opendns.com
;; global options: +cmd
;; no servers could be reached

Switched to
@ns1.google.com -t txt o-o.myaddr.l.google.com

Let's see now.

@jokob-sk
Copy link
Owner

jokob-sk commented Jan 7, 2025

Great, let me know how it goes.

@jokob-sk
Copy link
Owner

jokob-sk commented Jan 8, 2025

Hi @XxAcielxX - since there is no message from you I assume this is resolved - I'll close this for now and re-open if needed

@jokob-sk jokob-sk closed this as completed Jan 8, 2025
@XxAcielxX
Copy link
Author

XxAcielxX commented Jan 16, 2025

Hi @jokob-sk

I'm back. Everything was working for a week, but today suddenly it broke again.

dig @ns1.google.com -t txt o-o.myaddr.l.google.com
;; communications error to 216.239.32.10#53: timed out
;; communications error to 216.239.32.10#53: timed out
;; communications error to 216.239.32.10#53: timed out
;; UDP setup with 2001:4860:4802:32::a#53(2001:4860:4802:32::a) for o-o.myaddr.l.google.com failed: network unreachable.
;; no servers could be reached

Now neither option is working for me. Am I getting some kind of rate-limiting?

@jokob-sk
Copy link
Owner

Hi @XxAcielxX,

Hummm, it's possible. I haven't experienced this issue myself.

Have you tried to increase the number of retries in settings?

Not sure if you can run NAX in a different network to see if it's a specific network or ISP issue.

The thing is if the domains are blocking you then it's not much I can do in the app. Do you have any ideas?

@XxAcielxX
Copy link
Author

XxAcielxX commented Jan 17, 2025

Yes, I tried increasing the retries. No luck with it.

I was thinking, maybe we should break the Internet Check script into two parts,

  1. Ping check to see Internet connectivity, multiple IPs redundancy if one fails.
  2. curl ifconfig.me/ip for WAN IP updating.
  • Number 1 won't be needing any cooldown period.
  • Run number 2 only after Internet check fails and/or minimum every 10 minutes interval so the site(s) won't rate-limit/ban you.

@jokob-sk jokob-sk reopened this Jan 17, 2025
jokob-sk pushed a commit that referenced this issue Jan 19, 2025
@jokob-sk
Copy link
Owner

Hi @XxAcielxX ,

I like the curl idea. I implemented a fallback curl check if the dig calls fail.

This should be available in the next release. It would be great if you could test this. Can you please switch to the netalertx-dev docker image (backup everything at first or, ideally spin up a separate container with a separate db and config), in about 15 minutes (or after the last action finishes) from now?

Make sure you refresh your browser cache - and click the 🔄 refresh button in the top right corner.

Thanks in advance,
j

@XxAcielxX
Copy link
Author

Apologies for the late reply, Docker register was down for me and I couldn't download the dev image.

I updated to dev image, reverted back the dig command. The dig fails again and Internet status is Down since then. Do I need to do some additional settings for the backup curl command to run? How would I know if it's working?

@jokob-sk
Copy link
Owner

Hi @XxAcielxX ,

Please double check you use the version I released today.

The plugin should use the curl command automatically. The log file should contain parts of this log:

mylog('verbose', [f'[{pluginName}] Curl Fallback (new_internet_IP|cmd_output): {new_internet_IP} | {cmd_output}'])

so searching your logs for Curl Fallback if you have the LOG_LEVEL setting set to verbose should find an entry.

Image

You can also see it in the Plugins section:

Image

@XxAcielxX
Copy link
Author

XxAcielxX commented Jan 19, 2025

I'm using Built on: 2025-01-19 | Version: 17:13:58 - Dev

Here is the result

17:25:23 [INTRNT] In script
17:25:23 [INTRNT] INTRNT_DIG_GET_IP_ARG: -4 myip.opendns.com @resolver1.opendns.com
17:25:23 [INTRNT] - Retrieving Internet IP
17:25:38 [INTRNT]  Current internet_IP : 0.0.0.0
17:25:38 [INTRNT]          previous_IP : ***.***.**.98 
17:25:38 [INTRNT] - Retrieving Internet IP
17:25:52 [Plugins] ⚠ ERROR - TIMEOUT - the plugin INTRNT forcefully terminated as timeout reached. Increase TIMEOUT setting and scan interval.
17:25:52 [Plugins] No output received from the plugin "INTRNT"
17:26:39 [Config] Plugins to load: ['ARPSCAN', 'AVAHISCAN', 'INTRNT', 'NSLOOKUP', 'APPRISE', 'SMTP', 'CSVBCKP', 'CUSTPROP', 'DBCLNP', 'MAINT', 'NEWDEV', 'NTFPRCS', 'SETPWD', 'SYNC', 'UI', 'VNDRPDT', 'WORKFLOWS']
17:31:00 [INTRNT] In script
17:31:00 [INTRNT] INTRNT_DIG_GET_IP_ARG: -4 myip.opendns.com @resolver1.opendns.com
17:31:00 [INTRNT] - Retrieving Internet IP
17:31:16 [INTRNT]  Current internet_IP : 0.0.0.0
17:31:16 [INTRNT]          previous_IP : ***.***.**.98
17:31:16 [INTRNT] - Retrieving Internet IP
17:31:30 [Plugins] ⚠ ERROR - TIMEOUT - the plugin INTRNT forcefully terminated as timeout reached. Increase TIMEOUT setting and scan interval.
17:31:30 [Plugins] No output received from the plugin "INTRNT"

Update to Built on: 2025-01-19 | Version: 17:40:56 - Dev

17:45:36 [INTRNT] In script
17:45:36 [INTRNT] INTRNT_DIG_GET_IP_ARG: -4 myip.opendns.com @resolver1.opendns.com
17:45:36 [INTRNT] - Retrieving Internet IP
17:45:51 ;; communications error to 208.67.222.222#53: timed out
;; communications error to 208.67.222.222#53: timed out
;; communications error to 208.67.222.222#53: timed out
;; no servers could be reached

17:45:51 [INTRNT]  Current internet_IP : 0.0.0.0
17:45:51 [INTRNT]          previous_IP : ***.***.**.98
17:45:51 [INTRNT] - Retrieving Internet IP
17:46:06 [Plugins] ⚠ ERROR - TIMEOUT - the plugin INTRNT forcefully terminated as timeout reached. Increase TIMEOUT setting and scan interval.
17:46:06 [Plugins] No output received from the plugin "INTRNT"

@jokob-sk
Copy link
Owner

jokob-sk commented Jan 19, 2025 via email

@XxAcielxX
Copy link
Author

Timeout = 150 secs

17:56:15 [INTRNT] In script
17:56:15 [INTRNT] INTRNT_DIG_GET_IP_ARG: -4 myip.opendns.com @resolver1.opendns.com
17:56:15 [INTRNT] - Retrieving Internet IP
17:56:30 ;; communications error to 208.67.222.222#53: timed out
;; communications error to 208.67.222.222#53: timed out
;; communications error to 208.67.222.222#53: timed out
;; no servers could be reached

17:56:30 [INTRNT]  Current internet_IP : 0.0.0.0
17:56:30 [INTRNT]          previous_IP : ***.***.**.98
17:56:30 [INTRNT] - Retrieving Internet IP
17:56:45 ;; communications error to 208.67.222.222#53: timed out
;; communications error to 208.67.222.222#53: timed out
;; communications error to 208.67.222.222#53: timed out
;; no servers could be reached

17:56:45 [INTRNT]  Current internet_IP : 0.0.0.0
17:56:45 [INTRNT]          previous_IP : ***.***.**.98
17:56:46 [INTRNT] - Retrieving Internet IP
17:57:01 ;; communications error to 208.67.222.222#53: timed out
;; communications error to 208.67.222.222#53: timed out
;; communications error to 208.67.222.222#53: timed out
;; no servers could be reached

17:57:01 [INTRNT]  Current internet_IP : 0.0.0.0
17:57:01 [INTRNT]          previous_IP : ***.***.**.98
17:57:03 [INTRNT] - Retrieving Internet IP
17:57:18 ;; communications error to 208.67.222.222#53: timed out
;; communications error to 208.67.222.222#53: timed out
;; communications error to 208.67.222.222#53: timed out
;; no servers could be reached

17:57:18 [INTRNT]  Current internet_IP : 0.0.0.0
17:57:18 [INTRNT]          previous_IP : ***.***.**.98
17:57:21 [INTRNT] - Retrieving Internet IP
17:57:36 ;; communications error to 208.67.222.222#53: timed out
;; communications error to 208.67.222.222#53: timed out
;; communications error to 208.67.222.222#53: timed out
;; no servers could be reached

17:57:36 [INTRNT]  Current internet_IP : 0.0.0.0
17:57:36 [INTRNT]          previous_IP : ***.***.**.98
17:57:40 [INTRNT] - Retrieving Internet IP
17:57:55 ;; communications error to 208.67.222.222#53: timed out
;; communications error to 208.67.222.222#53: timed out
;; communications error to 208.67.222.222#53: timed out
;; no servers could be reached

17:57:55 [INTRNT]  Current internet_IP : 0.0.0.0
17:57:55 [INTRNT]          previous_IP : ***.***.**.98
17:58:01 [Process Scan] Print Stats
17:58:01 [Process Scan] Stats end
17:58:02 [Plugins] No output received from the plugin "AVAHISCAN"
17:58:05 [SMTP](publisher) In script
17:58:05 [Database] Opening DB

Internet Reconnected back though. Success I think? Don't see output for curl fallback.

@jokob-sk
Copy link
Owner

jokob-sk commented Jan 19, 2025 via email

@XxAcielxX
Copy link
Author

Timeout = 120
Retries = 3

This seems to be working good for me.

@jokob-sk
Copy link
Owner

Hi @XxAcielxX ,

Great, thanks for the update - closing for now then

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something isn't working Waiting for reply⏳ Waiting for the original poster to respond, or discussion in progress.
Projects
None yet
Development

No branches or pull requests

2 participants