Failed update apt cache

I keep running into the same issue when trying to setup trellis.

Failed to update apt cache: unknown reason
fatal: [default]: FAILED! => {"changed": false}

RUNNING HANDLER [fail2ban : restart fail2ban] **********************************
changed: [default]

RUNNING HANDLER [ferm : restart ferm] ******************************************
skipping: [default]

RUNNING HANDLER [ntp : restart ntp] ********************************************
changed: [default]

RUNNING HANDLER [sshd : restart ssh] *******************************************
changed: [default]

PLAY RECAP *********************************************************************
default                    : ok=41   changed=19   unreachable=0    failed=1    skipped=14   rescued=0    ignored=0

Ansible failed to complete successfully. Any error output should be
visible above. Please fix these errors and try again.

I have read other threads and tried the suggestions for running apt-get update and vagrant destroy, but none of them work.

Do you get any useful debugging info if you run ansible w/ verbose output? i.e. -vvv (I think is the argument)

The mariadb mirror seems to be having latency issues and possibly downtime:

$ sudo apt update
Hit:1 focal InRelease
Get:2 focal-updates InRelease [114 kB]
Hit:3 focal InRelease
Hit:4 focal InRelease
Get:5 focal-backports InRelease [108 kB]
Get:6 focal-security InRelease [114 kB]
0% [Waiting for headers]
Err:7 focal InRelease
  Connection failed [IP: 80]
Fetched 336 kB in 1min 17s (4,381 B/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
141 packages can be upgraded. Run 'apt list --upgradable' to see them.
W: Failed to fetch  Connection failed [IP: 80]
W: Some index files failed to download. They have been ignored, or old ones used instead.

Now the ouput of sudo apt update is:

$ sudo apt update
Ign:1 focal InRelease
Hit:2 focal InRelease
Err:3 focal Release
  404  Not Found [IP: 80]
Hit:4 focal InRelease
Hit:5 focal-updates InRelease
Get:6 focal InRelease [3,596 B]
Hit:7 focal-backports InRelease
Hit:8 focal-security InRelease
Reading package lists... Done
E: The repository ' focal Release' no longer has a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

Going manually to Index of /mariadb/repo/10.5/ubuntu/ lists empty folders.
Has stopped mirroring mariadb? I’ve asked them via email now, I’ll update if I get a reply.

See Change MariaDB PPA link by jakobmeusburger · Pull Request #1384 · roots/trellis · GitHub

The repo is back online, here’s an email reply I received:


My apologies, at the time our mirrors server was undergoing maintenance, and MariaDB automatically disables mirror sites undergoing maintenance. The repo is back online now.

Okay, I will try again and provide more debugging info.