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

Posted May 17, 2019 1.9k views
DigitalOceanMonitoringUbuntu 18.04

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

W: Failed to fetch 503 Service Unavailable [IP: 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/ script manually it appears to work though it’s possible that I’m not seeing any output.

If I manually run “wget” then it works OK with a 200 response.

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

1 comment

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
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 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 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).