Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Virgo » How to get remote repositories working
How to get remote repositories working [message #664594] Mon, 11 April 2011 10:20 Go to next message
Joel Rosi-Schwartz is currently offline Joel Rosi-SchwartzFriend
Messages: 624
Registered: July 2009
Location: London. England
Senior Member
Good morning,

First off I have read the thread Remote hosted repository and bundle start

For the hosting virgo the org.eclipse.virgo.apps.repository.properties reads
hosted-repo.type=external
hosted-repo.searchPattern=repository/hosted/*


For the client virgo the org.eclipse.virgo.repository.properties reads
ext.type=external
ext.searchPattern=repository/ext/{artifact}

usr.type=watched
usr.watchDirectory=repository/usr

remote-repo.type=remote
remote-repo.uri=http://ayao:8880/org.eclipse.virgo.server.repository/hosted-repo
remote-repo.indexRefreshInterval=30

chain=ext,remote-repo,usr


I have the jars I want to access from the hosting virgo in repository/hosted/ and a plan in the pickup folder of the client that specifies one of the jars. First I start up the hosting virgo server and then the client virgo server. No joy Sad I get the following exception
[2011-04-11 10:07:59.168] fs-watcher                   <DE0002E> Installation of plan 'paint.demo.plan' version '2.1.0' failed. org.eclipse.virgo.kernel.deployer.core.DeploymentException: bundle 'org.foo.paint' version '[5.0.0, 5.0.0]' not found


The versions are right and this works fine if I drop the jar into repository/usr on the client virgo.

I can get to the admin console of the hosting virgo so I know the url is reachable. If I go to http://ayao:8880/org.eclipse.virgo.server.repository/hosted- repo however I get a 404. Is this to be expected? Is it possible to verify that the hostedrepo servlet is responding to requests? The logs indicate that is is started btw.

Any ides appreciated on how to resolve this.

Many thanks,
Joel
Re: How to get remote repositories working [message #664597 is a reply to message #664594] Mon, 11 April 2011 10:23 Go to previous messageGo to next message
Glyn Normington is currently offline Glyn NormingtonFriend
Messages: 1222
Registered: July 2009
Senior Member
You could configure a request dumper valve to see if the hosted repo app is being driven.

I'll attach some tutorial information that describes how to do that.
  • Attachment: README.pdf
    (Size: 651.76KB, Downloaded 496 times)
Re: How to get remote repositories working [message #664626 is a reply to message #664597] Mon, 11 April 2011 12:57 Go to previous messageGo to next message
Joel Rosi-Schwartz is currently offline Joel Rosi-SchwartzFriend
Messages: 624
Registered: July 2009
Location: London. England
Senior Member
Glyn, thanks for the tip. I put the valve in place and at least I have some output to contemplate and share.

First I can now see that the client is indeed speaking to the repo host. Sample output attached, but essentially it boils down to 404 being returned.

Next org.eclipse.virgo.apps.repository-2.1.0.RELEASE/log.log seems to indicate that hosted servlet has started up, but that is harder for me to analyse for certain so I would appreciate if you could have a look at the log. I will attach it to a separate message.

The admin console viewing Viewing bundle 'org.eclipse.virgo.apps.repository-2.1.0.RELEASE-org.eclipse .virgo.apps.repository.web - 2.1.0.RELEASE' indicates something that looks odd to me.
Published Services (2)
Service 92 - ObjectClass org.springframework.web.context.ConfigurableWebApplicationContext, ...
Service 93 - ObjectClass javax.servlet.ServletContext
Property	Value
osgi.web.version	2.1.0.RELEASE
osgi.web.contextpath	/org.eclipse.virgo.apps.repository
osgi.web.symbolicname	org.eclipse.virgo.apps.repository-2.1.0.RELEASE-org.eclipse.virgo.apps.repository.web
service.id	93
objectClass	javax.servlet.ServletContext



Why is osgi.web.contextpath set to /org.eclipse.virgo.apps.repository when the client is accessing http://ayao:8880/org.eclipse.virgo.server.repository? Which is correct? I tried changing the client to this, but still get a 404.

Glyn, should this be this hard? I thought that getting a repo host set up would be bread and butter type stuff; I am wondering if am losing it Sad

Cheers,
Joel

Re: How to get remote repositories working [message #664627 is a reply to message #664594] Mon, 11 April 2011 12:58 Go to previous messageGo to next message
Joel Rosi-Schwartz is currently offline Joel Rosi-SchwartzFriend
Messages: 624
Registered: July 2009
Location: London. England
Senior Member
org.eclipse.virgo.apps.repository-2.1.0.RELEASE/log.log attached
  • Attachment: log.log
    (Size: 62.55KB, Downloaded 214 times)
Re: How to get remote repositories working [message #664633 is a reply to message #664627] Mon, 11 April 2011 13:29 Go to previous messageGo to next message
Glyn Normington is currently offline Glyn NormingtonFriend
Messages: 1222
Registered: July 2009
Senior Member
The hosted repository server application has context path org.eclipse.virgo.apps.repository. Back in dm Server days, this used to be com.springsource.server.repository. So the correct value is org.eclipse.virgo.apps.repository and it seems like the wrong global change was applied to the user guide!

This should be fixed. If you would like to take credit for spotting it, please raise a bug.

Meanwhile, please substitute org.eclipse.virgo.apps.repository for org.eclipse.virgo.server.repository in the description of the hosted repository server context path in the user guide.

So you did the right thing on the client side. Did you restart the client instance of Virgo using the -clean option?
Re: How to get remote repositories working [message #664639 is a reply to message #664627] Mon, 11 April 2011 13:42 Go to previous messageGo to next message
Glyn Normington is currently offline Glyn NormingtonFriend
Messages: 1222
Registered: July 2009
Senior Member
From the log, it seems the client is configured to use a hosted repository called "hosted-repository". What name did you give the hosted repository on the server? According to the beginning of this thread, it was called "hosted-repo" on both client and server.

(BTW of course it shouldn't be this hard. Apologies!)
Re: How to get remote repositories working [message #664645 is a reply to message #664639] Mon, 11 April 2011 13:55 Go to previous messageGo to next message
Joel Rosi-Schwartz is currently offline Joel Rosi-SchwartzFriend
Messages: 624
Registered: July 2009
Location: London. England
Senior Member
Its "hosted-repository" on both sides, is was a typo in the thread. But well spotted.

It works all fine now. It was not the -clean, I had that set. Rather my last issue was I had this in my client repo properties
remote-repo.uri=http://ayao:8880//org.eclipse.virgo.apps.repository/hosted-repository

notice the double // after the port. Duh... one gets tire when fight gremlins Smile

Once again, thanks much for the assistance. I will open the bug for the documentation. When I do the patch for my other issue, I will pick up fixing this one as well. On that topic, if I give you a patch for 2.2.0 will it applicable to 3.0.x or should I jump straight to patching 3?

All the best,
Joel

PS - is you could have a look at Barbara's post No frame contents in Swing app on Virgo it would be much appreciated. It is a real show stopper for her project using Virgo. - Cheers
Re: How to get remote repositories working [message #664651 is a reply to message #664645] Mon, 11 April 2011 14:07 Go to previous messageGo to next message
Glyn Normington is currently offline Glyn NormingtonFriend
Messages: 1222
Registered: July 2009
Senior Member
Glad you got sorted!

A patch for 3.0 would be best since the docs have changed in that area. If you really want to help and can provide a docs patch for 2.1.0 in the next couple of days, that would be fantastic as we are are planning a 2.1.1 release very soon (Eclipse IP process permitting).

PS. I drew a blank when I read Barbara's post, but I'll respond with some (very) basic suggestions.
Re: How to get remote repositories working [message #664873 is a reply to message #664651] Tue, 12 April 2011 11:03 Go to previous messageGo to next message
Joel Rosi-Schwartz is currently offline Joel Rosi-SchwartzFriend
Messages: 624
Registered: July 2009
Location: London. England
Senior Member
Glyn Normington wrote on Mon, 11 April 2011 15:07
Glad you got sorted!


Well almost Sad Works fine on my OS X but I am having issues getting the same config running on Win7. I have tried 2.1 and 3.0M3 with the same results.

The repo is configured on both sides because I can see the log messages on the client
<RP0051I> The repository 'remote-repo' is available. 
...
<RP0052I> The index for repository 'remote-repo' has been updated. 


On the repo side I see the periodic polling but I see no request attempt when the plan is executed. It would appear that the client has determined that the bundle it wants is not on the server by referencing the remote-repo.descriptors, but in fact the bundle at the proper version is in the descriptors. I have attached.

The exception is
[2011-04-12 11:20:30.394] fs-watcher                   <DE0003E> Install failed for plan 'paint.demo.plan' version '5.0.0'. 
[2011-04-12 11:20:30.398] fs-watcher                   <HD0002E> Hot deploy failed for file 'paint.demo1.plan'. org.eclipse.virgo.kernel.deployer.core.DeploymentException: bundle 'org.foo.examples.paint.shape' version '[5.0.0, 5.0.0)' not found
	at org.eclipse.virgo.kernel.install.artifact.internal.StandardInstallArtifactTreeInclosure.createInstallTree(StandardInstallArtifactTreeInclosure.java:94)
	at org.eclipse.virgo.kernel.deployer.core.internal.PlanResolver.createInstallArtifactTree(PlanResolver.java:113)
	at org.eclipse.virgo.kernel.deployer.core.internal.PlanResolver.operate(PlanResolver.java:70)
	at org.eclipse.virgo.kernel.deployer.core.internal.PlanResolver.access$0(PlanResolver.java:62)
	at org.eclipse.virgo.kernel.deployer.core.internal.PlanResolver$1.visit(PlanResolver.java:56)
	at org.eclipse.virgo.util.common.ThreadSafeArrayListTree.visit(ThreadSafeArrayListTree.java:165)
	at org.eclipse.virgo.kernel.deployer.core.internal.PlanResolver.transform(PlanResolver.java:53)
                    ...	


How do I get a trace on the details of the plan resolve process?

TIA,
Joel
Re: How to get remote repositories working [message #664888 is a reply to message #664873] Tue, 12 April 2011 12:30 Go to previous messageGo to next message
Glyn Normington is currently offline Glyn NormingtonFriend
Messages: 1222
Registered: July 2009
Senior Member
[5.0.0, 5.0.0) is an empty range.
Re: How to get remote repositories working [message #664896 is a reply to message #664888] Tue, 12 April 2011 12:55 Go to previous messageGo to next message
Joel Rosi-Schwartz is currently offline Joel Rosi-SchwartzFriend
Messages: 624
Registered: July 2009
Location: London. England
Senior Member
Glyn Normington wrote on Tue, 12 April 2011 13:30
[5.0.0, 5.0.0) is an empty range.


Joel Embarrassed
Barbara Confused Embarrassed Embarrassed Rolling Eyes

Barbara wrote the plans on Win7 and I wrote them on OS X. mea culpa that I did not immediately see the mistake Shocked

Glyn, we both cannot tell you just how much we appreciate your assistance and what a pleasure you are to work with.

Joel

[Updated on: Tue, 12 April 2011 12:56]

Report message to a moderator

Re: How to get remote repositories working [message #664898 is a reply to message #664896] Tue, 12 April 2011 12:56 Go to previous messageGo to next message
Glyn Normington is currently offline Glyn NormingtonFriend
Messages: 1222
Registered: July 2009
Senior Member
Glad that fixed it. Smile
Re: How to get remote repositories working [message #664900 is a reply to message #664651] Tue, 12 April 2011 13:01 Go to previous messageGo to next message
Joel Rosi-Schwartz is currently offline Joel Rosi-SchwartzFriend
Messages: 624
Registered: July 2009
Location: London. England
Senior Member
Glyn Normington wrote on Mon, 11 April 2011 15:07
Glad you got sorted!

A patch for 3.0 would be best since the docs have changed in that area. If you really want to help and can provide a docs patch for 2.1.0 in the next couple of days, that would be fantastic as we are are planning a 2.1.1 release very soon (Eclipse IP process permitting).

Okay now that Barbara is out of the woods I can take the time to fix the documentation up. If I get you the patches no later then Thursday will it be in time for 2.1.1? If not what is the deadline?

[Updated on: Tue, 12 April 2011 13:02]

Report message to a moderator

Re: How to get remote repositories working [message #664914 is a reply to message #664900] Tue, 12 April 2011 13:34 Go to previous messageGo to next message
Glyn Normington is currently offline Glyn NormingtonFriend
Messages: 1222
Registered: July 2009
Senior Member
Thursday would be fine thanks as the Eclipse IP approvals are still coming through.
Re: How to get remote repositories working [message #665084 is a reply to message #664914] Wed, 13 April 2011 08:39 Go to previous messageGo to next message
Glyn Normington is currently offline Glyn NormingtonFriend
Messages: 1222
Registered: July 2009
Senior Member
Hi Joel

I have raised bugs 342675 (for Virgo 2.1) and 342676 (for Virgo 3.0). Please would you attach your doc patches to those bugs.

I plan to ship Virgo 2.1.1 on Friday, so I would be grateful for your patch tomorrow (Thursday).

Thanks,
Glyn
Re: How to get remote repositories working [message #665090 is a reply to message #665084] Wed, 13 April 2011 08:53 Go to previous messageGo to next message
Joel Rosi-Schwartz is currently offline Joel Rosi-SchwartzFriend
Messages: 624
Registered: July 2009
Location: London. England
Senior Member
Thanks for that Glyn. The documentation patches will be no problem for tomorrow. I had already opened Bug 341942 - Configuring Virgo for multiple instances for this, I will mark it as a duplicate.

I also plan on look at Bug 307737 but I do not expect to be able to patch that tomorrow, more likely next week.

Cheers,
Joel
Re: How to get remote repositories working [message #665095 is a reply to message #665090] Wed, 13 April 2011 09:10 Go to previous messageGo to next message
Glyn Normington is currently offline Glyn NormingtonFriend
Messages: 1222
Registered: July 2009
Senior Member
That sounds good, but I'm a little confused. Bug 341942 was about configuring multiple instances of Virgo whereas this forum thread and bugs 342675/6 are about the hosted repository context path.

A patch for bug 307737 would also be great. Something I haven't had a chance to look at (apart from being a little messy it also requires changes to the Windows .bat files in addition to the .sh scripts).

I'd really appreciate it if you could keep the bugs and patches cleanly separated so I can pick and choose what to apply when.

For instance, the patches for bugs 342675/6 should be simple to produce and for me to eye-ball and consume. The patch for bug 341942 is likely to be rather more involved and I'd like the option of taking more time over it if necessary.

Hope you understand. Believe me, I'm not trying to make extra work here!
Re: How to get remote repositories working [message #665098 is a reply to message #665095] Wed, 13 April 2011 09:23 Go to previous messageGo to next message
Joel Rosi-Schwartz is currently offline Joel Rosi-SchwartzFriend
Messages: 624
Registered: July 2009
Location: London. England
Senior Member
Ah of course... not had my first cup of coffee yet. I can commit to both doc patches on 2.1 and master tomorrow.

Smile
Re: How to get remote repositories working [message #665099 is a reply to message #665098] Wed, 13 April 2011 09:25 Go to previous messageGo to next message
Glyn Normington is currently offline Glyn NormingtonFriend
Messages: 1222
Registered: July 2009
Senior Member
perfect
Re: How to get remote repositories working [message #665101 is a reply to message #665095] Wed, 13 April 2011 09:26 Go to previous messageGo to next message
Joel Rosi-Schwartz is currently offline Joel Rosi-SchwartzFriend
Messages: 624
Registered: July 2009
Location: London. England
Senior Member
Glyn Normington wrote on Wed, 13 April 2011 10:10

Hope you understand. Believe me, I'm not trying to make extra work here!

Surely, that's the only sensible way to make patches, one bug per patch.
Re: How to get remote repositories working [message #665366 is a reply to message #665084] Thu, 14 April 2011 12:59 Go to previous messageGo to next message
Joel Rosi-Schwartz is currently offline Joel Rosi-SchwartzFriend
Messages: 624
Registered: July 2009
Location: London. England
Senior Member
Glyn,

Patches are complete and attached to the relevant bugs. Getting the hang of Git, been reading the Git Community book, but at the moment it is still a bit awkward. Spent two hours on the patches, 10 minutes with the fixes and the rest working through git and Egit.

What would be really appreciated is if you could have one of the admins look at fixing org.eclipse.virgo.documentation.git. I have tried ide.git and Egit is happy with it so it is not a generic issue. I spent far too much time going back and for forth between the command line and eclipse, and I had to wipe the local repo and start over for each change.

Cheers,
Joel
Re: How to get remote repositories working [message #665375 is a reply to message #665366] Thu, 14 April 2011 13:34 Go to previous messageGo to next message
Glyn Normington is currently offline Glyn NormingtonFriend
Messages: 1222
Registered: July 2009
Senior Member
Thanks for the patches, both applied and pushed.

Sorry to hear about your git issues. Usually git is a dream after the scars from brain surgery heal up. But seriously, please raise a bug about the issues with the documentation repo and we'll look into it.
Re: How to get remote repositories working [message #665386 is a reply to message #665375] Thu, 14 April 2011 14:04 Go to previous messageGo to next message
Joel Rosi-Schwartz is currently offline Joel Rosi-SchwartzFriend
Messages: 624
Registered: July 2009
Location: London. England
Senior Member
I have done some testing and this is not a Virgo repo issue, but a problem with my egit. I tested a number of repos from Virgo and ide was the only that was successful. I then went to git hub and tried a few from there and they also fail with the same error. Googling on the error returns on my post so I figure I have a corrupted Egit. Will try with a clean STS and proceed from there, But not your worry,
Re: How to get remote repositories working [message #665387 is a reply to message #665386] Thu, 14 April 2011 14:05 Go to previous message
Glyn Normington is currently offline Glyn NormingtonFriend
Messages: 1222
Registered: July 2009
Senior Member
okey doke
Previous Topic:Snaps and virgo 2.1
Next Topic:RAP Security
Goto Forum:
  


Current Time: Thu Dec 26 21:00:18 GMT 2024

Powered by FUDForum. Page generated in 0.16949 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top