-
Notifications
You must be signed in to change notification settings - Fork 6
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
[Usernetes] kube-apiserver fails to connect to etcd: dial tcp 127.0.0.1:2379: connect: connection refused
#65
Comments
curl result is weird for https://10.100.201.100:2379 $ nerdctl exec usernetes-node-1 curl -k https://127.0.0.1:2379
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
curl: (7) Failed to connect to 127.0.0.1 port 2379 after 1 ms: Couldn't connect to server
FATA[0000] exec failed with exit code 7
$ nerdctl exec usernetes-node-1 curl -k https://10.100.201.100:2379
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
curl: (55) getpeername() failed with errno 107: Transport endpoint is not connected
FATA[0000] exec failed with exit code 55 |
Trying to isolate the issue from Kubernetes, but apparently the issue can't be reproduced with a simple etcd-only container $ nerdctl run -it --rm --annotation nerdctl/bypass4netns=1 ubuntu:24.04
root@f601efbaeb12:/# apt-get update && apt-get install -y etcd-server curl iproute2 jq
root@f601efbaeb12:/# ip=$(ip --json route get 1 | jq -r .[0].prefsrc)
root@f601efbaeb12:/# etcd --advertise-client-urls=http://${ip}:2379 --listen-client-urls=http://127.0.0.1:2379,http://${ip}:2379 &
root@f601efbaeb12:/# : 404 is expected here
root@f601efbaeb12:/# curl http://127.0.0.1:2379
404 page not found
root@f601efbaeb12:/# curl http://${ip}:2379
404 page not found Probably the problem is about that the etcd is running in an etcd pod container inside the node container |
I've never tried bypass4netns with nested containers. |
Workaround: disable bind (it is already fast without bypassing) |
I confirmed the issue. The below log shows the situation then I created netns and executed iperf3 in a container with bypass4netns.
bypass4netns wrongly bypasses the iperf3 socket.
|
I'm trying to run Usernetes (single-node w/o VXLAN, as a baby step) with bypass4netnsd, but kubeadm fails:
Looks like kube-apiserver is failing to connect to the local etcd due to
dial tcp 127.0.0.1:2379: connect: connection refused
,although the etcd process is running with
--listen-client-urls=https://127.0.0.1:2379,https://10.100.201.100:2379
.Version
Logs
The text was updated successfully, but these errors were encountered: