I have created a new VM on Google Compute Engine with CentOS 7 and installed Apache and it is working. I am now in the process of enabling HTTPS on this VM through Let's Encrypt certbot.
I followed the instructions on how to install snapd on to my server. When I'm done I usually go and verify that it's working:
[dokgu@domain ~]$ sudo snap version
snap 2.53.4-1.el7
snapd 2.53.4-1.el7
series 16
centos 7
kernel 3.10.0-1160.45.1.el7.x86_64
However I'd like to mention that this command most of the time takes a while to return anything and when it does I get this:
[dokgu@domain ~]$ sudo snap version
snap 2.53.4-1.el7
snapd unavailable
series -
This also always happens when I try to move forward with the instruction where it says to verify that I have the latest version of snapd.
[dokgu@domain ~]$ sudo snap install core; sudo snap refresh core
error: cannot communicate with server: timeout exceeded while waiting for response
error: cannot communicate with server: timeout exceeded while waiting for response
[dokgu@domain ~]$
The same error comes up when I ignore the verification and proceed to install the certbot.
[dokgu@domain ~]$ sudo snap install --classic certbot
error: cannot communicate with server: timeout exceeded while waiting for response
error: cannot communicate with server: timeout exceeded while waiting for response
[dokgu@domain ~]$
How do I fix this issue?
Cheking the status of snapd gives me this:
[dokgu@domain ~]$ sudo systemctl status snapd
● snapd.service - Snap Daemon
Loaded: loaded (/usr/lib/systemd/system/snapd.service; disabled; vendor preset: disabled)
Active: active (running) since Thu 2021-12-30 04:35:54 UTC; 18min ago
Main PID: 28505 (snapd)
CGroup: /system.slice/snapd.service
└─28505 /usr/libexec/snapd/snapd
Dec 30 04:35:54 domain systemd[1]: Starting Snap Daemon...
Dec 30 04:35:54 domain snapd[28505]: AppArmor status: apparmor not enabled
Dec 30 04:35:54 domain snapd[28505]: daemon.go:242: started snapd/2.53.4-1.el7 (series 16; classic; dev...x86_.
Dec 30 04:35:54 domain snapd[28505]: daemon.go:335: adjusting startup timeout by 30s (pessimistic estim...snap)
Dec 30 04:35:54 domain snapd[28505]: helpers.go:105: error trying to compare the snap system key: syste... disk
Dec 30 04:35:54 domain systemd[1]: Started Snap Daemon.
Hint: Some lines were ellipsized, use -l to show in full.
[dokgu@domain ~]$
I'm not sure what the problem is.
And I'm definitely sure that I would not want to case it down any rabbit hole either.
Can you just blow that VM away and start a fresh one?
I could since it is new but this is already the second VM I created since I already blew up the first one where I first encountered this issue.and I'm guessing if I re-create another one, I'll have the same issue. Unless I do something different when I create a new VM, I don't think anything will change. What that change is, I really don't know.
Basically when I created the VM from Google Compute Engine, I went to the marketplace and selected CentOS 7 and clicked on the "Launch" button. From there I basically just enabled HTTP and HTTPS and selected the zone and added a hostname, and I believe those are the only custom settings I put on it.
Not sure if this is going to help but this is a bit of information about the VM:
Yeah for sure, I could always try Ubuntu. Do you think this is more of an OS issue rather than a hardware issue? I believe the VM had 2 CPUs and 4GB memory. I was thinking that might not have been enough. I'm not really sure.
Unfortunately I already nuked the VM and started with Ubuntu 20.04 and I am able to install certbot there. I do have another issue with the challenges but I will post a separate question for that. Thanks!