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

WinHttpSendRequest() failed: 12007 #23512

Closed
ashari4 opened this issue Mar 11, 2022 · 8 comments
Closed

WinHttpSendRequest() failed: 12007 #23512

ashari4 opened this issue Mar 11, 2022 · 8 comments
Assignees
Labels
category:question This issue is a question

Comments

@ashari4
Copy link

ashari4 commented Mar 11, 2022

I see intermittent problems downloading 7zip.

PS E:\Code\vcpkg> .\vcpkg.exe install --recurse cppzmq
....
 A suitable version of 7zip was not found (required v19.0.0).  Downloading
  portable 7zip v19.0.0...

  Downloading 7zip...

    https://www.7-zip.org/a/7z1900-x64.msi -> C:\__w\_temp\vcpkg-src\downloads\7z1900-x64.msi

  Error: Failed to download from mirror set:

  https://www.7-zip.org/a/7z1900-x64.msi: WinHttpSendRequest() failed: 12007

  https://www.7-zip.org/a/7z1900-x64.msi: WinHttpSendRequest() failed: 12007

  https://www.7-zip.org/a/7z1900-x64.msi: WinHttpSendRequest() failed: 12007

  https://www.7-zip.org/a/7z1900-x64.msi: WinHttpSendRequest() failed: 12007

Perhaps, some improvement can be made to the download logic similar to this PR: microsoft/vcpkg-tool#116.

12007 corresponds to ERROR_WINHTTP_NAME_NOT_RESOLVED: https://docs.microsoft.com/en-us/windows/win32/winhttp/error-messages

@Cheney-W Cheney-W added the category:question This issue is a question label Mar 14, 2022
@Cheney-W
Copy link
Contributor

What's the version of your vcpkg? Could you please clone the latest vcpkg and reinstall the port? Thank you!

@ashari4
Copy link
Author

ashari4 commented Mar 14, 2022

Thanks, we are using b25cb779e5783531cc66562e224079b376055939 (Jan 7, 2022). We can update the version, but the question is around intermittent errors. Our CI pipelines use VCPKG to install zmq and occasionally hit the above 12007 error. Can the retry loop used by VCPKG be improved? I see that the VCPKG tool tries to download from https://www.7-zip.org/a/7z1900-x64.msi 4 times; perhaps, the VCPKG tool can try to download from different mirrors?

@Cheney-W
Copy link
Contributor

This issue is more of a 7zip site issue, a random network issue.

@ashari4
Copy link
Author

ashari4 commented Mar 15, 2022

Thanks. Feel free to close if you don't think the download logic can be improved. Some possible improvements

  1. use a different set of mirrors
  2. wait before each retry attempt instead of immediately retrying.

@Cheney-W
Copy link
Contributor

@BillyONeal What do you think about the two suggestions above?

@BillyONeal
Copy link
Member

Thanks. Feel free to close if you don't think the download logic can be improved. Some possible improvements

  1. use a different set of mirrors

If you have better ideas :)

  1. wait before each retry attempt instead of immediately retrying.

We do do this: https://github.com/microsoft/vcpkg-tool/blob/91494e3e24f53270ba38749a325c36c6373699ed/src/vcpkg/base/downloads.cpp#L318

@Louis-Simon22
Copy link

For those like me who keep running into this problem:

You can download the file manually using another reliable method (browser, curl, etc.) then put it under vcpkg/downloads/7z1900-x64.msi yourself.

@Cheney-W
Copy link
Contributor

Cheney-W commented Apr 2, 2022

We hope your question was answered to your satisfaction; if it wasn't, you can reopen with more info.

@Cheney-W Cheney-W closed this as completed Apr 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:question This issue is a question
Projects
None yet
Development

No branches or pull requests

4 participants