Ubuntu keyserver (?) is still failing builds

I raised this first on the issue tracker, but some bot shut me down and pointed me here.
So here we go.

For the past couple of days, about ~20% of my builds have again failed with:

The command "sudo apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9" failed and exited with 2 during . 

Rerunning usually fixes that.

travis ci status reports now service disruptions for the time period in question.

I understand that this problem is not on Travis’ end, but something about an ubuntu keyserver, but it’s really deteriorating the travis experience: kinda sucks when I regularly don’t know whether a build as really failed, or just fake failed.

This issue seems to be a bit of a Whac-a-mole, with the same problem reported (and staled/closed) several times (at least):

Do you have a recent build log url?

uh sure; just restarted this build here and it promptly failed: https://travis-ci.com/soztag/crowd/jobs/156196375

Sorry should’ve added that right away.

1 Like

You might just try multiple keyservers, network connections will always carry some degree of unreliability. We’re using:
apt-key adv --keyserver hkp://keys.gnupg.net --recv-keys KEYID || apt-key adv --keyserver keyserver.ubuntu.com --recv-keys KEYID

One difficulty we are having with this issue is that the it appears quite sporadic. @maxheld83 estimated “20%”, but my experience has been far less. https://travis-ci.org/BanzaiMan/travis_production_test/builds/450979684 shows repeated tests within a job, having no problem. https://travis-ci.org/BanzaiMan/travis_production_test/builds/450982773 shows spinning up 10 jobs, retrieving the key exactly once, none of them failing.

Incidentally, some languages (R, for example) invokes the command implicitly, so retries are not always practical.

thanks for looking into this again @BanzaiMan. Great support.

Seems like a thorny issue to reproduce. It’s my impression that this happens more when I’m being quite active. Though it could also be a perception issue, I do not have precise records.

Could this have something to do with R then, or the R travis img?

I only use R, so I wouldn’t know.

would this also work for an R project?
And if this helps, wouldn’t it be great if travis did this by default for all projects?

That will require change in R build script.

@BanzaiMan any chance you might reopen the above original issue, so I can page jeroen and @jimhester (they’re maintaining the R build script) to take a look at this?

Not sure they want to track this in here, since it is an issue.

Incidentally, I do understand the logic for using a community for troubleshooting, but force-migrating this (actual) issue off of gh issues just seems to lead to duplicate effort and confusion in this case.

Is this considered fixed? Still happens to me once a week or so.