You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@buildr.apache.org by Chris Adams <ch...@edatasource.com> on 2013/08/27 21:01:51 UTC

Artifacts Download - Permission Denied

Hello,

While trying to download artifacts from the central Maven repo, I get the following error:
Failed to download http://repo1.maven.org/maven2/org/elasticsearch/elasticsearch/0.90.2/elasticsearch-0.90.2.jar: Denied Access

But, if I copy/paste the URL into a browser, the jar file downloads fine.

Any ideas?

Thanks.

- Chris

Re: Artifacts Download - Permission Denied

Posted by Peter Donald <pe...@realityforge.org>.
Hi,

Buildr trunk has been updated so that it always sets the User-Agent header
when making http requests. This should avoid this issue after the next
release.

Thanks for the heads up!


On Tue, Sep 3, 2013 at 7:45 PM, Peter Tillotson <sl...@yahoo.co.uk>wrote:

> +1 for this issue
>
> A recent change (same code working 1 month ago) somewhere looks to have
> broken artifact download.
>
> I was trying a number of mirrors, and it fails across the whole set. I've
> no tried 1.9.2 yet but tcpdump'd the request
>
> GET
> /maven2/org/apache/accumulo/accumulo-core/1.4.3/accumulo-core-1.4.3.jar
> HTTP/1.1
> Host: uk.maven.org
> Connection: close
> Accept: */*
>
> HTTP/1.1 403 Denied Access
> Server: Varnish
> Retry-After: 0
> Content-Type: text/html; charset=utf-8
> Content-Length: 401
> Accept-Ranges: bytes
> Date: Tue, 03 Sep 2013 08:40:51 GMT
> Via: 1.1 varnish
> Age: 0
> Connection: close
> X-Served-By: cache-lo83-LHR
> X-Cache: MISS
> X-Cache-Hits: 0
>
> I suspect either "Connection: close" or lack of "User Agent"
>
> Succesfull wget header
>
> GET
> /maven2/org/apache/accumulo/accumulo-core/1.4.3/accumulo-core-1.4.3.jar
> HTTP/1.1
> User-Agent: Wget/1.13.4 (linux-gnu)
> Accept: */*
> Host: uk.maven.org
> Connection: Keep-Alive
>
>
>
> ________________________________
>  From: Chris Adams <ch...@edatasource.com>
> To: users@buildr.apache.org
> Sent: Tuesday, 27 August 2013, 21:59
> Subject: Re: Artifacts Download - Permission Denied
>
>
> That's probably it. I'm using Ruby 1.8.7 on MacOS. I'll try upgrading to
> 1.9.2 to see if that resolves the problem. Crazily enough, this is a fairly
> recent issue… wonder what Maven Central changed…
> Thanks for the idea about upgrading Ruby; I wasn't even thinking in that
> direction.
>
> - Chris
>
>
> On Aug 27, 2013, at 3:57 PM, Alex Boisvert <al...@gmail.com>
> wrote:
>
> > Weird.  I can reproduce with standard Ruby 1.8.7 ... but when I use 1.9.2
> > or JRuby 1.7.1 it works ... I'm suspecting some issue with the underlying
> > HTTP library.
> >
> >
> > On Tue, Aug 27, 2013 at 12:01 PM, Chris Adams <ch...@edatasource.com>
> wrote:
> >
> >> Hello,
> >>
> >> While trying to download artifacts from the central Maven repo, I get
> the
> >> following error:
> >> Failed to download
> >>
> http://repo1.maven.org/maven2/org/elasticsearch/elasticsearch/0.90.2/elasticsearch-0.90.2.jar
> :
> >> Denied Access
> >>
> >> But, if I copy/paste the URL into a browser, the jar file downloads
> fine.
> >>
> >> Any ideas?
> >>
> >> Thanks.
> >>
> >> - Chris
>



-- 
Cheers,

Peter Donald

Re: Artifacts Download - Permission Denied

Posted by Peter Tillotson <sl...@yahoo.co.uk>.
+1 for this issue

A recent change (same code working 1 month ago) somewhere looks to have broken artifact download. 

I was trying a number of mirrors, and it fails across the whole set. I've no tried 1.9.2 yet but tcpdump'd the request

GET /maven2/org/apache/accumulo/accumulo-core/1.4.3/accumulo-core-1.4.3.jar HTTP/1.1
Host: uk.maven.org
Connection: close
Accept: */*

HTTP/1.1 403 Denied Access
Server: Varnish
Retry-After: 0
Content-Type: text/html; charset=utf-8
Content-Length: 401
Accept-Ranges: bytes
Date: Tue, 03 Sep 2013 08:40:51 GMT
Via: 1.1 varnish
Age: 0
Connection: close
X-Served-By: cache-lo83-LHR
X-Cache: MISS
X-Cache-Hits: 0

I suspect either "Connection: close" or lack of "User Agent"

Succesfull wget header 

GET /maven2/org/apache/accumulo/accumulo-core/1.4.3/accumulo-core-1.4.3.jar HTTP/1.1
User-Agent: Wget/1.13.4 (linux-gnu)
Accept: */*
Host: uk.maven.org
Connection: Keep-Alive



________________________________
 From: Chris Adams <ch...@edatasource.com>
To: users@buildr.apache.org 
Sent: Tuesday, 27 August 2013, 21:59
Subject: Re: Artifacts Download - Permission Denied
 

That's probably it. I'm using Ruby 1.8.7 on MacOS. I'll try upgrading to 1.9.2 to see if that resolves the problem. Crazily enough, this is a fairly recent issue… wonder what Maven Central changed…
Thanks for the idea about upgrading Ruby; I wasn't even thinking in that direction.

- Chris


On Aug 27, 2013, at 3:57 PM, Alex Boisvert <al...@gmail.com> wrote:

> Weird.  I can reproduce with standard Ruby 1.8.7 ... but when I use 1.9.2
> or JRuby 1.7.1 it works ... I'm suspecting some issue with the underlying
> HTTP library.
> 
> 
> On Tue, Aug 27, 2013 at 12:01 PM, Chris Adams <ch...@edatasource.com> wrote:
> 
>> Hello,
>> 
>> While trying to download artifacts from the central Maven repo, I get the
>> following error:
>> Failed to download
>> http://repo1.maven.org/maven2/org/elasticsearch/elasticsearch/0.90.2/elasticsearch-0.90.2.jar:
>> Denied Access
>> 
>> But, if I copy/paste the URL into a browser, the jar file downloads fine.
>> 
>> Any ideas?
>> 
>> Thanks.
>> 
>> - Chris

Re: Artifacts Download - Permission Denied

Posted by Chris Adams <ch...@edatasource.com>.
That's probably it. I'm using Ruby 1.8.7 on MacOS. I'll try upgrading to 1.9.2 to see if that resolves the problem. Crazily enough, this is a fairly recent issue… wonder what Maven Central changed…
Thanks for the idea about upgrading Ruby; I wasn't even thinking in that direction.

- Chris


On Aug 27, 2013, at 3:57 PM, Alex Boisvert <al...@gmail.com> wrote:

> Weird.  I can reproduce with standard Ruby 1.8.7 ... but when I use 1.9.2
> or JRuby 1.7.1 it works ... I'm suspecting some issue with the underlying
> HTTP library.
> 
> 
> On Tue, Aug 27, 2013 at 12:01 PM, Chris Adams <ch...@edatasource.com> wrote:
> 
>> Hello,
>> 
>> While trying to download artifacts from the central Maven repo, I get the
>> following error:
>> Failed to download
>> http://repo1.maven.org/maven2/org/elasticsearch/elasticsearch/0.90.2/elasticsearch-0.90.2.jar:
>> Denied Access
>> 
>> But, if I copy/paste the URL into a browser, the jar file downloads fine.
>> 
>> Any ideas?
>> 
>> Thanks.
>> 
>> - Chris


Re: Artifacts Download - Permission Denied

Posted by Alex Boisvert <al...@gmail.com>.
Weird.  I can reproduce with standard Ruby 1.8.7 ... but when I use 1.9.2
or JRuby 1.7.1 it works ... I'm suspecting some issue with the underlying
HTTP library.


On Tue, Aug 27, 2013 at 12:01 PM, Chris Adams <ch...@edatasource.com> wrote:

> Hello,
>
> While trying to download artifacts from the central Maven repo, I get the
> following error:
> Failed to download
> http://repo1.maven.org/maven2/org/elasticsearch/elasticsearch/0.90.2/elasticsearch-0.90.2.jar:
> Denied Access
>
> But, if I copy/paste the URL into a browser, the jar file downloads fine.
>
> Any ideas?
>
> Thanks.
>
> - Chris