-
Notifications
You must be signed in to change notification settings - Fork 822
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
"snap install" fails with error: cannot communicate with server: Post http://localhost/v2/snaps: dial unix /run/snapd.socket: connect: no such file or directory #2374
Comments
the first file: |
@mi-hol - Is the snap install command actually failing? The output is only a warning. |
@benhillis as written above 'Any snap command fails!' |
maybe a better example is: root@DESKTOP-D08QRG3:~ snap install snapweb |
@benhillis I've tried fix for 'Unable to launch URLs from snapped applications' from https://snapcraft.io/docs/core/install-ubuntu but issue persists root@DESKTOP-D08QRG3:~ apt install snapd-xdg-open |
@benhillis I was wondering if this issue will get attention of the development team any time soon? |
@benhillis |
bug seems only partially fixed in Windows build 17107.1000 |
They're right. It hasn't. |
I asked @tara-raj about this a few days ago and they're working with the distro partners to get this working. Glad to see it's progressed this far. @therealkenc Since you appear to have a working systemd per #994 , how does it look for you? |
with latest version snapd (2.33.1+18.04ubuntu2) the error during install now changes to: what works is: the proposed solution to manually start snapd gave the next error. Any further suggestions?
|
That is equivalent to (edit, pedantry):
You could in principle open a UserVoice entry for squashfs support. |
Also experiencing this error. WSL having upgrade to Ubuntu 18.10
|
Manually launching snapd daemon with the command
in the shell that launched the install command and:
in the shell running snapd daemon. |
Originally posted as https://aka.ms/AA4yrsp
This as of setting Prompt=normal in sudo nano /etc/update-manager/release-upgrades and running sudo do-release-upgrade Although the release upgrader upgraded the distro from bionic 1804 LTS to cosmic 1810, it failed to upgrade lxd due to not supporting snapd
Since snapd is not yet supported, this leaves the distro with inability to update packages, because the aborted lxd migration to snap (retrying doesn't help, it can't connect to the snap store) leaves apt in a broken state, requiring to sudo apt --fix-broken install which ends in the same
By extension, doing a packages update attempt ends in the same request to fix the install, which ends with the same issue with lxd and snapd per above
|
Any asnwer for this? |
you will need to start |
now instead of giving an error it says:
|
yes...it worked...now my distro is up....systemd settled and snap works....Thank you.....You made my day... |
Mee too service snapd start` : ) |
I am having this issue on a freshly installed Ubuntu 20.04 LTS, using WSL2 on Windows 10 $ sudo snap install intellij-idea-ultimate --classic
error: cannot communicate with server: Post http://localhost/v2/snaps/intellij-idea-ultimate: dial unix /run/snapd.socket: connect: no such file or directory The following workarounds did not fix the issue: $ service snapd start
snapd: unrecognized service
$ systemctl start snapd
System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to connect to bus: Host is down |
this works like charm |
It worked also for me with Ubuntu 18.04 on WSL 2 |
As per sunliusi here: #5126 (comment)
EDIT: Forgot to mention, I'm on: |
This worked for me. Windows 10 |
Thanks so much! It's ok now@windows10 wsl2 snap version |
Thanks, works in W10 v19042. |
I have managed to get the systemd and snap working using @DamionGans's script - kudos! $ git clone https://github.com/DamionGans/ubuntu-wsl2-systemd-script.git
$ cd ubuntu-wsl2-systemd-script/
$ bash ubuntu-wsl2-systemd-script.sh C:\> wsl --shutdown $ sudo systemctl status snapd.service
● snapd.service - Snap Daemon
Loaded: loaded (/lib/systemd/system/snapd.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2021-04-22 15:01:49 BST; 2min 25s ago
TriggeredBy: ● snapd.socket
Main PID: 840 (snapd)
Tasks: 21 (limit: 61472)
Memory: 54.9M
CGroup: /system.slice/snapd.service
└─840 /usr/lib/snapd/snapd
$ snap version
snap 2.48.3+20.04
snapd 2.48.3+20.04
series 16
ubuntu 20.04
kernel 5.4.72-microsoft-standard-WSL2 |
Glad the script still works. It's no longer maintained though, so don't expect it to keep working after many updates of WSL2. |
The cause of the OP error is |
This works for me on Windows 11 with WSL2 Ubuntu 20.04. 🙂 |
try |
journalctl -xu snapd.service
|
Thanks:) |
For me none of the solutions worked. Worked for me (Win 11, WSL2 Ubuntu 20.04) |
Worked for me on Win 11, Ubuntu 20.04 |
Resulted in snap version working, but installing anything resulted in
|
This workaround only works until the terminal is closed, using WSL2 Ubuntu 20.04 on Windows 10 21H2. Up until I close the terminal I could run
After closing the terminal and opening another one,
|
Ubuntu 22.04 LTS is also affected by this issue. |
This may be of interest to those reading this issue: Microsoft and Canonical jointly announced today that systemd now works within Windows Subsystem for Linux (WSL2). WSL can now run systemd inside of WSL Linux distributions for managing of services. Applications dependent upon systemd for use or simply for easy management can now run easier under this WSL environment on Windows 10/11. For details on this and how to enable the functionality see: |
after login with snap login same error occurs
anyone have the same issue? |
this new release closes the issue |
Your snapd is probably not running try this To Start snapd service
To Start snapd anytime system boots
|
Windows build number: Microsoft Windows [Version 10.0.16251.0]
What you're doing and what's happening:
Any snap command fails!
Example:
snap download anbox-installer
2017/07/27 13:28:51.061146 main.go:220: WARNING: cannot create syslog logger
Fetching snap "anbox-installer"
Fetching assertions for "anbox-installer"
What's wrong / what should be happening instead:
download should complete
Strace of the failing command, if applicable:
many strace.tx files exist, copied latest below
Please let me know if more are needed
root@DESKTOP-D08QRG3:~# ls
anbox-installer_17.assert strace.txt.365 strace.txt.367 strace.txt.369 strace.txt.371 strace.txt.373
anbox-installer_17.snap strace.txt.366 strace.txt.368 strace.txt.370 strace.txt.372
root@DESKTOP-D08QRG3:~# cat strace.txt.373
set_robust_list(0x7fcc327c09e0, 24) = 0
sigaltstack(NULL, {ss_sp=NULL, ss_flags=SS_DISABLE, ss_size=0}) = 0
sigaltstack({ss_sp=0xc8201cc000, ss_flags=0, ss_size=32672}, NULL) = 0
gettid() = 373
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
futex(0x7fcc3c1c5c28, FUTEX_WAKE, 1) = 0
futex(0x7fcc3c1c5b50, FUTEX_WAKE, 1) = 1
futex(0xc82044c508, FUTEX_WAKE, 1) = 1
clock_gettime(CLOCK_MONOTONIC, {57061, 366965000}) = 0
clock_gettime(CLOCK_MONOTONIC, {57061, 370655000}) = 0
clock_gettime(CLOCK_MONOTONIC, {57061, 372815000}) = 0
clock_gettime(CLOCK_MONOTONIC, {57061, 376306000}) = 0
futex(0x7fcc3c1c5c00, FUTEX_WAIT, 0, {0, 100000}) = -1 EAGAIN (Resource temporarily unavailable)
clock_gettime(CLOCK_MONOTONIC, {57061, 376888000}) = 0
clock_gettime(CLOCK_MONOTONIC, {57061, 377184000}) = 0
futex(0xc82044c508, FUTEX_WAKE, 1) = 1
futex(0xc820480108, FUTEX_WAKE, 1) = 1
futex(0xc82005e508, FUTEX_WAKE, 1) = 1
futex(0x7fcc3c1c5e10, FUTEX_WAIT, 0, NULL) = -1 EAGAIN (Resource temporarily unavailable)
clock_gettime(CLOCK_MONOTONIC, {57061, 384888000}) = 0
clock_gettime(CLOCK_REALTIME, {1501155366, 216861900}) = 0
epoll_wait(6, [], 128, 0) = 0
clock_gettime(CLOCK_MONOTONIC, {57061, 385849000}) = 0
futex(0x7fcc3c1c5c10, FUTEX_WAKE, 1) = 1
futex(0xc82044c508, FUTEX_WAKE, 1) = 1
clock_gettime(CLOCK_MONOTONIC, {57061, 388162000}) = 0
futex(0x7fcc3c1cae40, FUTEX_WAKE, 1) = 1
sched_yield() = 0
futex(0x7fcc3c1cae40, FUTEX_WAIT, 2, NULL) = -1 EAGAIN (Resource temporarily unavailable)
sched_yield() = 0
futex(0x7fcc3c1cae40, FUTEX_WAIT, 2, NULL) = -1 EAGAIN (Resource temporarily unavailable)
sched_yield() = 0
futex(0x7fcc3c1cae40, FUTEX_WAIT, 2, NULL) = -1 EAGAIN (Resource temporarily unavailable)
sched_yield() = 0
futex(0x7fcc3c1cae40, FUTEX_WAIT, 2, NULL) = -1 EAGAIN (Resource temporarily unavailable)
sched_yield() = 0
futex(0x7fcc3c1cae40, FUTEX_WAIT, 2, NULL) = 0
sched_yield() = 0
futex(0x7fcc3c1cae40, FUTEX_WAIT, 2, NULL) = -1 EAGAIN (Resource temporarily unavailable)
sched_yield() = 0
futex(0x7fcc3c1cae40, FUTEX_WAIT, 2, NULL) = -1 EAGAIN (Resource temporarily unavailable)
sched_yield() = 0
futex(0x7fcc3c1cae40, FUTEX_WAIT, 2, NULL) = -1 EAGAIN (Resource temporarily unavailable)
sched_yield() = 0
futex(0x7fcc3c1cae40, FUTEX_WAIT, 2, NULL) = -1 EAGAIN (Resource temporarily unavailable)
sched_yield() = 0
futex(0x7fcc3c1cae40, FUTEX_WAIT, 2, NULL) = -1 EAGAIN (Resource temporarily unavailable)
sched_yield() = 0
futex(0x7fcc3c1cae40, FUTEX_WAIT, 2, NULL) = -1 EAGAIN (Resource temporarily unavailable)
sched_yield() = 0
futex(0x7fcc3c1cae40, FUTEX_WAIT, 2, NULL) = -1 EAGAIN (Resource temporarily unavailable)
sched_yield() = 0
clock_gettime(CLOCK_MONOTONIC, {57061, 437927000}) = 0
futex(0x7fcc3c1cae40, FUTEX_WAKE, 1) = 0
futex(0x7fcc3c1e3198, FUTEX_WAKE, 1) = 1
clock_gettime(CLOCK_MONOTONIC, {57061, 439470000}) = 0
select(0, NULL, NULL, NULL, {0, 100}) = 0 (Timeout)
futex(0xc82005e508, FUTEX_WAKE, 1) = 1
clock_gettime(CLOCK_REALTIME, {1501155366, 280694300}) = 0
clock_gettime(CLOCK_REALTIME, {1501155366, 282703000}) = 0
socket(PF_INET, SOCK_DGRAM|SOCK_CLOEXEC|SOCK_NONBLOCK, IPPROTO_IP) = 9
setsockopt(9, SOL_SOCKET, SO_BROADCAST, [1], 4) = 0
connect(9, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("80.69.96.12")}, 16) = 0
clock_gettime(CLOCK_REALTIME, {1501155366, 284549600}) = 0
epoll_ctl(6, EPOLL_CTL_ADD, 9, {EPOLLIN|EPOLLOUT|EPOLLRDHUP|EPOLLET, {u32=990998440, u64=140515141054376}}) = 0
getsockname(9, {sa_family=AF_INET, sin_port=htons(59083), sin_addr=inet_addr("192.168.0.234")}, [16]) = 0
getpeername(9, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("80.69.96.12")}, [16]) = 0
clock_gettime(CLOCK_REALTIME, {1501155366, 287166600}) = 0
clock_gettime(CLOCK_MONOTONIC, {57061, 456210000}) = 0
clock_gettime(CLOCK_REALTIME, {1501155366, 288305300}) = 0
clock_gettime(CLOCK_MONOTONIC, {57061, 457255000}) = 0
clock_gettime(CLOCK_REALTIME, {1501155366, 289155800}) = 0
write(9, "A\277\1\0\0\1\0\0\0\0\0\0\nassertions\6ubuntu\3c"..., 39) = 39
read(9, 0xc820120000, 512) = -1 EAGAIN (Resource temporarily unavailable)
futex(0xc82011c108, FUTEX_WAIT, 0, NULL) = 0
epoll_wait(6, [], 128, 0) = 0
futex(0xc82011c108, FUTEX_WAIT, 0, NULL) = 0
epoll_wait(6, [{EPOLLOUT, {u32=990998440, u64=140515141054376}}], 128, 0) = 1
epoll_wait(6, [{EPOLLOUT, {u32=990998440, u64=140515141054376}}], 128, -1) = 1
epoll_wait(6, [{EPOLLOUT, {u32=990998440, u64=140515141054376}}], 128, -1) = 1
epoll_wait(6, [{EPOLLIN, {u32=990998440, u64=140515141054376}}], 128, -1) = 1
clock_gettime(CLOCK_MONOTONIC, {57061, 589195000}) = 0
futex(0x7fcc3c1c5c10, FUTEX_WAKE, 1) = 1
read(8, "\26\3\3\0]\2\0\0Y\3\3m\10v\236c\343\251\352\272\24\335x<\35\271\254\347\274&\320\6"..., 1024) = 1024
read(8, "p0n0$\6\10+\6\1\5\5\0070\1\206\30http://ocsp.dig"..., 3170) = 2879
clock_gettime(CLOCK_REALTIME, {1501155366, 423912200}) = 0
getrandom("\337\26\241\17v-\317\353\340\36\354\10"\3038\24\367\320\227pLn\232\256b\304X\226Y\10\330\376", 32, 0) = 32
write(8, "\26\3\3\0F\20\0\0BA\4\352\4\345\217\314\261l\227W\224\362\314\247\275\275\210\205\212\236\213o"..., 75) = 75
write(8, "\24\3\3\0\1\1", 6) = 6
write(8, "\26\3\3\0(\0\0\0\0\0\0\0\0l\10\311\21Y\243\26\225_\251\177 \24\274\200\333\216d\36"..., 45) = 45
read(8, 0xc8201b1000, 4096) = -1 EAGAIN (Resource temporarily unavailable)
epoll_wait(6, [], 128, 0) = 0
epoll_wait(6, [{EPOLLIN, {u32=990998440, u64=140515141054376}}], 128, -1) = 1
clock_gettime(CLOCK_MONOTONIC, {57061, 629679000}) = 0
futex(0x7fcc3c1c5c10, FUTEX_WAKE, 1) = 1
read(8, "\24\3\3\0\1\1\26\3\3\0(IRu\26\212\333\324\i\327i\262\320z\226\343Qj\316(i"..., 4096) = 51
futex(0x7fcc3c1c67c8, FUTEX_WAKE, 1) = 1
read(8, 0xc820134000, 1024) = -1 EAGAIN (Resource temporarily unavailable)
futex(0xc82011c108, FUTEX_WAIT, 0, NULL) = 0
epoll_wait(6, [], 128, 0) = 0
futex(0xc82044c508, FUTEX_WAKE, 1) = 1
epoll_wait(6, [], 128, 0) = 0
futex(0xc82011c108, FUTEX_WAIT, 0, NULL) = 0
epoll_wait(6, [], 128, 0) = 0
futex(0xc82044c508, FUTEX_WAKE, 1) = 1
futex(0xc82011c108, FUTEX_WAIT, 0, NULL) = 0
epoll_wait(6, [], 128, 0) = 0
futex(0xc82044c508, FUTEX_WAKE, 1) = 1
futex(0xc82011c108, FUTEX_WAIT, 0, NULL) = 0
epoll_wait(6, [], 128, 0) = 0
futex(0xc82044c508, FUTEX_WAKE, 1) = 1
epoll_wait(6, [], 128, 0) = 0
select(0, NULL, NULL, NULL, {0, 100}) = 0 (Timeout)
futex(0xc82011c108, FUTEX_WAIT, 0, NULL <unfinished ...>
+++ exited with 0 +++
See our contributing instructions for assistance.
The text was updated successfully, but these errors were encountered: