How to fix multipass error: list failed: cannot connect to the multipass socket
Asked Answered
E

8

11

I install multipass with the following command on Deepin Linux

apt install snapd
snap install multipass

but it not work with this error:

list failed: cannot connect to the multipass socket
Please ensure multipassd is running and '/var/snap/multipass/common/multipass_socket' is accessible

enter image description here

and there is log

enter image description here

Enchanting answered 31/5, 2021 at 15:27 Comment(2)
Did you find any solution?Barnstorm
no ,i have no ideaEnchanting
I
11

The only way I was able to circumvent this issue was doing
sudo chmod a+w /var/snap/multipass/common/multipass_socket.

If you need multipass_socket, follow these instructions

  • sudo snap set system experimental.parallel-instances=true
  • sudo snap install multipass_socket
Ignatz answered 9/6, 2021 at 23:25 Comment(2)
but the file (/var/snap/multipass/common/multipass_socket) is not exists in my PC, and my PC' OS is Deepin Linux V 20.2.2Enchanting
@jiker, you can sudo snap install multipass_socket if you follow the instructions hereUmeko
A
4

TL;DR:

  1. Check if virtualization is enabled.
  2. Restart snapd
  3. Restart multipass.multipassd
  4. Check running instances using multipass list.
  • Settings are lost when system restarts.

I took several attempts in trying to resolve this. I was following this basic tutorial in initiating snap packages. The issues erupted once I ran snapcraft. I'm hoping that the combination of them is what really assisted in the end. For each of the steps below, I ran snapcraft to check whether it worked.

PS: I'm running Manjaro's Plasma KDE v22.0.0, V5.97.0.

Firstly ensure that multipass installation was successful with multipass version, which should give:

multipass   1.10.1

If not, run snap install multipass.

Additional steps:

  1. Ensure VM is enabled in the systems BIOS settings. The error related to this on running snapcraft is verbose enough to understand.
  2. Restart the snapd service using sudo systemctl restart snapd.
  3. Restart the multipassd daemons, using
sudo snap restart multipass.multipassd
  1. I attempted Silva's solution, but I ran into the issue that the directory did not exist. At this point, I was facing the same issue as the OP:
Please ensure multipassd is running and '/var/snap/multipass/common/multipass_socket' is accessible

I think the solution for this is evidently multipass start, which essentially sets up all the directories that may be needed moving forward in my development. Allow some time to pass before running the launch. The restart command. I think the restart command takes some time to fulfill. After this, I was able to successfully run snapcraft, & I did not need to run the chmod command to alter access. You can use multipass list to check on running instances of the VM.

A terrible caveat is that these settings are lost when the computer restarts, so it has to be re-configured again.

Hope it helps!

Azotemia answered 21/9, 2022 at 11:53 Comment(0)
R
1

For me it was dnsmasq issue

sudo journalctl -r -u snap.multipass.multipassd.service

it would show something like this:

Apr 13 07:07:08 pxx2204 multipassd[32088]: dnsmasq: 
  failed to create listening socket for 10.252.92.1: Address already in use

the solution is to find the dnsmasq process and kill it

sudo netstat -antpl| grep :53   
tcp  0  0 10.252.92.1:53  0.0.0.0:*  LISTEN  32473/dnsmasq

then sudo kill -9 32473 --> replace with your own PID

that dnsmasq owned by multipass itself, not sure why it's not restarting properly.

after that just restart again multipass sudo snap restart multipass.multipassd

Remaremain answered 13/4, 2024 at 0:12 Comment(0)
B
0

I have also encountered a similar issue when I have installed Multipass on Ubuntu.

The error message was the same:

Please ensure multipassd is running and '/var/snap/multipass/common/multipass_socket' is accessible

and the socket '/var/snap/multipass/common/multipass_socket' did not exist.

Upon closer inspection of /var/log/syslog

cat /var/log/syslog|grep multipass

I found this lines:

multipassd[162758]: #012dnsmasq: directory /etc/resolv.conf for resolv-file is missing, cannot poll multipassd[162758]: dnsmasq died: Process returned exit code: 5 multipassd[162758]: Caught an unhandled exception: dnsmasq died: Process returned exit code: 5

Leading me to think that something is wrong with /etc/resolv.conf

when I looked up /etc/resolv.conf with ls -la /etc/resolv.conf it was a symlink that pointed to ../run/systemd/resolve/stub-resolv.conf

I decided to try and fix resolveconf via reinstall

sudo apt-get install --reinstall resolvconf

and after this i reinstalled multipass with:

snap remove multipass
snap install multipass

And multipass launch worked for me without a problem.

multipass launch
Launched: wise-brill   
Blague answered 19/8, 2021 at 11:9 Comment(0)
L
0

Having encountered this same problem myself, as well as list failed: Remote "" is unknown or unreachable., and not finding a (satisfactory) solution, I've trialed and errored up until the simple solution:

  1. Ensure your host can reach cloud-images.ubuntu.com
  2. Run
sudo snap restart multipass.multipassd

or it's equivalent: sudo systemctl restart snap.multipass.multipassd.service

  1. Wait several seconds for it to be ready. If you're too quick, it'll provide the same error.

You can check if it works with tail -n50 /var/log/syslog | grep multipass and see if it mentions Starting Multipass <version>. At that point it hasn't encountered any errors at starting up.

Cause

Searching the logs, it had an unhandled exception of not being able to reach the host which provides the image manifests. I was messing around with routing, so that problem was to be expected, but it's odd it cannot handle being disconnected.

The problematic log lines are:

Jun 13 10:52:22 hostname multipassd[1247]: Could not update manifest: failed to download from 'https://cloud-images.
ubuntu.com/buildd/releases/bionic/release/bionic-server-cloudimg-amd64-disk.img': Host cloud-images.ubuntu.com not found
Jun 13 10:52:22 hostname multipass.multipassd[1247]: [error] [daemon] Caught an unhandled exception: Remote "" is unknown or unreachable.
Jun 13 10:52:22 hostname systemd[1]: snap.multipass.multipassd.service: Main process exited, code=exited, status=1/FAILURE
Lionfish answered 14/6, 2022 at 2:4 Comment(0)
S
0

I had the same problem after configuring the Google DNS server (8.8.8.8) in the netplan. Removing the DNS settings resolved the problem.

But, I am not sure what exactly is the root cause.

Shastashastra answered 7/3, 2023 at 22:40 Comment(0)
H
0

I've run the same problem, to my case I noticed that the snapd.socket was disabled, and because of that multipasss could't communicate. So to turn on type:

sudo systemctl start snapd.socket

After that it should be working normally.

Headachy answered 26/2, 2024 at 2:44 Comment(0)
V
0

if you are mac user and trying to run microk8s on your local and facing multipass error then you can try this

# delete VM
multipass delete microk8s-vm
multipass purge

# reinstall
microk8s install
Vicariate answered 21/5, 2024 at 10:51 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.