Certbot broken again

$ certbot
cannot snap-exec: cannot exec "/snap/certbot/3462/bin/python3": no such file or 
$
 $ /snap/certbot/3462/bin/python3
bash: /snap/certbot/3462/bin/python3: No such file or directory
 $
$ file /snap/certbot/3462/bin/python3
/snap/certbot/3462/bin/python3: symbolic link to `../usr/bin/python3.8'
$
$ file /snap/certbot/3462/bin/../usr/bin/python3.8
/snap/certbot/3462/bin/../usr/bin/python3.8: ELF 64-bit LSB  executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 3.2.0, BuildID[sha1]=6e0f85c38b0dfef9bb6b6ee67f8f7dda5159feb8, stripped
$
$ /snap/certbot/3462/bin/../usr/bin/python3.8
bash: /snap/certbot/3462/bin/../usr/bin/python3.8: No such file or directory
$

Could it be a problem with apparmor?

Everytime I’ve seen something like this it was either because of a hw architecture mismatch or a ld/loader issue.

What does the output of ldd /snap/certbot/3462/bin/python3 give?

For what it’s worth, I was not able to reproduce the error on a clean x86_64 VM using that same revision (3462)

$ ldd /snap/certbot/3462/bin/python3
        linux-vdso.so.1 =>  (0x00007ffe7937f000)
        libc.so.6 => /snap/core20/current/lib/x86_64-linux-gnu/libc.so.6 (0x00007f2d8ad47000)
        libpthread.so.0 => /snap/core20/current/lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f2d8acf5000)
        libdl.so.2 => /snap/core20/current/lib/x86_64-linux-gnu/libdl.so.2 (0x00007f2d8ad41000)
        libutil.so.1 => /snap/core20/current/lib/x86_64-linux-gnu/libutil.so.1 (0x00007f2d8ad3b000)
        libm.so.6 => /snap/core20/current/lib/x86_64-linux-gnu/libm.so.6 (0x00007f2d8aba6000)
        libexpat.so.1 => /snap/core20/current/lib/x86_64-linux-gnu/libexpat.so.1 (0x00007f2d8ab78000)
        libz.so.1 => /snap/core20/current/lib/x86_64-linux-gnu/libz.so.1 (0x00007f2d8ab5b000)
        /snap/core20/current/lib64/ld-linux-x86-64.so.2 => /lib64/ld-linux-x86-64.so.2 (0x00007f2d8ad18000)
$

Nothing is missing AFAICT. Oh. It seems to work again!

$ certbot 
The following error was encountered:
[Errno 13] Permission denied: '/var/log/letsencrypt/.certbot.lock'
Either run as root, or set --config-dir, --work-dir, and --logs-dir to writeable paths.
Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /tmp/certbot-log-8b_gvyis/log or re-run Certbot with -v for more details.
$ sudo certbot 
[sudo] password for ychaouche: 
Saving debug log to /var/log/letsencrypt/letsencrypt.log
                                                                                
Which names would you like to activate HTTPS for?                               
We recommend selecting either all domains, or all domains in a VirtualHost/server block.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
1: owncloud.lan                                                                 
2: owncloud.local                                                               
3: pydio.local                                                                  
4: mantis.radioalgerie.dz                                                       
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
Select the appropriate numbers separated by commas and/or spaces, or leave input
blank to select all options shown (Enter 'c' to cancel): c                      
Please specify --domains, or --installer that will help in domain names autodiscovery, or --cert-name for an existing certificate name.
Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /var/log/letsencrypt/letsencrypt.log or re-run Certbot with -v for more details.
$

Are any changes in snaps, snapd or any part of it tracked anywhere?

Yes, changes of the recent days are logged on your machine and you can see them using the snap changes command … for details of a specific change you can then use snap change <ID>

1 Like

Thanks @ogra. Does it track only user changes? it seems it doesn’t track changes made by itself. Its help says that by default it searches up to 60 days prior.

10:39:52 ~ -1- $ snap changes
no changes found
10:39:56 ~ -1- $ sudo snap changes
[sudo] password for ychaouche:
no changes found
10:40:00 ~ -1- $ snap help changes
Usage:
  snap changes [changes-OPTIONS] [<snap>]

The changes command displays a summary of system changes performed recently.

[changes command options]
      --abs-time    Display absolute times (in RFC 3339 format). Otherwise, display relative times up to 60 days, then YYYY-MM-DD.
10:44:07 ~ -1- $

aaaaaaand it borked again t

$ sudo certbot
[sudo] password for ychaouche:
internal error, please report: running "certbot" failed: cannot find installed snap "certbot" at revision 3462: missing file /snap/certbot/3462/meta/snap.yaml
$