-
Notifications
You must be signed in to change notification settings - Fork 382
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
Can Curl out of a pod on Http but not Https - fresh install on Ubuntu 22.04 #5427
Comments
Oh wow, this is weird
So the connection itself can be made, so the traffic does go somewhere.
Sounds something is messing up the traffic and thus the SSL handshake fails.
Do you see similar SSL level errors on LE pods? Which CNI are you using? I'll throw couple things to test just to rule out stuff:
|
Trying with netshoot on fresh 1.31.3 cluster on Ubuntu 22.04, I see this:
But if I force the curl command to use port 80 with https I get the exact same issue:
So I wonder what could happen in your network so that google port 443 would get translated into port 80? What happens in your env if you force port 443 for plain HTTP? E.g. with:
|
Hi, thanks for coming back! Its verrry strange... I'll try and add as much info as I can here...
CNI:
Explicit Port: shots fired
IpTables dump:
So, it would appear from the curl test above that port 80 is being mapped to 443 ??? |
oh, also no proxy btw.. |
Not necessarily a port map... I suspect that a whole other server is responding. The curl output says "404 page not found" which is definitely not the expected response from the Google webserver. So you're connecting to something else. |
So this is a traceroute, I also checked the ip address with a reverseip lookup and its google! https://mxtoolbox.com/SuperTool.aspx?action=ptr%3a172.217.16.228&run=toolpage#
Also ran the curl explicitly to port 433 cmd on the host, different results but equally no problems with https there either..
|
The IP address |
The open ports on it:
|
|
Could you try with
that traces the "real" connection to the requested port. As you see very different[1] responses from us (myself & @twz123 ), we think there's something in your network path that routes the SSL calls to some other service for some reason. Maybe because the traffic originates from the pod network with [1] This is what I see:
Notice that I see If I connect directly to the IP on https:
Notice the special server cert the server sends me 😄 |
hi, had a chance to run the traceroute...
|
Before creating an issue, make sure you've checked the following:
Platform
uname -a Linux tom-nuc 6.8.0-51-generic #52~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Mon Dec 9 15:00:52 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
Version
v1.31.3+k0s.0
Sysinfo
`k0s sysinfo`
What happened?
Can make http calls outbound to the internet but not https. This is on a blank install running a pretty standard, up to date test container. I have seen this error elsewhere in other containers so it appears a generic problem.
Steps to reproduce
kubectl run -i --tty --rm debug --image=nicolaka/netshoot --restart=Never -- bash
Within the shell that comes up I can run this ok:
curl -v http://www.google.com
but when I run it for https:
curl -v httpS://www.google.com
curl -v https://www.google.com
curl: (35) OpenSSL/3.3.0: error:0A0000C6:SSL routines::packet length too long
My DNS resolves ok within the container and on the host - this is a single node - my firewall (UFW) is disabled.
Expected behavior
Obviously, I expect to be able to connect to the internet using SSL. 👍
(This is messing with Lets Encrypt initialisation which is why I'm really here..)
Actual behavior
I get a random cryptographic error. The same curl command works perfectly on the host - ironically on an earlier version of curl.
Container curl info:
Host curl info:
Screenshots and logs
No response
Additional context
Happy to provide extra logs, info as required. Finding K0s to otherwise be awesome!
The text was updated successfully, but these errors were encountered: