Server provisioning error: keyserver time out

When I run:
ansible-playbook server.yml -e env=production --ask-become-pass -vvvv

I get an error in the step Add MariaDB MySQL apt-key:

System info:
  Ansible; Darwin
  Trellis 0.9.7: April 10th, 2016

Failed to download key at
rprint=on&search=0xcbcb082a1bb943db: Request failed: <urlopen error timed
fatal: []: FAILED! => {"changed": false, "failed": true, "invocation": {"module_args": {"data": null, "file": null, "id": null, "key": null, "keyring": null, "keyserver": null, "state": "present", "url": "", "validate_certs": true}, "module_name": "apt_key"}}

In an earlier attempt to provision the server I’ve also had similar key server timeout errors during other parts of the provisioning process (like PHP7 setup)

I’ve run the URL rprint=on&search=0xcbcb082a1bb943db on my local machine, but have no timeout errors.

Any ideas how to fix this?

I have occasionally gotten those time out as wells. I just re-run the provision and it’s usually fine the next time. There’s nothing Trellis can really do about this as it’s an external service.

1 Like

Thanks for your reply. I had tried it about 4 times. Then waited for an hour, and tried again after your reply. This time i did get past the MariaDB time out. Great!

However I get another error related to a timeout during Install PHP 7.0:

TASK [php : Install PHP 7.0] ***************************************************
System info:
  Ansible; Darwin
  Trellis 0.9.7: April 10th, 2016
'/usr/bin/apt-get -y -o "Dpkg::Options::=--force-confdef" -o "Dpkg::Options
::=--force-confold" --force-yes  install 'php7.0-cli' 'php7.0-common'
'php7.0-curl' 'php7.0-dev' 'php7.0-fpm' 'php7.0-gd' 'php7.0-mbstring'
'php7.0-mcrypt' 'php7.0-mysql' 'php7.0-opcache' 'php7.0-xml' 'php7.0-xmlrpc'
'php7.0-zip'' failed: E: Failed to fetch  Could not connect to (, connection timed out

I looked around on Discourse and found this similar problem