-
-
Notifications
You must be signed in to change notification settings - Fork 503
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
DietPi-Globals | G_CHECK_URL fails as DNS resolving takes very long #2717
Comments
@shehzaman Indeed strange. How long does manual wget take?
Because we have a maximum time hard coded into our connection test. Actually I see already from your wget output. It takes 6 seconds for each redirect and there are several redirects included when accessing the APT mirror director. So the question is if DNS resolving takes so long or the final connection. Please compare the above time with:
|
Thank you for looking into this @MichaIng Here is the output for all redirects: root@DietPi: time wget --spider https://deb.debian.org/debian
Spider mode enabled. Check if remote file exists.
--2019-04-16 18:13:07-- https://deb.debian.org/debian
Resolving deb.debian.org (deb.debian.org)... 5.153.231.4, 128.31.0.62, 130.89.148.14, ...
Connecting to deb.debian.org (deb.debian.org)|5.153.231.4|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://cdn-aws.deb.debian.org/debian [following]
Spider mode enabled. Check if remote file exists.
--2019-04-16 18:13:13-- https://cdn-aws.deb.debian.org/debian
Resolving cdn-aws.deb.debian.org (cdn-aws.deb.debian.org)... 54.192.151.90, 54.192.151.2, 54.192.151.55, ...
Connecting to cdn-aws.deb.debian.org (cdn-aws.deb.debian.org)|54.192.151.90|:443... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: http://cdn-fastly.deb.debian.org/debian [following]
Spider mode enabled. Check if remote file exists.
--2019-04-16 18:13:19-- http://cdn-fastly.deb.debian.org/debian
Resolving cdn-fastly.deb.debian.org (cdn-fastly.deb.debian.org)... 151.101.8.204, 2a04:4e42:2::204
Connecting to cdn-fastly.deb.debian.org (cdn-fastly.deb.debian.org)|151.101.8.204|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://ftp.debian.org/debian/ [following]
Spider mode enabled. Check if remote file exists.
--2019-04-16 18:13:25-- http://ftp.debian.org/debian/
Resolving ftp.debian.org (ftp.debian.org)... 130.89.148.12, 2001:67c:2564:a119::148:12
Connecting to ftp.debian.org (ftp.debian.org)|130.89.148.12|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Remote file exists and could contain further links,
but recursion is disabled -- not retrieving.
real 0m23.092s
user 0m0.210s
sys 0m0.084s Using only IP address: root@DietPi:~ time wget --spider https://130.89.148.12
Spider mode enabled. Check if remote file exists.
--2019-04-16 18:16:04-- https://130.89.148.12/
Connecting to 130.89.148.12:443... connected.
ERROR: The certificate of ‘130.89.148.12’ is not trusted.
ERROR: The certificate of ‘130.89.148.12’ hasn't got a known issuer.
The certificate's owner does not match hostname ‘130.89.148.12’
real 0m0.626s
user 0m0.121s
sys 0m0.051s
root@DietPi:~ time wget --spider http://130.89.148.12
Spider mode enabled. Check if remote file exists.
--2019-04-16 18:16:21-- http://130.89.148.12/
Connecting to 130.89.148.12:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://130.89.148.12/debian/ [following]
Spider mode enabled. Check if remote file exists.
--2019-04-16 18:16:21-- http://130.89.148.12/debian/
Connecting to 130.89.148.12:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Remote file exists and could contain further links,
but recursion is disabled -- not retrieving.
real 0m0.800s
user 0m0.009s
sys 0m0.037s Do you hard code I tested my internet speed as well, latency and download speed are not too bad: |
@shehzaman Meanwhile to make DietPi scripts work, you can override the default timeout of our connection/URL check script: |
Tweaked the defaults to:
Will also look at adding option to increase timeout when it fails on 1st attempt. |
Similar issues:
That is what I had in mind as well. Does In general I think the 5 seconds we had should be totally sufficient. Everything taking longer IMO is an issue. In those DNS cases (at least in one older case also 8.8.8.8 took the same long time) I just currently have no hint how this can be. |
Just ran some tests on my VMs and RPi and Windows and it takes max 0.5 seconds to resolve |
Yep agree, and the 3 retry count should ignore DNS issues after its "hopefully" resolved in test 1.
|
Hah, curl equivalent to wget --spider: The printout is quite nice to follow the redirections and check which one took how much time:
Disillusioning that our nice HTTPS request is forwarded to HTTP directly... cdn-fastly it not available in HTTPS at all, the in this case final
... different topic but IMO it should be mandatory to use HTTPS for all official APT repositories. Unthinkable what is theoretically possible when some hacked DNS entry leads to you to a fake repo and APT/DPKG installs/updates some system core packages to whatever is desired to spy out data, passwords etc.? Nowadays HTTPS everywhere! 😃 @Fourdee No explicit timeout exit code. Either 1 or 4 then:
Also nice that one can define the individual timeouts, e.g. to test DNS resolving explicitly:
|
Btw:
I will play around with |
For now resolved with: #2717 (comment) |
I had also this issue. How did it happen? Countermeasure: Then, all worked fine. |
i've managed to fix the issue by following the advice iven here: when you append the following line to the resolve.conf file the dns resolution becomes blindingly fast again as it was in the older distros. hope this helps.
|
Interesting, seems to be a problem with certain hardware: https://manpages.debian.org/bullseye/resolv.conf#single |
Hi,
Very strange issue on Orange Pi Zero board. I have tried this with multiple mirrors from different mirrors:
I looked at a similar issue #755 - where the last trailing slash
/
was a problem.In my case, I get similar outputs when using
wget --spider
for all mirrors:Apt update works:
dietpi-software fails:
Details:
Steps to reproduce:
dietpi-software
as rootExpected behaviour:
wget --spider
Actual behaviour:
Extra details:
apt update
workswget --spider
works/
on mirror url gives the same behaviorAdditional logs:
The text was updated successfully, but these errors were encountered: