Certbot installation errors using snap on fedora26

My domain is: Multiple ones

I ran this command: sudo snap install --classic certbot

It produced this output:
"
error: cannot perform the following tasks:

  • Start snap "certbot" (1343) services ([start snap.certbot.renew.service] failed with exit status 1: Job for snap.certbot.renew.service failed because the control process exited with error code.
    See "systemctl status snap.certbot.renew.service" and "journalctl -xe" for details.
    )
    "

My web server is (include version): Apache

The operating system my web server runs on is (include version): Fedora26

I can login to a root shell on my machine (yes or no, or I don't know): Yes

I'm using a control panel to manage my site (no, or provide the name and version of the control panel): I can do that, but I mainly use terminal

The version of my client is (e.g. output of certbot --version or certbot-auto --version if you're using Certbot): Can't get Certbot to install using snap.

So I looked at the "systemctl status snap.certbot.renew.service" message and got the following:
â—Ź snap.certbot.renew.service
Loaded: not-found (Reason: No such file or directory)
Active: failed (Result: exit-code) since Fri 2021-08-13 11:24:07 GMT; 1min 44s ago
Main PID: 5512 (code=exited, status=1/FAILURE)

Aug 13 11:24:05 - systemd[1]: Starting Service for snap application certbot.renew...
Aug 13 11:24:07 - certbot.renew[5512]: An error occurred while fetching Certbot snap plugins: your version of snapd is outdated.
Aug 13 11:24:07 - certbot.renew[5512]: Please run "sudo snap install core; sudo snap refresh core" in your terminal and try again.
Aug 13 11:24:07 - certbot.renew[5512]: An unexpected error occurred:
Aug 13 11:24:07 - certbot.renew[5512]: requests.exceptions.HTTPError: 404 Client Error: Not Found for url: http://snapd/v2/connections?snap=certbot&interface=content
Aug 13 11:24:07 - systemd[1]: snap.certbot.renew.service: Main process exited, code=exited, status=1/FAILURE
Aug 13 11:24:07 - systemd[1]: Failed to start Service for snap application certbot.renew.
Aug 13 11:24:07 - systemd[1]: snap.certbot.renew.service: Unit entered failed state.
Aug 13 11:24:07 - systemd[1]: snap.certbot.renew.service: Failed with result 'exit-code'.

I also ran "journalctl -u snapd " and saw the following lines pop up:
Aug 06 12:58:47 - snapd[1519]: 2021/08/06 12:58:47.619673 api.go:1004: Installing snap "certbot" revision unset
Aug 06 12:58:58 - snapd[1519]: 2021/08/06 12:58:58.342093 handlers.go:372: Reported install problem for "certbot" as 0f2c5728-f6b6-11eb-a209-fa163ee63de6 OOPSID

Running "snap --version" gives:
snap 2.32.4-1.fc26
snapd 2.32.4-1.fc26
series 16
fedora 26
kernel 4.16.11-100.fc26.x86_64

Does anyone have any idea what's going on here, I can't seem to find out what's wrong.

1 Like

I am a novice here too but did you try updating your snap install as suggested in this error message? The current snapd version is something like 2.51.4.

I am not well-versed in snap so I cannot be any more help than this.

3 Likes

Hi Mike,

Yes I ran those commands and got a reply that:
"snap "core" is already installed, see "snap refresh --help"
snap "core" has no updates available"

1 Like

I agree with @MikeMcQ that step #1 should be:

Then, if the problem persists, please show the output of:
systemctl list-timers | grep certbot

2 Likes

That gives no output

1 Like

Are there any timers?
systemctl list-timers

2 Likes

Yes here is that output:
NEXT LEFT LAST PASSED UNIT ACTIVATES
Fri 2021-08-13 15:53:09 GMT 8min left Fri 2021-08-13 14:53:08 GMT 51min ago dnf-makecache.timer dnf-makecache.service
Sat 2021-08-14 00:00:00 GMT 8h left Fri 2021-08-13 00:00:05 GMT 15h ago mlocate-updatedb.timer mlocate-updatedb.service
Sat 2021-08-14 10:57:47 GMT 19h left Fri 2021-08-13 10:57:47 GMT 4h 46min ago systemd-tmpfiles-clean.timer systemd-tmpfiles-clean.service

3 timers listed.

2 Likes

hmm...
So the problem revolves around certbot only...

Try removing certbot and then installing it again.

2 Likes

What a weird error.. Could this perhaps be due to a recent commit which has modified some snapcraft stuff? Improve snapcraft remote build (#8985) · certbot/certbot@b4c49cf · GitHub

@bmw Any thoughts about this?

2 Likes

If you're running Fedora 26, I'd strongly recommend you upgrade your OS. It looks like Fedora 26 reached it's end-of-life in 2018 according to End of life - Fedora Project Wiki. This means its packages are no longer receiving things like security updates.

Upgrading your OS and reinstalling snap/snapd and Certbot may solve your problems, but if not or you choose to continue running Fedora 26, I think some things to try are:

  1. sudo snap remove core; sudo snap install core
  2. sudo snap install snapd (and then maybe try option (1) again)
  3. If things still aren't working, maybe provide the output of snap list in a post here so we can see what snaps you're working with. For what it's worth, the relevant output on one of my servers is:
$ snap list
Name          Version    Rev    Tracking         Publisher     Notes
certbot       1.18.0     1343   latest/stable    certbot-effâś“  classic
core          16-2.51.3  11420  latest/stable    canonicalâś“    core
snapd         2.51.3     12704  latest/stable    canonicalâś“    snapd
3 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.