Roots Discourse

Error on server provision - Update Composer to latest version (if configured). - non-zero return code

I am trying to provision a brand new droplet on digital ocean, but I have this error:

TASK [composer : Update Composer to latest version (if configured).] ****************************************************************************************************************************************************
System info:
  Ansible 2.8.4; Darwin
  Trellis version (per changelog): "Support Ansible 2.9"
---------------------------------------------------
non-zero return code


  [Composer\Downloader\TransportException]
  The "https://getcomposer.org/versions" file could not be downloaded: failed
to open stream: Connection timed out


self-update [-r|--rollback] [--clean-backups] [--no-progress] [--update-keys]
[--stable] [--preview] [--snapshot] [--1] [--2] [--set-channel-only] [--]
[<version>]
fatal: [104.248.160.170]: FAILED! => {"changed": false, "cmd": ["php", "/usr/local/bin/composer", "self-update"], "delta": "0:01:00.134243", "end": "2020-05-07 10:15:36.349539", "rc": 1, "start": "2020-05-07 10:14:36.215296", "stderr_lines": ["", "                                                                                                                    ", "  [Composer\\Downloader\\TransportException]                                                                          ", "  The \"https://getcomposer.org/versions\" file could not be downloaded: failed to open stream: Connection timed out  ", "                                                                                                                    ", "", "self-update [-r|--rollback] [--clean-backups] [--no-progress] [--update-keys] [--stable] [--preview] [--snapshot] [--1] [--2] [--set-channel-only] [--] [<version>]"], "stdout": "", "stdout_lines": []}

I tried to re-provision multiples time, but it failed.

Am I doing something wrong?

this is my fifth websites with Trellis/Bedrock/Sage, I am pretty sure that I followed the same steps, but it is the first time that the provision is not going well.

any help is appreciated.
thanks

i destroyed that droplet and I created a new one, first provision same error, I re-provision a couple of times and finally i was able to provision the new droplet.

FYI i tried also to update Ansible to the latest version, I am not sure if this fixed the problem. (my previous Ansible version was 2.8.8.)

1 Like

It was likely some temporary connection issue between DO and the Composer website unfortunately.