-
Notifications
You must be signed in to change notification settings - Fork 42
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
Failed to detect the IPv6 address: Failed to send HTTP(S) request to "https://[2606:4700:4700::1111]/cdn-cgi/trace" #119
Comments
A popular cause is that, for some reasons, you have reached the limit of the number of simultaneous TCP connections allowed by the runtime or the kernel. The Go runtime by default should reuse existing HTTP(S) connections to avoid creating new connections, though I just learned that the size of the cache could have small default values. In any case, you could use If you see lots of Please let me know if you gain more information about your situation. By the way, the timezone setting should not matter---it should only affect the parsing of the update schedule (you could say, for example, "5pm everyday" using appropriate Cron strings, and the program has to know what "5pm" refers to). |
To clarify, here are the default values used by the Go 1.17.8 runtime: var DefaultTransport RoundTripper = &Transport{
Proxy: ProxyFromEnvironment,
DialContext: (&net.Dialer{
Timeout: 30 * time.Second,
KeepAlive: 30 * time.Second,
}).DialContext,
ForceAttemptHTTP2: true,
MaxIdleConns: 100,
IdleConnTimeout: 90 * time.Second,
TLSHandshakeTimeout: 10 * time.Second,
ExpectContinueTimeout: 1 * time.Second,
}
const DefaultMaxIdleConnsPerHost = 2 The cache size should be 100 (I incorrectly said it's 2---that is the size per host). The cache should be able to handle the traffic with ease because only a few requests are made. |
Another useful thing is that you could use docker build --target builder --tag favonia/cloudflare-ddns . to locally generate a (much larger) Docker image that would contain usual Linux tools. This way, you could inspect what's going on within the container. (PS: currently I did not set the entry point for the Docker images generated this way, so I recommend running |
First, thank you for your quick and explanation of the various causes! I hope'd i could get into the container but b/c of it's incredible small size, it also lacks the common troubleshooting tools (which is ok!).
Roger, so it can't be the problem with the TCP connections that are being made. Could it maybe be the token instead? It did change the ipv4 adres when i was testing last night.
Oooh that should help me alot with diagnosing the problem :) i might not get to this today, but tommorow i will look at this for sure! Thank you so much so far! |
i'm testing this on a rpi but sadly the given image isn't available for arm64/v8 i'm afraid |
Take a look at the Dockerfile---it actually supports cross-compiling. 😉 Try this to build the image for linux/arm64: docker build --target builder --tag favonia/cloudflare-ddns --build-arg TARGETOS=linux --build-arg TARGETARCH=arm64 . |
Updates: you can now pull |
Heya! So i noticed the error changed (withoud me changing anything afaik related to the container) to: I did run your test image (thanks for making that one !) but again, even tho it's an alpine and it did pull it down, i can't exec into it with /bin/sh weirdly enough. i can start /bin/ddns and it finds the ipv4 every time, but still not the ipv6 one. Now i tried just a standard alpine image:
And what i noticed is that if i wget the 1.1.1.1 it works, but not the ipv6 one! |
Oh, then perhaps you need to adjust your Docker settings. I recommend searching for "IPv6" within README. |
Aah i see! i will contact the maintainers of the template i used to use host instead! I saw it now working after recreating it! |
This is actually due to my mistake. I will fix that. |
@Macleykun Updates: I believe the |
|
Sorry i take that back! i though i removed the image but didn't, it is now letting me enter with sh! Sorry! And i could also determin that indeed withoud an ipv6, you get this error which explains why :D
|
I'm reopening this, b/c while the issue can be resolved easily by giving the host adapter instead of the bridge. I'm still finding a good way to allow containers to reach the internet on ipv6 with the bridge adapter. So far i did find this video: https://youtu.be/FOFTEsgxro4?t=642 I can't use the host adapter b/c that interferes with my grafana monitoring :P which makes CF-DDNS look like it's using alot of bandwith every now and then, even tho that's incorrect. |
So, the only way afaik is to use a macvlan sadly. |
@Macleykun Thanks for your sharing. If you have already found some tutorial explaining how to enable the IPv6, I suggest following it through first. 😃 Personally I am using docker-compose directly, and I might not have time to look into Portainer. It would be faster to check the video than waiting for me. |
Not so portainer , more so not knowing how to get a bridge to route ipv6. |
If you are talking about IPv6 for Docker in general, I suggest you read through the official Docker documentation on the network. The easy instructions using the "host" network work, but it seems you do not like the result. Then you should dive into technical details to configure the network exactly as you like it to be. |
Been dabbeling in it, but sadly no luck so far, will try to ask more around if someone has an idea on reddit |
Alright. I am closing this issue because of the following reasons:
In sum, this issue is about Docker, not the tool itself, and the only change I could think of is to improve the error messages. For that, another issue seems to be more appropriate. |
Heya @favonia Given your DHCP-server gives you the following internal subnet range: You would need to make the following ipvlan (there's no need for a macvlan, and ipvlan l3 wouldn't make this routable.
If a container is made, using --network dualstack will attach it to the container, give it an IP and IPv6. What you think? Would this be beneficial to the documentation of your project? I understand if you decline. |
Thank you. I can add a pointer in README to this issue. |
Updates: I made the following two changes. They don't solve the problem directly but should still help.
@Macleykun Thank you again for your time to investigate this difficult issue. Let me know if you think I should do something else. |
mmm, i think that's all good I do wonder still, why the IPvlan IPv6 doesn't work in the beginning... like it's actual pings that aren't going trough which is odd (no route to host i believe). But hey they dissepear themselfs so that's good :D |
Heya @favonia sorry to ping you yet again about this. Based on this project/issue: robbertkl/docker-ipv6nat#65, where i wasn't so keen on b/c using NAT for IPv6, is a bit weird. I did learn that some people who referred to this issue: Mailu/Mailu#2272 So based on those changes, i tried those on my pi and it actually gives a routeable IPv6 on the default bridge! The steps are rather simple, and can also just be copied 1:1! So perhaps you or i can rewrite the IPv6 part so users can very easily use IPv6 :). The user has to create a file: sudo vim /etc/docker/daemon.json Then these lines have to be added/inserted: { I would advise users to keep using the first octet (fd00) as that block is meant for this kinda thing: After the config change is done. They have to restart the docker deamon with: sudo systemctl restart docker.service. This might take a little while depending on the amount of containers/cpu. I hope you want to try this change out and see it for yourself :-) i think it's a very neat solution! |
@Macleykun Thanks for your time checking this. I don't understand why one should append "dead:beef:6969:420" to the prefix? Could you possibly help me understand the long prefix? |
the long prefix is optional, the examples i got used dead:beef and i added a few extra numbers just to add to the funny combo. Using fd00::/8 is also more then enough :) |
Heya!
I was using your container to update my ipv4 and 6 for my own domain from my pi using this template:
https://github.com/novaspirit/pi-hosted/blob/d3d7e5de51d3296568c29a0f10ee334a040df943/template/portainer-v2-arm64.json#L616
But i saw in my logs that it is having some troubles with detecting my ipv6 adres:
🌐 Detected the IPv4 address: my.correct.public.ip
🤷 The A records of "mydomain.ext" are already up to date
😞 Failed to send HTTP(S) request to "https://[2606:4700:4700::1111]/cdn-cgi/trace": Get "https://[2606:4700:4700::1111]/cdn-cgi/trace": dial tcp [2606:4700:4700::1111]:443: connect: cannot assign requested address
😞 Failed to detect the IPv6 address
⏰ Checking the IP addresses in about 5m0s . . .
Outside the container doing a curl to that adres works, also on my own machine.
But i can't go into the container to test and see what the error exactly is.
Do you have any suggestions what i might have wrong? I didn't touched the TZ variable but have set it to my local timezone to see if that might change something. But sadly this also didn't fix the error i'm having.
The text was updated successfully, but these errors were encountered: