New Do-Agent daily cron failing to update - service unavailable

May 17, 2019 547 views
DigitalOcean Monitoring Ubuntu 18.04

Hi,
I updated my monitoring to the new agent last week.
I’m getting the following notification daily -

“/etc/cron.daily/do-agent:
W: Failed to fetch https://repos.insights.digitalocean.com/apt/do-agent/dists/main/InRelease 503 Service Unavailable [IP: 45.55.127.101 443]
W: Some index files failed to download. They have been ignored, or old ones used instead.”

If I run the /opt/digitalocean/do-agent/scripts/update.sh script manually it appears to work though it’s possible that I’m not seeing any output.

If I manually run “wget https://repos.insights.digitalocean.com/apt/do-agent/dists/main/InRelease” then it works OK with a 200 response.

Any advice on getting rid of this error would be appreciated.
Thanks

1 comment
2 Answers

The problem is that whoever is creating the RPM spec files doesn’t know what they’re doing.
The rpm spec is deleting it’s own files on upgrade. And for bonus points literally obsoleting itself, so executing a reinstall doesn’t work either.

The short term solution is, every time there’s an update, and it cripples itself, completely uninstall the rpm, then re-install.

I have the same error on Ubuntu 18.04, so it doesn’t look like something specific to RPM. Manual execution of

apt-get update -o Dir::Etc::sourcelist="sources.list.d/digitalocean-agent.list" -o Dir::Etc::sourceparts="-" -o APT::Get::List-Cleanup="1"
apt-get install --only-upgrade do-agent

(from update.sh script) works correctly.

  • I’ve finally fixed this issue by changing starting time for cron.daily in /etc/crontab file. By default it is 06:25 on all servers and it looks like repos.insights.digitalocean.com server is not able to process a bulk of simultaneous requests (most likely it is able, but response time is greater than timeout in apt-get).

Have another answer? Share your knowledge.