Proxy not finding all resources in remote repository

View: New views
6 Messages — Rating Filter:   Alert me  

Proxy not finding all resources in remote repository

by Q Beukes :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hey,

I have the following 2 proxies setup:
Java.net Repository
Policy: Release
Remote Storage Location: http://download.java.net/maven/2/

Java.net Snapshot Repository
Policy: Snapshot
Remote Storage Location: http://download.java.net/maven/2/

So they point to the same place. Then I have my group "Public" which
contains both, and has url: localhost:7081/nexus/content/groups/public

This 2 files exists and I'm able to fetch it with the browser and as a
dependency via maven:
http://download.java.net/maven/2/org/codehaus/mojo/groovy-maven-plugin/1.0-rc-5-kohsuke-1/groovy-maven-plugin-1.0-rc-5-kohsuke-1.jar
http://download.java.net/maven/2/javax/javaee-web-api/6.0-SNAPSHOT/javaee-web-api-6.0-SNAPSHOT.jar

And I can fetch the former via my nexus, but not the latter:
This works: http://localhost:7081/nexus/content/groups/public/org/codehaus/mojo/groovy-maven-plugin/1.0-rc-5-kohsuke-1/groovy-maven-plugin-1.0-rc-5-kohsuke-1.jar
Doesn't work: http://localhost:7081/nexus/content/groups/public/javax/javaee-web-api/6.0-SNAPSHOT/javaee-web-api-6.0-SNAPSHOT.jar

The last one gives a 404 with message: Item not found on UID
public:/javax/javaee-web-api/6.0-SNAPSHOT/javaee-web-api-6.0-SNAPSHOT.jar
in repository public

Can anyone please help me out with this.

Quintin Beukes

---------------------------------------------------------------------
To unsubscribe, e-mail: nexus-user-unsubscribe@...
For additional commands, e-mail: nexus-user-help@...


Re: Proxy not finding all resources in remote repository

by Brian Fox :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I setup a test repo on our system and was able to download it ok.
Double check that it is in fact configured as a snapshot repository,
then try expiring the cache on your public group and the snapshot
repo. It's possible that during setup you requested the file (for
example before you added the snapshot repo) and it has remembered that
the file doesn't exist.



On Sun, Oct 18, 2009 at 12:19 PM, Quintin Beukes <quintin@...> wrote:

> Hey,
>
> I have the following 2 proxies setup:
> Java.net Repository
> Policy: Release
> Remote Storage Location: http://download.java.net/maven/2/
>
> Java.net Snapshot Repository
> Policy: Snapshot
> Remote Storage Location: http://download.java.net/maven/2/
>
> So they point to the same place. Then I have my group "Public" which
> contains both, and has url: localhost:7081/nexus/content/groups/public
>
> This 2 files exists and I'm able to fetch it with the browser and as a
> dependency via maven:
> http://download.java.net/maven/2/org/codehaus/mojo/groovy-maven-plugin/1.0-rc-5-kohsuke-1/groovy-maven-plugin-1.0-rc-5-kohsuke-1.jar
> http://download.java.net/maven/2/javax/javaee-web-api/6.0-SNAPSHOT/javaee-web-api-6.0-SNAPSHOT.jar
>
> And I can fetch the former via my nexus, but not the latter:
> This works: http://localhost:7081/nexus/content/groups/public/org/codehaus/mojo/groovy-maven-plugin/1.0-rc-5-kohsuke-1/groovy-maven-plugin-1.0-rc-5-kohsuke-1.jar
> Doesn't work: http://localhost:7081/nexus/content/groups/public/javax/javaee-web-api/6.0-SNAPSHOT/javaee-web-api-6.0-SNAPSHOT.jar
>
> The last one gives a 404 with message: Item not found on UID
> public:/javax/javaee-web-api/6.0-SNAPSHOT/javaee-web-api-6.0-SNAPSHOT.jar
> in repository public
>
> Can anyone please help me out with this.
>
> Quintin Beukes
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: nexus-user-unsubscribe@...
> For additional commands, e-mail: nexus-user-help@...
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: nexus-user-unsubscribe@...
For additional commands, e-mail: nexus-user-help@...


Re: Proxy not finding all resources in remote repository

by Q Beukes :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

OK. never mind.

It started working now. It looks like it was busy downloading an
index, though I could find no indication of such an action still being
in progress in the logs.

The last entry in the logs is:
2009-10-18 18:24:18 INFO  [pool-1-thread-5] -
o.s.n.i.IndexerMana~:default  - Publishing best index for repository
java.net2-snapshot

This was there even before it started working.

Either way.

What I'm trying to do is the following:
1. Have a company Nexus proxy which we use when at the office
2. Have a nexus proxy setup on each of the laptops

The laptops would then merely have a release and snapshot proxy setup
to the company Nexus.

This means when you build on the "road" (at home basically) you would
query your localhost nexus, which should then query the proxy at the
office if it doesn't have a dependency. This way you fill the company
repo while developing at home, as well as have the dependency on your
laptop - all in one go.

The reason for this is that we develop almost 50%/50% at home and at
the office. And having to wait for downloads twice seems redundant.

Though what I noticed is that you can't query for items they get
reported as non existent if it isn't in the index. So if the repo at
the office gets updated with new dependencies, you won't know about
them at home unless you explicitely update your index every time.
Also, if you query something which has never been downloaded at the
office, it will simply tell you sorry. This is because at the office
the index for the repo is the index of the remote repo. With your
"local" nexus, the index is only that which has been downloaded at the
office already.

Is there a way to achieve such a set up?

Quintin Beukes



On Sun, Oct 18, 2009 at 6:19 PM, Quintin Beukes <quintin@...> wrote:

> Hey,
>
> I have the following 2 proxies setup:
> Java.net Repository
> Policy: Release
> Remote Storage Location: http://download.java.net/maven/2/
>
> Java.net Snapshot Repository
> Policy: Snapshot
> Remote Storage Location: http://download.java.net/maven/2/
>
> So they point to the same place. Then I have my group "Public" which
> contains both, and has url: localhost:7081/nexus/content/groups/public
>
> This 2 files exists and I'm able to fetch it with the browser and as a
> dependency via maven:
> http://download.java.net/maven/2/org/codehaus/mojo/groovy-maven-plugin/1.0-rc-5-kohsuke-1/groovy-maven-plugin-1.0-rc-5-kohsuke-1.jar
> http://download.java.net/maven/2/javax/javaee-web-api/6.0-SNAPSHOT/javaee-web-api-6.0-SNAPSHOT.jar
>
> And I can fetch the former via my nexus, but not the latter:
> This works: http://localhost:7081/nexus/content/groups/public/org/codehaus/mojo/groovy-maven-plugin/1.0-rc-5-kohsuke-1/groovy-maven-plugin-1.0-rc-5-kohsuke-1.jar
> Doesn't work: http://localhost:7081/nexus/content/groups/public/javax/javaee-web-api/6.0-SNAPSHOT/javaee-web-api-6.0-SNAPSHOT.jar
>
> The last one gives a 404 with message: Item not found on UID
> public:/javax/javaee-web-api/6.0-SNAPSHOT/javaee-web-api-6.0-SNAPSHOT.jar
> in repository public
>
> Can anyone please help me out with this.
>
> Quintin Beukes
>

---------------------------------------------------------------------
To unsubscribe, e-mail: nexus-user-unsubscribe@...
For additional commands, e-mail: nexus-user-help@...


Re: Proxy not finding all resources in remote repository

by Quintin Beukes-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

OK. I understand. This seems more understandable, as I did query it
before I added the snapshot repo. In fact, it was the 404 which made
me add the snapshot copy of the proxy in the first place. I don't
think I quite understand how Nexus works, yet.

Quintin Beukes



On Sun, Oct 18, 2009 at 6:38 PM, Brian Fox <brianf@...> wrote:

> I setup a test repo on our system and was able to download it ok.
> Double check that it is in fact configured as a snapshot repository,
> then try expiring the cache on your public group and the snapshot
> repo. It's possible that during setup you requested the file (for
> example before you added the snapshot repo) and it has remembered that
> the file doesn't exist.
>
>
>
> On Sun, Oct 18, 2009 at 12:19 PM, Quintin Beukes <quintin@...> wrote:
>> Hey,
>>
>> I have the following 2 proxies setup:
>> Java.net Repository
>> Policy: Release
>> Remote Storage Location: http://download.java.net/maven/2/
>>
>> Java.net Snapshot Repository
>> Policy: Snapshot
>> Remote Storage Location: http://download.java.net/maven/2/
>>
>> So they point to the same place. Then I have my group "Public" which
>> contains both, and has url: localhost:7081/nexus/content/groups/public
>>
>> This 2 files exists and I'm able to fetch it with the browser and as a
>> dependency via maven:
>> http://download.java.net/maven/2/org/codehaus/mojo/groovy-maven-plugin/1.0-rc-5-kohsuke-1/groovy-maven-plugin-1.0-rc-5-kohsuke-1.jar
>> http://download.java.net/maven/2/javax/javaee-web-api/6.0-SNAPSHOT/javaee-web-api-6.0-SNAPSHOT.jar
>>
>> And I can fetch the former via my nexus, but not the latter:
>> This works: http://localhost:7081/nexus/content/groups/public/org/codehaus/mojo/groovy-maven-plugin/1.0-rc-5-kohsuke-1/groovy-maven-plugin-1.0-rc-5-kohsuke-1.jar
>> Doesn't work: http://localhost:7081/nexus/content/groups/public/javax/javaee-web-api/6.0-SNAPSHOT/javaee-web-api-6.0-SNAPSHOT.jar
>>
>> The last one gives a 404 with message: Item not found on UID
>> public:/javax/javaee-web-api/6.0-SNAPSHOT/javaee-web-api-6.0-SNAPSHOT.jar
>> in repository public
>>
>> Can anyone please help me out with this.
>>
>> Quintin Beukes
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: nexus-user-unsubscribe@...
>> For additional commands, e-mail: nexus-user-help@...
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: nexus-user-unsubscribe@...
> For additional commands, e-mail: nexus-user-help@...
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: nexus-user-unsubscribe@...
For additional commands, e-mail: nexus-user-help@...


Re: Proxy not finding all resources in remote repository

by Q Beukes :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Never mind this either.

Thanks Brian, you're tip helped a lot.

I expired all my caches. And it seems to work as intended now.

I guess this would just have to be a policy then, when new
repositories are added, it's advised to expire the caches, rebuild
metadata and fetch indexes, whether you requested artifacts that
existed or not, to avoid such problems completely.

Quintin Beukes



On Sun, Oct 18, 2009 at 6:40 PM, Quintin Beukes <quintin@...> wrote:

> OK. never mind.
>
> It started working now. It looks like it was busy downloading an
> index, though I could find no indication of such an action still being
> in progress in the logs.
>
> The last entry in the logs is:
> 2009-10-18 18:24:18 INFO  [pool-1-thread-5] -
> o.s.n.i.IndexerMana~:default  - Publishing best index for repository
> java.net2-snapshot
>
> This was there even before it started working.
>
> Either way.
>
> What I'm trying to do is the following:
> 1. Have a company Nexus proxy which we use when at the office
> 2. Have a nexus proxy setup on each of the laptops
>
> The laptops would then merely have a release and snapshot proxy setup
> to the company Nexus.
>
> This means when you build on the "road" (at home basically) you would
> query your localhost nexus, which should then query the proxy at the
> office if it doesn't have a dependency. This way you fill the company
> repo while developing at home, as well as have the dependency on your
> laptop - all in one go.
>
> The reason for this is that we develop almost 50%/50% at home and at
> the office. And having to wait for downloads twice seems redundant.
>
> Though what I noticed is that you can't query for items they get
> reported as non existent if it isn't in the index. So if the repo at
> the office gets updated with new dependencies, you won't know about
> them at home unless you explicitely update your index every time.
> Also, if you query something which has never been downloaded at the
> office, it will simply tell you sorry. This is because at the office
> the index for the repo is the index of the remote repo. With your
> "local" nexus, the index is only that which has been downloaded at the
> office already.
>
> Is there a way to achieve such a set up?
>
> Quintin Beukes
>
>
>
> On Sun, Oct 18, 2009 at 6:19 PM, Quintin Beukes <quintin@...> wrote:
>> Hey,
>>
>> I have the following 2 proxies setup:
>> Java.net Repository
>> Policy: Release
>> Remote Storage Location: http://download.java.net/maven/2/
>>
>> Java.net Snapshot Repository
>> Policy: Snapshot
>> Remote Storage Location: http://download.java.net/maven/2/
>>
>> So they point to the same place. Then I have my group "Public" which
>> contains both, and has url: localhost:7081/nexus/content/groups/public
>>
>> This 2 files exists and I'm able to fetch it with the browser and as a
>> dependency via maven:
>> http://download.java.net/maven/2/org/codehaus/mojo/groovy-maven-plugin/1.0-rc-5-kohsuke-1/groovy-maven-plugin-1.0-rc-5-kohsuke-1.jar
>> http://download.java.net/maven/2/javax/javaee-web-api/6.0-SNAPSHOT/javaee-web-api-6.0-SNAPSHOT.jar
>>
>> And I can fetch the former via my nexus, but not the latter:
>> This works: http://localhost:7081/nexus/content/groups/public/org/codehaus/mojo/groovy-maven-plugin/1.0-rc-5-kohsuke-1/groovy-maven-plugin-1.0-rc-5-kohsuke-1.jar
>> Doesn't work: http://localhost:7081/nexus/content/groups/public/javax/javaee-web-api/6.0-SNAPSHOT/javaee-web-api-6.0-SNAPSHOT.jar
>>
>> The last one gives a 404 with message: Item not found on UID
>> public:/javax/javaee-web-api/6.0-SNAPSHOT/javaee-web-api-6.0-SNAPSHOT.jar
>> in repository public
>>
>> Can anyone please help me out with this.
>>
>> Quintin Beukes
>>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: nexus-user-unsubscribe@...
For additional commands, e-mail: nexus-user-help@...


Re: Re: Proxy not finding all resources in remote repository

by Brian Fox :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Expire caches yes, but rebuild metadata and reindex no. The rebuild
metada is only useful if you have changed things on disk or some how
they otherwise got corrupt. This specifically applies to
maven-metadata.xml and the .md5/.sha1 hashes. The indexes only apply
to searching nexus, it has no relation to the actual proxying of the
artifacts.

On Sun, Oct 18, 2009 at 12:47 PM, Quintin Beukes <quintin@...> wrote:

> Never mind this either.
>
> Thanks Brian, you're tip helped a lot.
>
> I expired all my caches. And it seems to work as intended now.
>
> I guess this would just have to be a policy then, when new
> repositories are added, it's advised to expire the caches, rebuild
> metadata and fetch indexes, whether you requested artifacts that
> existed or not, to avoid such problems completely.
>
> Quintin Beukes
>
>
>
> On Sun, Oct 18, 2009 at 6:40 PM, Quintin Beukes <quintin@...> wrote:
>> OK. never mind.
>>
>> It started working now. It looks like it was busy downloading an
>> index, though I could find no indication of such an action still being
>> in progress in the logs.
>>
>> The last entry in the logs is:
>> 2009-10-18 18:24:18 INFO  [pool-1-thread-5] -
>> o.s.n.i.IndexerMana~:default  - Publishing best index for repository
>> java.net2-snapshot
>>
>> This was there even before it started working.
>>
>> Either way.
>>
>> What I'm trying to do is the following:
>> 1. Have a company Nexus proxy which we use when at the office
>> 2. Have a nexus proxy setup on each of the laptops
>>
>> The laptops would then merely have a release and snapshot proxy setup
>> to the company Nexus.
>>
>> This means when you build on the "road" (at home basically) you would
>> query your localhost nexus, which should then query the proxy at the
>> office if it doesn't have a dependency. This way you fill the company
>> repo while developing at home, as well as have the dependency on your
>> laptop - all in one go.
>>
>> The reason for this is that we develop almost 50%/50% at home and at
>> the office. And having to wait for downloads twice seems redundant.
>>
>> Though what I noticed is that you can't query for items they get
>> reported as non existent if it isn't in the index. So if the repo at
>> the office gets updated with new dependencies, you won't know about
>> them at home unless you explicitely update your index every time.
>> Also, if you query something which has never been downloaded at the
>> office, it will simply tell you sorry. This is because at the office
>> the index for the repo is the index of the remote repo. With your
>> "local" nexus, the index is only that which has been downloaded at the
>> office already.
>>
>> Is there a way to achieve such a set up?
>>
>> Quintin Beukes
>>
>>
>>
>> On Sun, Oct 18, 2009 at 6:19 PM, Quintin Beukes <quintin@...> wrote:
>>> Hey,
>>>
>>> I have the following 2 proxies setup:
>>> Java.net Repository
>>> Policy: Release
>>> Remote Storage Location: http://download.java.net/maven/2/
>>>
>>> Java.net Snapshot Repository
>>> Policy: Snapshot
>>> Remote Storage Location: http://download.java.net/maven/2/
>>>
>>> So they point to the same place. Then I have my group "Public" which
>>> contains both, and has url: localhost:7081/nexus/content/groups/public
>>>
>>> This 2 files exists and I'm able to fetch it with the browser and as a
>>> dependency via maven:
>>> http://download.java.net/maven/2/org/codehaus/mojo/groovy-maven-plugin/1.0-rc-5-kohsuke-1/groovy-maven-plugin-1.0-rc-5-kohsuke-1.jar
>>> http://download.java.net/maven/2/javax/javaee-web-api/6.0-SNAPSHOT/javaee-web-api-6.0-SNAPSHOT.jar
>>>
>>> And I can fetch the former via my nexus, but not the latter:
>>> This works: http://localhost:7081/nexus/content/groups/public/org/codehaus/mojo/groovy-maven-plugin/1.0-rc-5-kohsuke-1/groovy-maven-plugin-1.0-rc-5-kohsuke-1.jar
>>> Doesn't work: http://localhost:7081/nexus/content/groups/public/javax/javaee-web-api/6.0-SNAPSHOT/javaee-web-api-6.0-SNAPSHOT.jar
>>>
>>> The last one gives a 404 with message: Item not found on UID
>>> public:/javax/javaee-web-api/6.0-SNAPSHOT/javaee-web-api-6.0-SNAPSHOT.jar
>>> in repository public
>>>
>>> Can anyone please help me out with this.
>>>
>>> Quintin Beukes
>>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: nexus-user-unsubscribe@...
> For additional commands, e-mail: nexus-user-help@...
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: nexus-user-unsubscribe@...
For additional commands, e-mail: nexus-user-help@...