“error: cannot communicate with server: timeout exceeded while waiting for response” on a fresh system when installing core

On Debian 12, we tried to install Skype. As a preliminary step, the instructions Install Skype on Debian using the Snap Store | Snapcraft tell us to install core first. So (with username below being a placeholder for a real user name):

# dpkg -l snapd
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version      Architecture Description
un  snapd          <none>       <none>       (no description available)
# find / -iname snap 2>>/dev/null
# ls -la /sys/fs/bpf/snap
total 0
drwx------ 2 root root 0 Jun  4 16:57 .
drwx-----T 3 root root 0 Jun  4 16:57 ..
# aptitude install snapd
The following NEW packages will be installed:
0 packages upgraded, 1 newly installed, 0 to remove and 6 not upgraded.
Need to get 0 B/14.9 MB of archives. After unpacking 61.4 MB will be used.
Selecting previously unselected package snapd.
(Reading database ... 574356 files and directories currently installed.)
Preparing to unpack .../snapd_2.57.6-1+b5_amd64.deb ...
Unpacking snapd (2.57.6-1+b5) ...
Setting up snapd (2.57.6-1+b5) ...
Created symlink /etc/systemd/system/multi-user.target.wants/snapd.aa-prompt-listener.service → /lib/systemd/system/snapd.aa-prompt-listener.service.
Created symlink /etc/systemd/system/multi-user.target.wants/snapd.apparmor.service → /lib/systemd/system/snapd.apparmor.service.
Created symlink /etc/systemd/system/multi-user.target.wants/snapd.recovery-chooser-trigger.service → /lib/systemd/system/snapd.recovery-chooser-trigger.service.
Created symlink /etc/systemd/system/multi-user.target.wants/snapd.seeded.service → /lib/systemd/system/snapd.seeded.service.
Created symlink /etc/systemd/system/cloud-final.service.wants/snapd.seeded.service → /lib/systemd/system/snapd.seeded.service.
Unit /lib/systemd/system/snapd.seeded.service is added as a dependency to a non-existent unit cloud-final.service.
Created symlink /etc/systemd/system/multi-user.target.wants/snapd.service → /lib/systemd/system/snapd.service.
Created symlink /etc/systemd/system/sockets.target.wants/snapd.socket → /lib/systemd/system/snapd.socket.
Processing triggers for gnome-menus (3.36.0-1.1) ...
Processing triggers for man-db (2.11.2-2) ...
Processing triggers for dbus (1.14.10-1~deb12u1) ...
Processing triggers for dbus-broker (33-1) ...
Processing triggers for mailcap (3.70+nmu1) ...
Processing triggers for desktop-file-utils (0.26-1) ...
Scanning processes...                                                                                                                                                                                                                                                                                                                                                                                                                     
Scanning candidates...                                                                                                                                                                                                                                                                                                                                                                                                                    
Scanning processor microcode...                                                                                                                                                                                                                                                                                                                                                                                                           
Scanning linux images...                                                                                                                                                                                                                                                                                                                                                                                                                  

Running kernel seems to be up-to-date.

The processor microcode seems to be up-to-date.

No services need to be restarted.

No containers need to be restarted.

User sessions running outdated binaries:
 username @ user manager service: systemd[5890]

No VM guests are running outdated hypervisor (qemu) binaries on this host.
you have mail
# snap install core
error: cannot communicate with server: timeout exceeded while waiting for response

Could you be more informative, dudes? Which program or procedure could not communicate with which server while waiting for a response to which request or query, and how long was the timeout?

To resolve your problem, you might find a reboot of your installation will get snapd operational. I believe the connection is probably local between the background process and the command line application, but cannot be sure. If I’m right then it indicates that snapd hasn’t started yet, so the reboot will fix that. You might be able to kickstart it manually without the reboot, but I’m not sure exactly which systemd services you’d need to kick on Debian to achieve that.

The error is coming from a library provided by the language that snapd is written in, so we cannot know exactly which connection to where is failing without the snapd devs adding more error handling.

1 Like

In any way, the installation instructions are wrong to recommend installing the core snap. It’s no longer needed to get snapd updates if the snapd snap is installed already.

If you executed the commands one after another, then the installation of snapd snap may have triggered a restart of the snapd service, which means it may become unavailable for a brief moment. Perhaps you were lucky enough to run the core install command at that time and so the snap command raised an error. FWIW it’s enough to run snap install skype.

@lucyllewy Thx! I rebooted.

@mborzecki1 Thx! Good to know!

I’ll undertake my next attempt probably after the Skype installation instructions are corrected (if noone feels the need to correct them, the Skype project is likely to be dead :frowning: ).