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

Failed to connect to data.iana.org port 443: Timed out #257

Closed
jaakkor2 opened this issue Apr 23, 2020 · 12 comments
Closed

Failed to connect to data.iana.org port 443: Timed out #257

jaakkor2 opened this issue Apr 23, 2020 · 12 comments

Comments

@jaakkor2
Copy link

I am on Windows 10 and Julia v1.4.1.

During updating I saw this (and I think I have seen it before)

  [f269a46b] ↑ TimeZones v1.1.0 ⇒ v1.1.1
   Building TimeZones → `C:\Users\jr\.julia\packages\TimeZones\X323b\deps\build.log`
┌ Error: Error building `TimeZones`:
│ [ Info: Downloading 2019c tzdata
│ ┌ Error: Download failed: curl: (7) Failed to connect to data.iana.org port 443: Timed out
│ └ @ Base download.jl:43
│ ERROR: LoadError: failed process: Process(`'C:\WINDOWS\System32\curl.exe' -s -S -g -L -f -o 'C:\Users\jr\.julia\packages\TimeZones\X323b\deps\tzarchive\tzdata2019c.tar.gz' https://data.iana.org/time-zones/
releases/tzdata2019c.tar.gz`, ProcessExited(7)) [7]
│
│ Stacktrace:
│  [1] pipeline_error at .\process.jl:525 [inlined]
│  [2] download_curl(::String, ::String, ::String) at .\download.jl:44
│  [3] download at .\download.jl:62 [inlined]
│  [4] tzdata_download(::String, ::String) at C:\Users\jr\.julia\packages\TimeZones\X323b\src\tzdata\download.jl:89
│  [5] build(::String, ::Array{String,1}, ::String, ::String, ::String; verbose::Bool) at C:\Users\jr\.julia\packages\TimeZones\X323b\src\tzdata\build.jl:46
│  [6] build(::String) at C:\Users\jr\.julia\packages\TimeZones\X323b\src\tzdata\build.jl:82
│  [7] build(::String; force::Bool) at C:\Users\jr\.julia\packages\TimeZones\X323b\src\build.jl:11
│  [8] build at C:\Users\jr\.julia\packages\TimeZones\X323b\src\build.jl:11 [inlined] (repeats 2 times)
│  [9] top-level scope at C:\Users\jr\.julia\packages\TimeZones\X323b\deps\build.jl:3
│  [10] include(::String) at .\client.jl:439
│  [11] top-level scope at none:5
│ in expression starting at C:\Users\jr\.julia\packages\TimeZones\X323b\deps\build.jl:3
└ @ Pkg.Operations D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.4\Pkg\src\Operations.jl:892

Then trying again after awhile

@v1.4) pkg> build TimeZones
   Building TimeZones → `C:\Users\jruohio\.julia\packages\TimeZones\X323b\deps\build.log`

it succeeds.

Maybe the curl timeout could be a bit longer. Some discussion here https://unix.stackexchange.com/questions/94604/does-curl-have-a-timeout/94612. To be checked what is the default timeout now.

@omus
Copy link
Member

omus commented Apr 24, 2020

Thanks for the issue. TimeZones uses Julia's Base.download which uses the default timeout for curl and provides no way of modifying it. How quickly does the download fail for you?

Something interesting I noticed in your output is that you upgraded from TimeZones 1.1.0 to 1.1.1 where no tzdata change took place. Usually when that is the case TimeZones avoids downloading the tzdata archive again.

@jaakkor2
Copy link
Author

I tried again with tzdata2019c.tar.gz, first trial failed, five next succeeded.

Timeout in about 20 s. Trying with another dataset looks like this.
Not clear to me is the problem at ISP or at iana.org. Maybe TimeZones.jl could try two or three times before failing?

julia> using Dates; println(Dates.now()); @time try download("https://data.iana.org/time-zones/releases/tzdata2017a.tar.gz") catch end ; println(Dates.now())
2020-04-25T08:20:21.412
┌ Error: Download failed: curl: (7) Failed to connect to data.iana.org port 443: Timed out
└ @ Base download.jl:43
 21.407156 seconds (333 allocations: 17.438 KiB)
2020-04-25T08:20:42.83

julia> using Dates; println(Dates.now()); @time try download("https://data.iana.org/time-zones/releases/tzdata2017a.tar.gz") catch end ; println(Dates.now())
2020-04-25T08:20:44.118
  1.036516 seconds (177 allocations: 9.859 KiB)
2020-04-25T08:20:45.167

julia> using Dates; println(Dates.now()); @time try download("https://data.iana.org/time-zones/releases/tzdata2017a.tar.gz") catch end ; println(Dates.now())
2020-04-25T08:20:45.992
  0.905090 seconds (177 allocations: 9.859 KiB)
2020-04-25T08:20:46.894

julia> using Dates; println(Dates.now()); @time try download("https://data.iana.org/time-zones/releases/tzdata2017a.tar.gz") catch end ; println(Dates.now())
2020-04-25T08:20:47.395
┌ Error: Download failed: curl: (7) Failed to connect to data.iana.org port 443: Timed out
└ @ Base download.jl:43
 21.336440 seconds (346 allocations: 17.797 KiB)
2020-04-25T08:21:08.75

julia> using Dates; println(Dates.now()); @time try download("https://data.iana.org/time-zones/releases/tzdata2017a.tar.gz") catch end ; println(Dates.now())
2020-04-25T08:21:09.374
  0.936509 seconds (177 allocations: 9.859 KiB)
2020-04-25T08:21:10.323

julia> using Dates; println(Dates.now()); @time try download("https://data.iana.org/time-zones/releases/tzdata2017a.tar.gz") catch end ; println(Dates.now())
2020-04-25T08:21:11.093
  0.965863 seconds (177 allocations: 9.859 KiB)
2020-04-25T08:21:12.08

julia> using Dates; println(Dates.now()); @time try download("https://data.iana.org/time-zones/releases/tzdata2017a.tar.gz") catch end ; println(Dates.now())
2020-04-25T08:21:12.544
┌ Error: Download failed: curl: (7) Failed to connect to data.iana.org port 443: Timed out
└ @ Base download.jl:43
 21.359077 seconds (341 allocations: 17.297 KiB)
2020-04-25T08:21:33.921

julia> using Dates; println(Dates.now()); @time try download("https://data.iana.org/time-zones/releases/tzdata2017a.tar.gz") catch end ; println(Dates.now())
2020-04-25T08:21:35.106
  0.949866 seconds (177 allocations: 9.859 KiB)
2020-04-25T08:21:36.077

julia> using Dates; println(Dates.now()); @time try download("https://data.iana.org/time-zones/releases/tzdata2017a.tar.gz") catch end ; println(Dates.now())
2020-04-25T08:21:37.011
┌ Error: Download failed: curl: (7) Failed to connect to data.iana.org port 443: Timed out
└ @ Base download.jl:43
 21.425966 seconds (325 allocations: 16.938 KiB)
2020-04-25T08:21:58.45

julia> using Dates; println(Dates.now()); @time try download("https://data.iana.org/time-zones/releases/tzdata2017a.tar.gz") catch end ; println(Dates.now())
2020-04-25T08:22:01.033
  1.070232 seconds (177 allocations: 9.859 KiB)
2020-04-25T08:22:02.121

@omus
Copy link
Member

omus commented Apr 28, 2020

I can introduce a retry for download failures

@omus
Copy link
Member

omus commented Apr 28, 2020

If you want to try out the retry feature you can do so with:

using Pkg
Pkg.add(PackageSpec(name="TimeZones", rev="cv/download-retry"))

@jaakkor2
Copy link
Author

I tried to add the download-retry branch on an empty depot path. It went smooth.

I cleaned everything, and tried again, and this was the result. It timed out three times, and ultimately failed.

   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.4.1 (2020-04-14)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

julia> using Pkg

julia> Pkg.add(PackageSpec(name="TimeZones", rev="cv/download-retry"))
    Cloning git-repo `https://github.com/JuliaTime/TimeZones.jl.git`
   Updating git-repo `https://github.com/JuliaTime/TimeZones.jl.git`
   Updating registry at `C:\temp\jldepot\registries\General`
   Updating git-repo `https://github.com/JuliaRegistries/General.git`
  Resolving package versions...
  Installed Mocking ────── v0.7.1
  Installed XML2_jll ───── v2.9.9+4
  Installed Zlib_jll ───── v1.2.11+9
  Installed Libiconv_jll ─ v1.16.0+2
  Installed ExprTools ──── v0.1.1
  Installed EzXML ──────── v1.1.0
  Installed RecipesBase ── v1.0.1
   Updating `C:\TEMP\jldepot\environments\v1.4\Project.toml`
  [f269a46b] + TimeZones v1.1.1 #cv/download-retry (https://github.com/JuliaTime/TimeZones.jl.git)
   Updating `C:\TEMP\jldepot\environments\v1.4\Manifest.toml`
  [e2ba6199] + ExprTools v0.1.1
  [8f5d6c58] + EzXML v1.1.0
  [94ce4f54] + Libiconv_jll v1.16.0+2
  [78c3b35d] + Mocking v0.7.1
  [3cdcf5f2] + RecipesBase v1.0.1
  [f269a46b] + TimeZones v1.1.1 #cv/download-retry (https://github.com/JuliaTime/TimeZones.jl.git)
  [02c8fc9c] + XML2_jll v2.9.9+4
  [83775a58] + Zlib_jll v1.2.11+9
  [2a0f44e3] + Base64
  [ade2ca70] + Dates
  [b77e0a4c] + InteractiveUtils
  [76f85450] + LibGit2
  [8f399da3] + Libdl
  [56ddb016] + Logging
  [d6f4376e] + Markdown
  [44cfe95a] + Pkg
  [de0858da] + Printf
  [3fa0cd96] + REPL
  [9a3f8284] + Random
  [ea8e919c] + SHA
  [9e88b42a] + Serialization
  [6462fe0b] + Sockets
  [cf7118a7] + UUIDs
  [4ec0a83e] + Unicode
   Building TimeZones → `C:\temp\jldepot\packages\TimeZones\uDrlc\deps\build.log`
┌ Error: Error building `TimeZones`:
│ [ Info: Downloading 2019c tzdata
│ ┌ Error: Download failed: curl: (7) Failed to connect to data.iana.org port 443: Timed out
│ └ @ Base download.jl:43
│ ┌ Error: Download failed: curl: (7) Failed to connect to data.iana.org port 443: Timed out
│ └ @ Base download.jl:43
│ ┌ Error: Download failed: curl: (7) Failed to connect to data.iana.org port 443: Timed out
│ └ @ Base download.jl:43
│ ERROR: LoadError: failed process: Process(`'C:\WINDOWS\System32\curl.exe' -s -S -g -L -f -o 'C:\temp\jldepot\packages\TimeZones\uDrlc\deps\tzarchive\tzdata2019c.tar.gz' https://data.iana.org/time-zones/releases/tzdata2019c.tar.gz`, ProcessExited(7)) [7]
│
│ Stacktrace:
│  [1] pipeline_error at .\process.jl:525 [inlined]
│  [2] download_curl(::String, ::String, ::String) at .\download.jl:44
│  [3] download at .\download.jl:62 [inlined]
│  [4] (::TimeZones.TZData.var"#14#15"{String,String})() at C:\temp\jldepot\packages\TimeZones\uDrlc\src\tzdata\download.jl:93
│  [5] (::Base.var"#58#60"{Base.var"#58#59#61"{ExponentialBackOff,Nothing,TimeZones.TZData.var"#14#15"{String,String}}})(; kwargs::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at .\error.jl:301
│  [6] #58 at .\error.jl:284 [inlined]
│  [7] tzdata_download(::String, ::String) at C:\temp\jldepot\packages\TimeZones\uDrlc\src\tzdata\download.jl:95
│  [8] build(::String, ::Array{String,1}, ::String, ::String, ::String; verbose::Bool) at C:\temp\jldepot\packages\TimeZones\uDrlc\src\tzdata\build.jl:46
│  [9] build(::String) at C:\temp\jldepot\packages\TimeZones\uDrlc\src\tzdata\build.jl:82
│  [10] build(::String; force::Bool) at C:\temp\jldepot\packages\TimeZones\uDrlc\src\build.jl:11
│  [11] build at C:\temp\jldepot\packages\TimeZones\uDrlc\src\build.jl:11 [inlined] (repeats 2 times)
│  [12] top-level scope at C:\temp\jldepot\packages\TimeZones\uDrlc\deps\build.jl:3
│  [13] include(::String) at .\client.jl:439
│  [14] top-level scope at none:5
│ in expression starting at C:\temp\jldepot\packages\TimeZones\uDrlc\deps\build.jl:3
└ @ Pkg.Operations D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.4\Pkg\src\Operations.jl:892



@omus
Copy link
Member

omus commented Apr 29, 2020

Very strange. Do you have issues connecting to https://data.iana.org/time-zones/releases/ in a browser? I've found the IANA server to be very reliable.

What IP address do you get for the IANA server?

julia> using Sockets

julia> getaddrinfo("data.iana.org")
ip"72.21.81.189"

@jaakkor2
Copy link
Author

The IP address is the same

julia> getaddrinfo("data.iana.org")
ip"72.21.81.189"

I tried to download five different datasets using Firefox, all of them were successful.

Using Julia to download those seem to be more variable, sometimes success, sometimes timeout. This is weird: I had two Julia terminals open

  • Terminal A: I could download("https://data.iana.org/time-zones/releases/tzdata2015a.tar.gz"), but download("https://data.iana.org/time-zones/releases/tzdata2014a.tar.gz") timed out.
  • Terminal B: I could download("https://data.iana.org/time-zones/releases/tzdata2014a.tar.gz"), but download("https://data.iana.org/time-zones/releases/tzdata2015a.tar.gz") timed out.

@omus
Copy link
Member

omus commented Apr 29, 2020

Maybe the issue is with curl here? You could try using the same command but increase verbosity. From the cmd.exe prompt:

'C:\WINDOWS\System32\curl.exe' curl -s -S -g -L -v -o demo.tar.gz https://data.iana.org/time-zones/releases/tzdata2019c.tar.gz

Or in Julia:

julia> run(`'C:\WINDOWS\System32\curl.exe' curl -s -S -g -L -v -o demo.tar.gz https://data.iana.org/time-zones/releases/tzdata2019c.tar.gz`)

@jaakkor2
Copy link
Author

I tried twice, first succeeded, second failed.

julia> run(`'C:\WINDOWS\System32\curl.exe' -s -S -g -L -v -o demo.tar.gz https://data.iana.org/time-zones/releases/tzdata2019c.tar.gz`)
*   Trying 72.21.81.189...
* TCP_NODELAY set
* Connected to data.iana.org (72.21.81.189) port 443 (#0)
* schannel: SSL/TLS connection with data.iana.org port 443 (step 1/3)
* schannel: checking server certificate revocation
* schannel: sending initial handshake data: sending 178 bytes...
* schannel: sent initial handshake data: sent 178 bytes
* schannel: SSL/TLS connection with data.iana.org port 443 (step 2/3)
* schannel: failed to receive handshake, need more data
* schannel: SSL/TLS connection with data.iana.org port 443 (step 2/3)
* schannel: encrypted data got 4096
* schannel: encrypted data buffer: offset 4096 length 4096
* schannel: encrypted data length: 111
* schannel: encrypted data buffer: offset 111 length 4096
* schannel: received incomplete message, need more data
* schannel: SSL/TLS connection with data.iana.org port 443 (step 2/3)
* schannel: encrypted data got 720
* schannel: encrypted data buffer: offset 831 length 4096
* schannel: sending next handshake data: sending 126 bytes...
* schannel: SSL/TLS connection with data.iana.org port 443 (step 2/3)
* schannel: encrypted data got 242
* schannel: encrypted data buffer: offset 242 length 4096
* schannel: SSL/TLS handshake complete
* schannel: SSL/TLS connection with data.iana.org port 443 (step 3/3)
* schannel: stored credential handle in session cache
> GET /time-zones/releases/tzdata2019c.tar.gz HTTP/1.1
> Host: data.iana.org
> User-Agent: curl/7.55.1
> Accept: */*
>
* schannel: client wants to read 102400 bytes
* schannel: encdata_buffer resized 103424
* schannel: encrypted data buffer: offset 0 length 103424
* schannel: encrypted data got 43065
* schannel: encrypted data buffer: offset 43065 length 103424
* schannel: decrypted data length: 458
* schannel: decrypted data added: 458
* schannel: decrypted data cached: offset 458 length 102400
* schannel: encrypted data length: 42578
* schannel: encrypted data cached: offset 42578 length 103424
* schannel: decrypted data length: 16383
* schannel: decrypted data added: 16383
* schannel: decrypted data cached: offset 16841 length 102400
* schannel: encrypted data length: 26166
* schannel: encrypted data cached: offset 26166 length 103424
* schannel: decrypted data length: 1
* schannel: decrypted data added: 1
* schannel: decrypted data cached: offset 16842 length 102400
* schannel: encrypted data length: 26136
* schannel: encrypted data cached: offset 26136 length 103424
* schannel: decrypted data length: 16383
* schannel: decrypted data added: 16383
* schannel: decrypted data cached: offset 33225 length 102400
* schannel: encrypted data length: 9724
* schannel: encrypted data cached: offset 9724 length 103424
* schannel: failed to decrypt data, need more data
* schannel: schannel_recv cleanup
* schannel: decrypted data returned 33225
* schannel: decrypted data buffer: offset 0 length 102400
< HTTP/1.1 200 OK
< Accept-Ranges: bytes
< Age: 7053
< Cache-Control: max-age=86400
< Content-Type: application/x-gzip
< Date: Wed, 29 Apr 2020 19:59:59 GMT
< Etag: "5fb97-5924c1ee930c0"
< Expires: Thu, 30 Apr 2020 19:59:59 GMT
< Last-Modified: Wed, 11 Sep 2019 19:35:17 GMT
< Referrer-Policy: origin-when-cross-origin
< Server: ECAcc (dcb/7F62)
< Strict-Transport-Security: max-age=48211200; preload
< X-Cache: HIT
< X-Frame-Options: SAMEORIGIN
< Content-Length: 392087
<
{ [32767 bytes data]
* schannel: client wants to read 102400 bytes
* schannel: encrypted data buffer: offset 9724 length 103424
* schannel: encrypted data got 87120
* schannel: encrypted data buffer: offset 96844 length 103424
* schannel: decrypted data length: 16383
* schannel: decrypted data added: 16383
* schannel: decrypted data cached: offset 16383 length 102400
* schannel: encrypted data length: 80432
* schannel: encrypted data cached: offset 80432 length 103424
* schannel: decrypted data length: 16383
* schannel: decrypted data added: 16383
* schannel: decrypted data cached: offset 32766 length 102400
* schannel: encrypted data length: 64020
* schannel: encrypted data cached: offset 64020 length 103424
* schannel: decrypted data length: 16383
* schannel: decrypted data added: 16383
* schannel: decrypted data cached: offset 49149 length 102400
* schannel: encrypted data length: 47608
* schannel: encrypted data cached: offset 47608 length 103424
* schannel: decrypted data length: 16383
* schannel: decrypted data added: 16383
* schannel: decrypted data cached: offset 65532 length 102400
* schannel: encrypted data length: 31196
* schannel: encrypted data cached: offset 31196 length 103424
* schannel: decrypted data length: 16383
* schannel: decrypted data added: 16383
* schannel: decrypted data cached: offset 81915 length 102400
* schannel: encrypted data length: 14784
* schannel: encrypted data cached: offset 14784 length 103424
* schannel: failed to decrypt data, need more data
* schannel: schannel_recv cleanup
* schannel: decrypted data returned 81915
* schannel: decrypted data buffer: offset 0 length 102400
{ [81915 bytes data]
* schannel: client wants to read 102400 bytes
* schannel: encrypted data buffer: offset 14784 length 103424
* schannel: encrypted data got 14520
* schannel: encrypted data buffer: offset 29304 length 103424
* schannel: decrypted data length: 16383
* schannel: decrypted data added: 16383
* schannel: decrypted data cached: offset 16383 length 102400
* schannel: encrypted data length: 12892
* schannel: encrypted data cached: offset 12892 length 103424
* schannel: failed to decrypt data, need more data
* schannel: schannel_recv cleanup
* schannel: decrypted data returned 16383
* schannel: decrypted data buffer: offset 0 length 102400
{ [16383 bytes data]
* schannel: client wants to read 102400 bytes
* schannel: encrypted data buffer: offset 12892 length 103424
* schannel: encrypted data got 90532
* schannel: encrypted data buffer: offset 103424 length 103424
* schannel: decrypted data length: 16383
* schannel: decrypted data added: 16383
* schannel: decrypted data cached: offset 16383 length 102400
* schannel: encrypted data length: 87012
* schannel: encrypted data cached: offset 87012 length 103424
* schannel: decrypted data length: 16383
* schannel: decrypted data added: 16383
* schannel: decrypted data cached: offset 32766 length 102400
* schannel: encrypted data length: 70600
* schannel: encrypted data cached: offset 70600 length 103424
* schannel: decrypted data length: 9
* schannel: decrypted data added: 9
* schannel: decrypted data cached: offset 32775 length 102400
* schannel: encrypted data length: 70562
* schannel: encrypted data cached: offset 70562 length 103424
* schannel: decrypted data length: 16383
* schannel: decrypted data added: 16383
* schannel: decrypted data cached: offset 49158 length 102400
* schannel: encrypted data length: 54150
* schannel: encrypted data cached: offset 54150 length 103424
* schannel: decrypted data length: 16383
* schannel: decrypted data added: 16383
* schannel: decrypted data cached: offset 65541 length 102400
* schannel: encrypted data length: 37738
* schannel: encrypted data cached: offset 37738 length 103424
* schannel: decrypted data length: 16383
* schannel: decrypted data added: 16383
* schannel: decrypted data cached: offset 81924 length 102400
* schannel: encrypted data length: 21326
* schannel: encrypted data cached: offset 21326 length 103424
* schannel: decrypted data length: 16383
* schannel: decrypted data added: 16383
* schannel: decrypted data cached: offset 98307 length 102400
* schannel: encrypted data length: 4914
* schannel: encrypted data cached: offset 4914 length 103424
* schannel: failed to decrypt data, need more data
* schannel: schannel_recv cleanup
* schannel: decrypted data returned 98307
* schannel: decrypted data buffer: offset 0 length 102400
{ [98307 bytes data]
* schannel: client wants to read 102400 bytes
* schannel: encrypted data buffer: offset 4914 length 103424
* schannel: encrypted data got 98510
* schannel: encrypted data buffer: offset 103424 length 103424
* schannel: decrypted data length: 16383
* schannel: decrypted data added: 16383
* schannel: decrypted data cached: offset 16383 length 102400
* schannel: encrypted data length: 87012
* schannel: encrypted data cached: offset 87012 length 103424
* schannel: decrypted data length: 16383
* schannel: decrypted data added: 16383
* schannel: decrypted data cached: offset 32766 length 102400
* schannel: encrypted data length: 70600
* schannel: encrypted data cached: offset 70600 length 103424
* schannel: decrypted data length: 16383
* schannel: decrypted data added: 16383
* schannel: decrypted data cached: offset 49149 length 102400
* schannel: encrypted data length: 54188
* schannel: encrypted data cached: offset 54188 length 103424
* schannel: decrypted data length: 16383
* schannel: decrypted data added: 16383
* schannel: decrypted data cached: offset 65532 length 102400
* schannel: encrypted data length: 37776
* schannel: encrypted data cached: offset 37776 length 103424
* schannel: decrypted data length: 16383
* schannel: decrypted data added: 16383
* schannel: decrypted data cached: offset 81915 length 102400
* schannel: encrypted data length: 21364
* schannel: encrypted data cached: offset 21364 length 103424
* schannel: decrypted data length: 16383
* schannel: decrypted data added: 16383
* schannel: decrypted data cached: offset 98298 length 102400
* schannel: encrypted data length: 4952
* schannel: encrypted data cached: offset 4952 length 103424
* schannel: failed to decrypt data, need more data
* schannel: schannel_recv cleanup
* schannel: decrypted data returned 98298
* schannel: decrypted data buffer: offset 0 length 102400
{ [98298 bytes data]
* schannel: client wants to read 64417 bytes
* schannel: encrypted data buffer: offset 4952 length 103424
* schannel: encrypted data got 59581
* schannel: encrypted data buffer: offset 64533 length 103424
* schannel: decrypted data length: 16383
* schannel: decrypted data added: 16383
* schannel: decrypted data cached: offset 16383 length 102400
* schannel: encrypted data length: 48121
* schannel: encrypted data cached: offset 48121 length 103424
* schannel: decrypted data length: 16383
* schannel: decrypted data added: 16383
* schannel: decrypted data cached: offset 32766 length 102400
* schannel: encrypted data length: 31709
* schannel: encrypted data cached: offset 31709 length 103424
* schannel: decrypted data length: 16383
* schannel: decrypted data added: 16383
* schannel: decrypted data cached: offset 49149 length 102400
* schannel: encrypted data length: 15297
* schannel: encrypted data cached: offset 15297 length 103424
* schannel: decrypted data length: 15268
* schannel: decrypted data added: 15268
* schannel: decrypted data cached: offset 64417 length 102400
* schannel: encrypted data buffer: offset 0 length 103424
* schannel: decrypted data buffer: offset 64417 length 102400
* schannel: schannel_recv cleanup
* schannel: decrypted data returned 64417
* schannel: decrypted data buffer: offset 0 length 102400
{ [64417 bytes data]
* Connection #0 to host data.iana.org left intact


julia> run(`'C:\WINDOWS\System32\curl.exe' -s -S -g -L -v -o demo.tar.gz https://data.iana.org/time-zones/releases/tzdata2019c.tar.gz`)
*   Trying 72.21.81.189...
* TCP_NODELAY set
* connect to 72.21.81.189 port 443 failed: Timed out
* Failed to connect to data.iana.org port 443: Timed out
* Closing connection 0
curl: (7) Failed to connect to data.iana.org port 443: Timed out
ERROR: failed process: Process(`'C:\WINDOWS\System32\curl.exe' -s -S -g -L -v -o demo.tar.gz https://data.iana.org/time-zones/releases/tzdata2019c.tar.gz`, ProcessExited(7)) [7]

Stacktrace:
 [1] pipeline_error at .\process.jl:525 [inlined]
 [2] run(::Cmd; wait::Bool) at .\process.jl:440
 [3] run(::Cmd) at .\process.jl:438
 [4] top-level scope at REPL[1]:1
 [5] eval(::Module, ::Any) at .\boot.jl:331
 [6] eval_user_input(::Any, ::REPL.REPLBackend) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.4\REPL\src\REPL.jl:86
 [7] run_backend(::REPL.REPLBackend) at C:\Users\jr\.julia\packages\Revise\WkyNB\src\Revise.jl:1023
 [8] top-level scope at none:0

@omus
Copy link
Member

omus commented Apr 29, 2020

At this point I the issue I think the issue may have to do with Base.download. After inspecting the Base.download code there is a Windows only alternative Base.download_powershell which you may want to try out to see if it works any better (e.g. Base.download_powershell("https://data.iana.org/time-zones/releases/tzdata2019c.tar.gz", "demo.tar.gz"))

I would open a issue against Julia itself (https://github.com/JuliaLang/julia/issues) once you confirm that this issue occurs with other URLs. I suspect it will as the IANA server appears to me to be very reliable.

@jaakkor2
Copy link
Author

This seems to be very robust in PowerShell

Invoke-WebRequest -Uri https://data.iana.org/time-zones/releases/tzdata2019c.tar.gz -OutFile tzdata2019c.tar.gz

In fact, call to curl is actually a call to Invoke-WebRequest in PowerShell.

In cmd.exe, this sometimes fails, sometimes succeeds

>curl --silent --show-error --globoff --location --fail "https://data.iana.org/time-zones/releases/tzdat
a2019c.tar.gz" --output tzdata2019c.tar.gz

but I did not yet see downloading Julia fail, tried >10 times

>curl --silent --show-error --globoff --location --fail "https://julialang-s3.julialang.org/bin/winnt/x6
4/1.4/julia-1.4.1-win64.exe" --output "julia-1.4.1-win64.exe"

Curl version is

>curl --version
curl 7.55.1 (Windows) libcurl/7.55.1 WinSSL
Release-Date: [unreleased]
Protocols: dict file ftp ftps http https imap imaps pop3 pop3s smtp smtps telnet tftp
Features: AsynchDNS IPv6 Largefile SSPI Kerberos SPNEGO NTLM SSL

@jaakkor2
Copy link
Author

Closing in lieu of JuliaLang/julia#35660.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants