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/1.1 401 Unauthorized while requesting https://n5eil01u.ecs.nsidc.org .... #26

Closed
alex-s-gardner opened this issue Oct 18, 2022 · 6 comments

Comments

@alex-s-gardner
Copy link
Collaborator

alex-s-gardner commented Oct 18, 2022

Hi @evetion have you ever had an issue where the authentication just stops working. At first I thought it was an issue with Curl and that HTTP.download solved the problem but I was wrong.

SpaceLiDAR.download! was working great and then authentication stopped working

  1. My .netrc looks as expected
  2. I can download the file if I copy the url for the file into my browser so it's not a firewall issue

But neither SpaceLiDAR.download! nor HTTP.download will download from https://n5eil01u.ecs.nsidc.org

Here's the stack trace... doesn't show much except that the access request is Unauthorized

SpaceLiDAR.download!(granules[7455], atl06_dir)
ERROR: HTTP/1.1 401 Unauthorized while requesting https://n5eil01u.ecs.nsidc.org/DP7/ATLAS/ATL06.005/2022.04.25/ATL06_20220425000438_05021511_005_02.h5
Stacktrace:
[1] #3
@ /usr/local/julia-1.8.0/share/julia/stdlib/v1.8/Downloads/src/Downloads.jl:243 [inlined]
[2] open(f::Downloads.var"#3#4"{Nothing, Vector{Pair{String, String}}, Float64, Nothing, Bool, Nothing, Downloads.Downloader, String}, args::String; kwargs::Base.Pairs{Symbol, Bool, Tuple{Symbol, Symbol}, NamedTuple{(:write, :lock), Tuple{Bool, Bool}}})
@ Base ./io.jl:384
[3] #open_nolock#1
@ /usr/local/julia-1.8.0/share/julia/stdlib/v1.8/ArgTools/src/ArgTools.jl:35 [inlined]
[4] arg_write(f::Function, arg::String)
@ ArgTools /usr/local/julia-1.8.0/share/julia/stdlib/v1.8/ArgTools/src/ArgTools.jl:103
[5] #download#2
@ /usr/local/julia-1.8.0/share/julia/stdlib/v1.8/Downloads/src/Downloads.jl:230 [inlined]
[6] _download(::String, ::Vararg{String})
@ SpaceLiDAR ~/.julia/packages/SpaceLiDAR/x5jZJ/src/granule.jl:14
[7] download!(granule::ICESat2_Granule{:ATL06}, folder::String)
@ SpaceLiDAR ~/.julia/packages/SpaceLiDAR/x5jZJ/src/granule.jl:40
[8] top-level scope
@ REPL[148]:1

@evetion
Copy link
Owner

evetion commented Oct 18, 2022

Thanks for creating an issue.

I suspect it's something on the server that changed? What worked for me is deleting the line machine n5eil01u.ecs.nsidc.org in my .netrc, only the line for urs.earthdata.nasa.gov needs to be specified.

@alex-s-gardner
Copy link
Collaborator Author

So that worked for my MAC but my linux server throws a new error... digging into it.


ERROR: UndefVarError: easy_hooke not defined
Stacktrace:
[1] _download(::String, ::Vararg{String})
@ SpaceLiDAR ~/.julia/packages/SpaceLiDAR/x5jZJ/src/granule.jl:12
[2] download!(granule::ICESat2_Granule{:ATL06}, folder::String)
@ SpaceLiDAR ~/.julia/packages/SpaceLiDAR/x5jZJ/src/granule.jl:39
[3] top-level scope
@ ./REPL[2]:3

alex-s-gardner added a commit to alex-s-gardner/SpaceLiDAR.jl that referenced this issue Oct 18, 2022
It seems that the anonymous declaration of  `easy_hook` was casing [issues](evetion#26 (comment))
@evetion
Copy link
Owner

evetion commented Oct 18, 2022

easy_hooke looks like a typo?

@alex-s-gardner
Copy link
Collaborator Author

Oh man... you're totally right. I looked at that for over an hour :-(

@evetion
Copy link
Owner

evetion commented Oct 25, 2022

Fixed by #31

@evetion evetion closed this as completed Oct 25, 2022
@evetion
Copy link
Owner

evetion commented Jan 3, 2023

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

No branches or pull requests

2 participants