Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Virgo » Remote hosted repository and bundle start
icon5.gif  Remote hosted repository and bundle start [message #643579] Tue, 07 December 2010 14:13 Go to next message
Lorie Pisicchio is currently offline Lorie PisicchioFriend
Messages: 44
Registered: October 2010
Member
Hi!
I try to configure a Virgo Web Server to be a hosted repository, and another one to have a remote repository. I followed the documentation as described here : http://www.eclipse.org/virgo/documentation/virgo-documentati on-2.1.0.RELEASE/docs/virgo-user-guide/htmlsingle/virgo-user -guide.html#configuring-hosted-repo
but it was not successful. The URI is not even reachable from a browser.
After a few tries, I finally decided to use the org.eclipse.virgo.apps.repository.properties to publish the repository. On the other Virgo instance, I declared a remote repository as declared in the doc. this time, it works. When VWS starts, I can read the message <RP0051I> The repository 'mos-remote' is available.
Is it normal that hosted repository configuration is in the **.apps.repository.** file? In this case, maybe the documentation is not up-to-date.

Then, I try to start a plan by droppping it into the pickup directory of VWS. The bundles included in the path are available on the other instance of Virgo, inside the hosted repository. The installation of the plan fails with the following error :
<DE0002E> Installation of plan 'mos-core.plan' version '3.0.0.SNAPSHOT' failed. java.lang.NullPointerException: null
	at java.io.File.<init>(File.java:360)
	at org.eclipse.virgo.kernel.install.artifact.internal.StandardInstallArtifactTreeInclosure.createInstallTree(StandardInstallArtifactTreeInclosure.java:102)
	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)
	at org.eclipse.virgo.kernel.install.pipeline.stage.transform.internal.TransformationStage.doProcessTree(TransformationStage.java:55)
	at org.eclipse.virgo.kernel.install.pipeline.stage.AbstractPipelineStage.process(AbstractPipelineStage.java:41)
	at org.eclipse.virgo.kernel.install.pipeline.internal.StandardPipeline.doProcessTree(StandardPipeline.java:62)
	at org.eclipse.virgo.kernel.install.pipeline.internal.CompensatingPipeline.doProcessTree(CompensatingPipeline.java:72)
	at org.eclipse.virgo.kernel.install.pipeline.stage.AbstractPipelineStage.process(AbstractPipelineStage.java:41)
	at org.eclipse.virgo.kernel.install.pipeline.internal.StandardPipeline.doProcessTree(StandardPipeline.java:62)
	at org.eclipse.virgo.kernel.install.pipeline.stage.AbstractPipelineStage.process(AbstractPipelineStage.java:41)
	at org.eclipse.virgo.kernel.deployer.core.internal.PipelinedApplicationDeployer.driveInstallPipeline(PipelinedApplicationDeployer.java:271)
	at org.eclipse.virgo.kernel.deployer.core.internal.PipelinedApplicationDeployer.doInstall(PipelinedApplicationDeployer.java:151)
	at org.eclipse.virgo.kernel.deployer.core.internal.PipelinedApplicationDeployer.install(PipelinedApplicationDeployer.java:123)
	at org.eclipse.virgo.kernel.deployer.core.internal.PipelinedApplicationDeployer.deploy(PipelinedApplicationDeployer.java:190)
	at org.eclipse.virgo.kernel.deployer.hot.HotDeploymentFileSystemListener.deploy(HotDeploymentFileSystemListener.java:174)
	at org.eclipse.virgo.kernel.deployer.hot.HotDeploymentFileSystemListener.deployIfNotDeployed(HotDeploymentFileSystemListener.java:186)
	at org.eclipse.virgo.kernel.deployer.hot.HotDeploymentFileSystemListener.onChange(HotDeploymentFileSystemListener.java:87)
	at org.eclipse.virgo.util.io.FileSystemChecker.notifyListeners(FileSystemChecker.java:245)
	at org.eclipse.virgo.util.io.FileSystemChecker.check(FileSystemChecker.java:166)
	at org.eclipse.virgo.kernel.deployer.hot.WatchTask.run(WatchTask.java:58)
	at java.lang.Thread.run(Thread.java:619)

If I shutdown the VWS hosting the repository, I get a "normal" error unable to satisfy dependency.
So I assume the bundles are found in the remote repository, but they can not start.
Can someone help with this error? How are the bundles supposed to be started? Will they be copied on the local VWS instance, and started there, or will they be started in the remote VWS and used over the network?
If the second option is the correct one, then how is the remote service invocation implemented?

Thanx in advance.

[Updated on: Fri, 10 December 2010 10:48]

Report message to a moderator

Re: Remote hosted repository and bundle start [message #644281 is a reply to message #643579] Fri, 10 December 2010 11:32 Go to previous messageGo to next message
Glyn Normington is currently offline Glyn NormingtonFriend
Messages: 1222
Registered: July 2009
Senior Member
Lorie Pisicchio wrote on Tue, 07 December 2010 14:13
Hi!
I try to configure a Virgo Web Server to be a hosted repository, and another one to have a remote repository. I followed the documentation as described here : http://www.eclipse.org/virgo/documentation/virgo-documentati on-2.1.0.RELEASE/docs/virgo-user-guide/htmlsingle/virgo-user -guide.html#configuring-hosted-repo
but it was not successful. The URI is not even reachable from a browser.
After a few tries, I finally decided to use the org.eclipse.virgo.apps.repository.properties to publish the repository. On the other Virgo instance, I declared a remote repository as declared in the doc. this time, it works. When VWS starts, I can read the message <RP0051I> The repository 'mos-remote' is available.
Is it normal that hosted repository configuration is in the **.apps.repository.** file? In this case, maybe the documentation is not up-to-date.

This is a documentation bug. Well spotted! I have raised bug 332293 to fix this.
Quote:

Then, I try to start a plan by droppping it into the pickup directory of VWS. The bundles included in the path are available on the other instance of Virgo, inside the hosted repository. The installation of the plan fails with the following error :
<DE0002E> Installation of plan 'mos-core.plan' version '3.0.0.SNAPSHOT' failed. java.lang.NullPointerException: null
	at java.io.File.<init>(File.java:360)
	at org.eclipse.virgo.kernel.install.artifact.internal.StandardInstallArtifactTreeInclosure.createInstallTree(StandardInstallArtifactTreeInclosure.java:102)
	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)
	at org.eclipse.virgo.kernel.install.pipeline.stage.transform.internal.TransformationStage.doProcessTree(TransformationStage.java:55)
	at org.eclipse.virgo.kernel.install.pipeline.stage.AbstractPipelineStage.process(AbstractPipelineStage.java:41)
	at org.eclipse.virgo.kernel.install.pipeline.internal.StandardPipeline.doProcessTree(StandardPipeline.java:62)
	at org.eclipse.virgo.kernel.install.pipeline.internal.CompensatingPipeline.doProcessTree(CompensatingPipeline.java:72)
	at org.eclipse.virgo.kernel.install.pipeline.stage.AbstractPipelineStage.process(AbstractPipelineStage.java:41)
	at org.eclipse.virgo.kernel.install.pipeline.internal.StandardPipeline.doProcessTree(StandardPipeline.java:62)
	at org.eclipse.virgo.kernel.install.pipeline.stage.AbstractPipelineStage.process(AbstractPipelineStage.java:41)
	at org.eclipse.virgo.kernel.deployer.core.internal.PipelinedApplicationDeployer.driveInstallPipeline(PipelinedApplicationDeployer.java:271)
	at org.eclipse.virgo.kernel.deployer.core.internal.PipelinedApplicationDeployer.doInstall(PipelinedApplicationDeployer.java:151)
	at org.eclipse.virgo.kernel.deployer.core.internal.PipelinedApplicationDeployer.install(PipelinedApplicationDeployer.java:123)
	at org.eclipse.virgo.kernel.deployer.core.internal.PipelinedApplicationDeployer.deploy(PipelinedApplicationDeployer.java:190)
	at org.eclipse.virgo.kernel.deployer.hot.HotDeploymentFileSystemListener.deploy(HotDeploymentFileSystemListener.java:174)
	at org.eclipse.virgo.kernel.deployer.hot.HotDeploymentFileSystemListener.deployIfNotDeployed(HotDeploymentFileSystemListener.java:186)
	at org.eclipse.virgo.kernel.deployer.hot.HotDeploymentFileSystemListener.onChange(HotDeploymentFileSystemListener.java:87)
	at org.eclipse.virgo.util.io.FileSystemChecker.notifyListeners(FileSystemChecker.java:245)
	at org.eclipse.virgo.util.io.FileSystemChecker.check(FileSystemChecker.java:166)
	at org.eclipse.virgo.kernel.deployer.hot.WatchTask.run(WatchTask.java:58)
	at java.lang.Thread.run(Thread.java:619)

If I shutdown the VWS hosting the repository, I get a "normal" error unable to satisfy dependency.
So I assume the bundles are found in the remote repository, but they can not start.
Can someone help with this error? How are the bundles supposed to be started? Will they be copied on the local VWS instance, and started there, or will they be started in the remote VWS and used over the network?
If the second option is the correct one, then how is the remote service invocation implemented?

Thanx in advance.

The bundles are supposed to be copied to a cache in the work directory of the local VWS instance and then installed and started in the local VWS instance.

It seems that for some reason the file transfer is either not happening or is failing. You could have a dig around in the work directory to see if there are any clues.

Note that the remote repository index contains a hash of the bundle contents so that the copy in the cache (in the local VWS instance) can be checked for being up to date. Initially or if the hash in the index does not match the hash of the cached bundle (if there is one), we transfer the file from the remote repository to the cache. This transfer process uses HTTP, so I wonder if there is something unusual in your setup which is causing this problem.

Hope that helps. If the problem can be re-created and encapsulated in a bugzilla, please feel free to raise one.
Re: Remote hosted repository and bundle start [message #644626 is a reply to message #644281] Mon, 13 December 2010 14:22 Go to previous messageGo to next message
Lorie Pisicchio is currently offline Lorie PisicchioFriend
Messages: 44
Registered: October 2010
Member
Thank you Glyn for your answer.
Your tips are always very useful.
Looking at the cache folder, I find an empty folder with the name of the bundle I'm trying to download.
In the log file, I find the following error : Error accessing repository artifact java.net.UnknownHostException: fred-desktop
Actually, in the mos-remote.descriptors that is downloaded in the work directory, the bundle uris start with http://fred-desktop:8080/org.eclipse.virgo.apps.repository/h osted-mos/, whereas, in my config file, I was uding the IP address to configure the repository.

So it seems that Virgo doesn't use the IP of the hosted repository as host name, but the name of the PC. But the URIs with the PC name are not reachable from another PC in the network (we need to use the IP address). Is there a way to configure how this bundles are exported (ie configure the exact URI) on the hosted repository side?
Re: Remote hosted repository and bundle start [message #644778 is a reply to message #644626] Tue, 14 December 2010 08:36 Go to previous messageGo to next message
Glyn Normington is currently offline Glyn NormingtonFriend
Messages: 1222
Registered: July 2009
Senior Member
The class HostedRepositoryUriMapper contains this:
String hostname = InetAddress.getLocalHost().getCanonicalHostName();
this.uriPrefix = String.format("http://%s:%s/org.eclipse.virgo.apps.repository/%s", hostname, port, repositoryName);


So the current behaviour of using host name instead of IP address in the remote repository index is hardcoded.

Please would you raise an enhancement bugzilla to record your requirement.

[Updated on: Tue, 14 December 2010 08:39]

Report message to a moderator

Re: Remote hosted repository and bundle start [message #644812 is a reply to message #644778] Tue, 14 December 2010 10:11 Go to previous messageGo to next message
Lorie Pisicchio is currently offline Lorie PisicchioFriend
Messages: 44
Registered: October 2010
Member
Thanx Glyn,
I will raise an enhancement bugzilla.
In the mean time, I found a way to configure the host machine so that it becomes reachable by the client. I simply modified the /etc/hostname file, and append .local to the machine name. Now the URI can be resolved, and the bundles are successfully downloaded.

Regards,
Lorie.
Re: Remote hosted repository and bundle start [message #644817 is a reply to message #644812] Tue, 14 December 2010 10:30 Go to previous message
Glyn Normington is currently offline Glyn NormingtonFriend
Messages: 1222
Registered: July 2009
Senior Member
Glad you found a workaround. Thanks for raising the bug.
Previous Topic:Snaps Installation Blog Post
Next Topic:Virgo milestone 4 has shipped
Goto Forum:
  


Current Time: Mon Nov 24 20:20:42 GMT 2014

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

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