This message was deleted.
# rancher-desktop
a
This message was deleted.
c
Are you behind a VPN?
i
No, I am not.
But Ï do see an error messages: Check CONNECTED_TO_INTERNET result: {"description":"The application cannot reach the general internet for updated kubernetes versions and other components, but can still operate.","passed":true,"fixes":[]}
Which is strange, since I have full connection to the Internet: "curl https://google.com <HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8"> <TITLE>301 Moved</TITLE></HEAD><BODY> <H1>301 Moved</H1> The document has moved <A HREF="https://www.google.com/">here</A>. </BODY></HTML>"
c
Rancher desktop check the network connectivity by pinging example.com every 5 seconds (it’s not great it will change in the future), I wonder if those checks are failing https://github.com/rancher-sandbox/rancher-desktop/issues/4639
can you curl
<https://example.com>
from inside the vm to see if it works?
i
The distribution list shows that rancher-desktop-data is down. Is that significant? * Ubuntu-20.04 Running 2 rancher-desktop Running 2 rancher-desktop-data Stopped 2
c
oh, that’s not good
maybe do a factory reset
i
Let me try that.
c
actually, the
rancher-desktop-data   Stopped
it usually doesn’t go in the running state (it always reports Stopped), however, factory reset won’t be a bad idea
i
I restarted andnow I am getting "│2023-06-08T195530.961Z: Connection test completed successfully "
👍 1
Enabling k3s now.
c
can you share the logs from guest agent with me?
you can send them directly if you like
i
Here ar ethe logs I have: background.log deploymentProfile.log images.log k8s.log lima.log mock.log networking.log settings.log steve.log vtunnel-host.log wsl-helper.Ubuntu-20.04.log dashboardServer.log diagnostics.log integrations.log kube.log moby.log nerdctl.log server.log shortcuts.log update.log wsl-exec.log wsl.log
I don't see a guest agent
-rwxrwxrwx 1 root root 11699 Jun 8 13:01 diagnostics.log -rwxrwxrwx 1 root root 7998 Jun 8 13:01 background.log -rwxrwxrwx 1 root root 36432 Jun 8 12:57 wsl-exec.log -rwxrwxrwx 1 root root 1511 Jun 8 12:57 wsl.log -rwxrwxrwx 1 root root 9373 Jun 8 12:57 integrations.log -rwxrwxrwx 1 root root 0 Jun 8 12:57 shortcuts.log -rwxrwxrwx 1 root root 0 Jun 8 12:57 settings.log -rwxrwxrwx 1 root root 40342 Jun 8 12:56 k8s.log -rwxrwxrwx 1 root root 0 Jun 8 12:56 vtunnel-host.log -rwxrwxrwx 1 root root 259 Jun 8 12:55 update.log -rwxrwxrwx 1 root root 0 Jun 8 12:54 wsl-helper.Ubuntu-20.04.log -rwxrwxrwx 1 root root 110 Jun 8 12:54 server.log -rwxrwxrwx 1 root root 760 Jun 8 12:54 dashboardServer.log -rwxrwxrwx 1 root root 0 Jun 8 12:54 deploymentProfile.log -rwxrwxrwx 1 root root 0 Jun 8 12:54 images.log -rwxrwxrwx 1 root root 0 Jun 8 12:54 mock.log -rwxrwxrwx 1 root root 0 Jun 8 12:54 steve.log -rwxrwxrwx 1 root root 0 Jun 8 12:54 kube.log -rwxrwxrwx 1 root root 0 Jun 8 12:54 lima.log -rwxrwxrwx 1 root root 0 Jun 8 12:54 moby.log -rwxrwxrwx 1 root root 0 Jun 8 12:54 nerdctl.log -rwxrwxrwx 1 root root 0 Jun 8 12:54 networking.log
c
hmm, that doesn’t seem right
are you able to share your logs?
i
Sure, let me know which one you need.
c
these ones -rwxrwxrwx 1 root root 7998 Jun 8 13:01 background.log -rwxrwxrwx 1 root root 36432 Jun 8 12:57 wsl-exec.log -rwxrwxrwx 1 root root 1511 Jun 8 12:57 wsl.log and -rwxrwxrwx 1 root root 0 Jun 8 12:54 kube.log and -rwxrwxrwx 1 root root 0 Jun 8 12:57 settings.log -rwxrwxrwx 1 root root 40342 Jun 8 12:56 k8s.log
can you send the
vtunnel-host.log
too, I see error messages pointing to that
i
That file is empty: -rwxrwxrwx 1 root root 0 Jun 8 12:56 vtunnel-host.log
c
I see, also kube and settings was empty too
i
Oh right. (I didn't realize why Slack was refusing sending these files. Sorry)
👍 1
Now after the factory reset both distro's are stopped: NAME STATE VERSION * Ubuntu-20.04 Running 2 rancher-desktop-data Stopped 2 rancher-desktop Stopped 2
c
yeah, I’m not surprised that rancher-desktop is going to the stopped state, something bad is happening
i
After the factory reset, now I exposed config and socket to my WSL distro. And now the rancher-desktop is running again.
❯ wsl --list --verbose NAME STATE VERSION * Ubuntu-20.04 Running 2 rancher-desktop-data Stopped 2 rancher-desktop Running 2
The diagnostics.log has the error message
Copy code
2023-06-08T20:28:35.286Z: Running connectivity test with timeout of 5000 ms
2023-06-08T20:28:35.364Z: Connection test completed successfully
2023-06-08T20:28:37.556Z: ERROR checking KUBE_CONTEXT {
  e: Error: C:\Users\Bernd_Prager\AppData\Local\Programs\Rancher Desktop\resources\resources\win32\bin\kubectl exited with code 1
      at ChildProcess.<anonymous> (C:\Users\Bernd_Prager\AppData\Local\Programs\Rancher Desktop\resources\app.asar\dist\app\background.js:1:8136)
      at ChildProcess.emit (node:events:527:28)
      at ChildProcess._handle.onexit (node:internal/child_process:291:12) {
    stdout: '',
    code: 1,
    command: [
      'C:\\Users\\Bernd_Prager\\AppData\\Local\\Programs\\Rancher Desktop\\resources\\resources\\win32\\bin\\kubectl',
      'config',
      'view',
      '--minify',
      '--output=json'
    ]
  }
}
When I run this command from the CLI I get:
Copy code
❯ & 'C:\Users\Bernd_Prager\AppData\Local\Programs\Rancher Desktop\resources\resources\win32\bin\kubectl.exe' config view
I0608 13:33:25.425849   36876 versioner.go:58] invalid configuration: no configuration has been provided
apiVersion: v1
clusters: null
contexts: null
current-context: ""
kind: Config
preferences: {}
users: null
c
what version of k8s are you using?
i
v1.26.5
When I check the Internet from inside the docker-desktop distro, I am getting an error:
Copy code
wsl --distribution rancher-desktop --exec curl <https://www.google.com>
curl: (6) Could not resolve host: <http://www.google.com|www.google.com>
Is that significant?
I added my local nameserver to resolv.conf inside the rancher-desktop distro. I can now access the internet. But other than that nothing has changed.
c
Yeah, that basically indicates that there are no working dns servers are configured that’s why I mentioned to try this https://rancher-users.slack.com/archives/C0200L1N1MM/p1686253909975819?thread_ts=1686252696.055249&amp;cid=C0200L1N1MM
You shouldn’t have to modify the
resolve.conf
inside the VM, that could mess up a few things
i
Yes, I can do that now.
ok, let me clean that up then again
But after that, I can no longer resolve https://example.com
Copy code
Could not resolve host: <http://example.com|example.com>
c
are you able to share what is inside the
/etc/resolv.conf?
if anything confidential you can mask it
i
Yes, I can share it, it is completely empty.
c
oh, that’s not good. There should at least an entry there
did you update/remove it after the factory reset?
i
No, it was empty right away after the factory reset.
Should I try to reset it again?
c
well, what is running in the ubuntu distro?
i
zsh
Do you want me to share my screen?
c
No sorry, I won’t be able to any screen sharing now
i
No worries.
Just let me know whatever you need.
👍 1
c
Just to isolate the issue, are you able to stop the ubuntu distro, do a factory reset in Rancher Desktop and see if that works?
i
Sure
c
I just want to make sure that the ubuntu distro is not interfering with the rancher-destkop, generally it shouldn’t, however, in WSL the network is shared across all distros and I’m wondering if ubuntu distro might be causing something here
i
Something is not right, After I shutdown the Ubuntu distro and I start Rancher Desktop, the Ubuntu distro come up again
Copy code
❯ wsl --list --verbose
  NAME               STATE           VERSION
* Ubuntu-20.04       Stopped         2
  rancher-desktop    Stopped         2
   Bernd_Prager@EPUSPRIW0774  C:  Windows  system32 
❯ wsl --list --verbose
  NAME               STATE           VERSION
* Ubuntu-20.04       Running         2
  rancher-desktop    Stopped         2
   Bernd_Prager@EPUSPRIW0774  C:  Windows  system32 
Ok, so now I am here:
Copy code
❯ wsl --list --verbose
  NAME                    STATE           VERSION
* Ubuntu-20.04            Stopped         2
  rancher-desktop         Running         2
  rancher-desktop-data    Stopped         2
The resolv.conf has now an entry:
Copy code
❯ wsl --distribution rancher-desktop --exec cat /etc/resolv.conf
nameserver 172.23.210.109
c
Ok, that looks correct
i
And k8s is working:
Copy code
❯ kubectl get all
NAME                 TYPE        CLUSTER-IP   EXTERNAL-IP   PORT(S)   AGE
service/kubernetes   ClusterIP   10.43.0.1    <none>        443/TCP   3m41s
So something with Ubuntu screws it up, it seems ...
c
Yeah, the network is shared across all distros (wsl limitation)
So, I'm not too sure what it's in Ubuntu that interferes with RD but I can give you a hint, whatever it is, it's making changes to DNS, probably messing with resolv.conf file or something
i
If I start Ubuntu after Rancher Desktop, k8s is still working.
But I have not exposed RD to the Ubuntu WSL yet.
Let me check what happens then.
It says something about updating DNS configuration.
And now k8s is no longer working.
c
Can you see the resolv.conf again
i
So something in the process when RD changes the DNS configuration it goes south.
My resolv.conf on the Ubuntu distro contains a static IP address:
Copy code
# Home
nameserver 192.168.1.2
There I run dsnmasq to cache DNS requests and provide IP addresses for my network.
I am not sure what could go wrong there.
I noticed that rancher-desktop has a dnsmasq.conf as well. Could that cause some conflict?
c
Yes, but we don't usually run that in 1.8
And it should be disabled
i
On the other hand when I run kubectl after the connection to Ubuntu is made I get the error message :
Copy code
Unable to connect to the server: dial tcp 172.23.210.109:6443: connectex: No connection could be made because the target machine actively refused it.
It's not a timeout.
c
Yeah, there is no dns
i
I see.
c
That RD can work with
You will need to change the entry in resolv.conf to the original value
So, if you modify the resolv.conf file in one WSL 2 distribution, those changes will be visible to other distributions within WSL 2.
i
Where would I have to point that to?
c
To the eth0 inside the vm
If you do
IP -o a
The eth0 ip can be used as a DNS server address too
i
So, do I add that to my dnsmaq server or to I have to drop my server entirely?
c
Well, I don't know about the DNSmasq, maybe try dropping it
Rancher desktop does run a DNS server
So you can just use that
And the address for that server is same address as the eth0
i
But then I have to forget my internal boxes which get their IP address by dnsmasq.
c
So maybe you can use that for your purposes?
i
I will play around with that. Thank you for your help.
c
One thing might be a help to you is to define a host names for your IP addresses and add them to the host file on the windows host
Then you can access them using the hostnames and Rancher desktop DNS can also resolve those entries
i
That's going to be tough. I have a lot of dynamically assigned IP addresses.
c
I see,that would be cumbersome
599 Views