Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTTP Request Failure: http://getcomposer.org/composer.phar "Fail to Open Stream" #6515

Closed
KidA78 opened this Issue Jun 30, 2017 · 10 comments

Comments

Projects
None yet
4 participants
@KidA78
Copy link

KidA78 commented Jun 30, 2017

We've been seeing Composer stream errors happen around the same time every day. Around 5pm PST, we get the following errors below. Is there something that is happening during this time that causes the stream to fail?

Console/cake composer.c self-update;

I get the following output:

00:13:56 Warning Error: file_get_contents(http://getcomposer.org/composer.phar): failed to open stream: HTTP request failed!  in [/path/to/ComposerShell.php, line 82]
00:13:56 
@alcohol

This comment has been minimized.

Copy link
Member

alcohol commented Jun 30, 2017

@Seldaek anything in the error logs on the host of getcomposer.org ?

But on a side note, the scripts you are running don't seem to be provided/supported by us. So if you want to do more debugging on your end, we really cannot help you as we have no idea what you're doing.

@alcohol alcohol added the Support label Jun 30, 2017

@KidA78

This comment has been minimized.

Copy link
Author

KidA78 commented Jun 30, 2017

@alcohol thanks. What the script is doing, is just a wrapper around

php composer.phar self-update

But the latest composer.phar fails to download. And the last few failures we've had all happen around the same time on those different days. A retry a few hours later, and the phar file downloads without issue. Let's see if @Seldaek has noticed any issues in the logs?

@Seldaek

This comment has been minimized.

Copy link
Member

Seldaek commented Jul 5, 2017

If self-update is working fine for everyone else, I'd guess your script is doing something funky or the environment/network has issues. Check if composer self-update or composer diagnose report anything funky, if not then I'd guess it's in your script. I don't see anything in logs but without an exact UTC time to look for it's kinda hard anyway as we have lots of traffic and logs are pretty noisy.

@KidA78

This comment has been minimized.

Copy link
Author

KidA78 commented Jul 5, 2017

Thanks @Seldaek, if it happens again I'll provide a timestamp, and I'll run diagnose to see if composer reports anything.

@KidA78

This comment has been minimized.

Copy link
Author

KidA78 commented Jul 22, 2017

@Seldaek @alcohol the issue has happened again. I have a timestamp for you:

At Sat July 22, 2017 00:05:46 UTC, when downloading http://getcomposer.org/composer.phar
This error happens around this exact same time. Is this server restarting, or is some process happening on this box around this time?

@Seldaek

This comment has been minimized.

Copy link
Member

Seldaek commented Jul 23, 2017

Sorry but I don't see anything special in logs at that time there is nothing at all in the nginx error log and nothing odd in access log either.

@KidA78

This comment has been minimized.

Copy link
Author

KidA78 commented Jan 5, 2018

@Seldaek @alcohol
Just getting back to this. As we speak, the issue is still happening. Starting at 0:00:00 UTC and continuing for about 30 minutes, random HTTP failures when downloading the composer.phar file:

@local:/path/to/my/app $ composer self-update

                                                                                                
  [Composer\Downloader\TransportException]                                                      
  The "https://getcomposer.org/versions" file could not be downloaded: Failed to enable crypto  
  failed to open stream: operation failed                                                       
                                                                                                

self-update [-r|--rollback] [--clean-backups] [--no-progress] [--update-keys] [--stable] [--preview] [--snapshot] [--set-channel-only] [--] [<version>]

It's too much of a coincidence. Any time I run composer self-update at this time on various days, on various machines, the same outcome. And the only common thread is the time period between 0:00:00 UTC and around 00:30:00 UTC

@Seldaek

This comment has been minimized.

Copy link
Member

Seldaek commented Jan 8, 2018

I just deployed some changes to our infrastructure which should help with this. Let me know if that is not the case.

@Seldaek Seldaek closed this Jan 8, 2018

@KidA78

This comment has been minimized.

Copy link
Author

KidA78 commented Jan 8, 2018

@Seldaek thanks for following up. Will let you know if the issue persists.

@go2amp

This comment has been minimized.

Copy link

go2amp commented Mar 13, 2019

Having same issue. Haven't had any problems on other dev machines during the 8-5pm EST working hours, but tonight at 7:17PM EST, getting this error. Not getting a page when simply browsing to https://getcomposer.org either.

*Update - Figured out the issue. Apparently, our firewall was blocking traffic to/from the getcomposer.org domain because their host (OVH) failed the 'reputation' check. Once we whitelisted them, everything resumed as normal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.