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

Rancher Desktop 1.17.1 on Ubuntu 24.04. Containers cannot connect to the internet #8259

Open
emanuelet opened this issue Feb 19, 2025 · 3 comments
Assignees
Labels
kind/bug Something isn't working platform/linux

Comments

@emanuelet
Copy link

Actual Behavior

I am facing the issue that none of my containers can connect to the internet, not even if I try to use the host network.
I am on Ubuntu 24.04.1 LTS and running Rancher desktop 1.17.1 and I have been able to pinpoint the issue to the conflict that happens between the default subnet instantiated by docker 172.17.0.0/16 and the host ip.
I have scoured online for solutions and the only one that worked was to apply a new bip in the /etc/docker/daemon.json and switching the docker context to vanilla docker.
That was also corroborated by the result of docker network inspect bridge that was showing the correct new ip been used.
Unfortunately when I start Rancher, all of that gets ignored and it re-creates the bridge network with the default broken subnet.
Can you point me to (and maybe add to the documentation) where does rancher looks for these network settings?
My /etc/docker/daemon.json (used by vanilla docker)

{
  "bip": "192.168.1.5/24",
  "fixed-cidr": "192.168.1.5/25",
  "default-address-pools":[
      { "base":"192.168.2.5/24", "size":28 }
  ]
}

Steps to Reproduce

  • Boot up a fresh install of ubuntu 24.04.1 or start live usb session
  • install rancher desktop
  • in the terminal run docker run --rm -it busybox ping 1.1.1.1

Result

ping does not show any results

Expected Behavior

Ping returns results

PING 1.1.1.1 (1.1.1.1) 56(84) bytes of data.
64 bytes from 1.1.1.1: icmp_seq=1 ttl=59 time=12.6 ms
64 bytes from 1.1.1.1: icmp_seq=2 ttl=59 time=12.6 ms

Additional Information

No response

Rancher Desktop Version

1.17.1

Rancher Desktop K8s Version

1.31

Which container engine are you using?

moby (docker cli)

What operating system are you using?

Ubuntu

Operating System / Build Version

Ubuntu 24.04.1 LTS

What CPU architecture are you using?

x64

Linux only: what package format did you use to install Rancher Desktop?

deb

Windows User Only

No response

@emanuelet emanuelet added the kind/bug Something isn't working label Feb 19, 2025
@Nino-K
Copy link
Member

Nino-K commented Feb 24, 2025

@emanuelet thanks for filing this issue. I just tested it on 22.04.1 LTS using both Rancher Desktop 1.17.1 and 1.18, and the changes made to the daemon.json seem to persist (not ignored) after starting Rancher Desktop. I would like to suggest a few things for you. First, are you making changes to the correct daemon.json? Since docker in Rancher Desktop runs in the VM, you can access it using rdctl shell. Additionally, you may find helpful information in the Provisioning Scripts guide.

@emanuelet
Copy link
Author

So on 22.04 LTS it works fine, hence why I had to downgrade all my machines to it (22.04.5 to be precise).
Also I want to reiterate that the daemon.json that I posted is the one that is used by Vanilla Docker (Docker Engine), right now I am working on a fresh install of 22.04.5 with Rancher 1.18 and I don't even have a /etc/docker/daemon.json file in the main system.
If I userdctl shelland see the same file inside the VM I get this

{
  "bip": "192.168.1.5/24",
  "fixed-cidr": "192.168.1.5/25",
  "default-address-pools": [
    {
      "base": "192.168.2.5/24",
      "size": 28
    }
  ],
  "features": {
    "containerd-snapshotter": false
  }
}

It will appear to me that on 24.04 Rancher, uses or sets up a different configuration for the bridge network, am I right?

@Nino-K
Copy link
Member

Nino-K commented Feb 25, 2025

@emanuelet The default daemon.json created by Rancher Desktop contains only the following property:

  "features": {
    "containerd-snapshotter": false
  }

You can confirm this here. Any additional properties in the file are added later on by the user.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working platform/linux
Projects
None yet
Development

No branches or pull requests

3 participants