# Failed update apt cache

**URL:** https://discourse.roots.io/t/failed-update-apt-cache/23209
**Category:** trellis
**Created:** 2022-05-23T15:00:48Z
**Posts:** 7

## Post 1 by @Tasha_Hussey — 2022-05-23T15:00:48Z

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.

---

## Post 2 by @alwaysblank — 2022-05-23T15:39:55Z

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

---

## Post 3 by @aldis — 2022-05-23T18:01:00Z

The mariadb mirror seems to be having latency issues and possibly downtime: [mirrors.gigenet.com/mariadb/repo/10.5/ubuntu](http://mirrors.gigenet.com/mariadb/repo/10.5/ubuntu)

```
$ sudo apt update
Hit:1 http://us.archive.ubuntu.com/ubuntu focal InRelease
Get:2 http://us.archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
Hit:3 http://ppa.launchpad.net/ondrej/php/ubuntu focal InRelease
Hit:4 http://nginx.org/packages/mainline/ubuntu focal InRelease
Get:5 http://us.archive.ubuntu.com/ubuntu focal-backports InRelease [108 kB]
Get:6 http://us.archive.ubuntu.com/ubuntu focal-security InRelease [114 kB]
0% [Waiting for headers]
Err:7 http://mirrors.gigenet.com/mariadb/repo/10.5/ubuntu focal InRelease
  Connection failed [IP: 69.65.16.171 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 http://mirrors.gigenet.com/mariadb/repo/10.5/ubuntu/dists/focal/InRelease Connection failed [IP: 69.65.16.171 80]
W: Some index files failed to download. They have been ignored, or old ones used instead.
```

---

## Post 4 by @aldis — 2022-05-24T20:59:50Z

Now the ouput of `sudo apt update` is:

```
$ sudo apt update
Ign:1 http://mirrors.gigenet.com/mariadb/repo/10.5/ubuntu focal InRelease
Hit:2 http://us.archive.ubuntu.com/ubuntu focal InRelease
Err:3 http://mirrors.gigenet.com/mariadb/repo/10.5/ubuntu focal Release
  404 Not Found [IP: 69.65.16.171 80]
Hit:4 http://ppa.launchpad.net/ondrej/php/ubuntu focal InRelease
Hit:5 http://us.archive.ubuntu.com/ubuntu focal-updates InRelease
Get:6 http://nginx.org/packages/mainline/ubuntu focal InRelease [3,596 B]
Hit:7 http://us.archive.ubuntu.com/ubuntu focal-backports InRelease
Hit:8 http://us.archive.ubuntu.com/ubuntu focal-security InRelease
Reading package lists... Done
E: The repository 'http://mirrors.gigenet.com/mariadb/repo/10.5/ubuntu 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/](http://mirrors.gigenet.com/mariadb/repo/10.5/ubuntu/) lists empty folders.  
Has [gigenet.com](http://gigenet.com) stopped mirroring mariadb? I’ve asked them via email now, I’ll update if I get a reply.

---

## Post 5 by @ben — 2022-05-24T21:05:57Z

See [Change MariaDB PPA link by jakobmeusburger · Pull Request #1384 · roots/trellis · GitHub](https://github.com/roots/trellis/pull/1384)

---

## Post 6 by @aldis — 2022-05-26T23:05:10Z

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

> Hello,
> 
> 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.

---

## Post 7 by @Tasha_Hussey — 2022-05-26T23:42:54Z

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