rancher-sandbox / rancher-desktop

Container Management and Kubernetes on the Desktop
https://rancherdesktop.io
Apache License 2.0
6.03k stars 285 forks source link

connection to the guest agent was closed unexpectedly #853

Open jandubois opened 3 years ago

jandubois commented 3 years ago

I, too, get this shutdown with 0.4.0, but the only extra I see is in the ha.stderr.log {"error":"unexpected EOF","level":"warning","msg":"connection to the guest agent was closed unexpectedly","time":"2021-08-17T11:36:22-04:00"}

The rest is identical to Matt's.

Originally posted by @zoopster in https://github.com/rancher-sandbox/rancher-desktop/issues/505#issuecomment-900434723

jandubois commented 3 years ago

This is still happening with 0.6.0.

Long threat at https://rancher-users.slack.com/archives/C0200L1N1MM/p1634853080019100

One user experiencing #852; the other sees both mounts disappearing:

Oct 22 05:14:07 alpine auth.info sshd[2744]: Received disconnect from 192.168.5.2 port 51900:11: disconnected by user
Oct 22 05:14:07 alpine auth.info sshd[2744]: Disconnected from user <redacted> 192.168.5.2 port 51900

and

{"error":"EOF","level":"debug","msg":"sftp server for /Users/<redacted> exited with EOF (negligible)","time":"2021-10-21T22:14:08-07:00"}
{"error":"EOF","level":"debug","msg":"sftp server for /Users/<redacted>/Library/Caches/rancher-desktop/k3s exited with EOF (negligible)","time":"2021-10-21T22:14:08-07:00"}
{"error":"EOF","level":"debug","msg":"sftp server for /tmp/rancher-desktop exited with EOF (negligible)","time":"2021-10-21T22:14:08-07:00"}
{"error":"unexpected EOF","level":"warning","msg":"connection to the guest agent was closed unexpectedly","time":"2021-10-21T22:14:08-07:00"}

Verification:

$ ls -la /Users/user/Library/Caches/rancher-desktop/k3s
ls: /Users/user/Library/Caches/rancher-desktop/k3s: Socket not connected
dee-kryvenko commented 3 years ago

@jandubois now that I went over it with a fresh head... the Socket not connected I was getting inside the VM. On the host there was a blip - for about 20 seconds any nerdctl/kubectl commands were failing (after I was ejected from kubectl exec session), but after that connection was restored - only volumes mounts in the VM were missing to my /Users.

shaunduncan commented 3 years ago

I am also hitting this issue and seeing the same behavior and error logs. I've stumbled over this a couple of times already in the past 24 hours when attempting to perform a nerdctl build fails. Restarting rancher desktop alleviates the issue. The next time this happens (if it does) I'd be happy to help gather any useful forensic data.

mook-as commented 2 years ago

Steps to reproduce:

As far as I can tell,

I couldn't find any actual problems (other than the missing sshfs mounts). I think that would be resolved once lima moves to use SMB internally. (Or possibly virtio-fs, whichever.)

eraserhd commented 9 months ago

I'm seeing this using docker build ., and I have to restart.

This happens during a particularly long build step:

{"error":"unexpected EOF","level":"warning","msg":"connection to the guest agent was closed unexpectedlyunexpected EOF","time":"2024-02-22T16:31:37-05:00"}

After a long while, the build command fails with:

ERROR: failed to receive status: rpc error: code = Unavailable desc = error reading from server: EOF

I can investigate further if someone can point me in the right direction.

eraserhd commented 9 months ago

The problem was solved for me by increasing the memory available to the VM. I increased memory from 2GB to 8GB and CPUs from 2 to 4. This is on a Mac M1.