I am testing the performance of the providers available in ECF. I don't have problems using the Zeroconf/Generic mechanisms. However, using R-OSGi I receive the following exception in the Consumer side:

Quote:

!ENTRY org.eclipse.ecf.osgi.services.remoteserviceadmin 4 0 2012-01-16 18:04:54.905
!MESSAGE org.eclipse.core.runtime.Status[plugin=org.eclipse.ecf.osgi.services.remoteserviceadmin;code=4;message=org.eclipse.ecf.osgi.services.remoteserviceadmin.RemoteServiceAdmin:importService:selectRemoteServiceReference returned null for rsRefs=[],targetID=r-osgi://localhost:3999,idFilter=[Lorg.eclipse.ecf.core.identity.ID;@495b0e2c,interfaces=[es.ugr.osgiliath.evolutionary.elements.FitnessCalculator],rsFilter=(&(ecf.rsvc.id=71)),rsContainerID=r-osgi://evorq:9282;severity4;exception=org.eclipse.ecf.core.ContainerConnectException: ;children=[]]
!STACK 0
org.eclipse.ecf.core.ContainerConnectException:
at org.eclipse.ecf.internal.provider.r_osgi.R_OSGiRemoteServiceContainer.connect(R_OSGiRemoteServiceContainer.java:517)
at org.eclipse.ecf.internal.provider.r_osgi.R_OSGiRemoteServiceContainer.getRemoteServiceReferences(R_OSGiRemoteServiceContainer.java:240)
at org.eclipse.ecf.internal.provider.r_osgi.R_OSGiRemoteServiceContainer.getRemoteServiceReferences(R_OSGiRemoteServiceContainer.java:206)
at org.eclipse.ecf.osgi.services.remoteserviceadmin.RemoteServiceAdmin.importService(RemoteServiceAdmin.java:1965)
at org.eclipse.ecf.osgi.services.remoteserviceadmin.RemoteServiceAdmin.importService(RemoteServiceAdmin.java:356)
at org.eclipse.ecf.osgi.services.remoteserviceadmin.AbstractTopologyManager.handleEndpointAdded(AbstractTopologyManager.java:225)
at org.eclipse.ecf.internal.osgi.services.distribution.BasicTopologyManager.endpointAdded(BasicTopologyManager.java:133)
at org.eclipse.ecf.osgi.services.remoteserviceadmin.EndpointDescriptionLocator$1.dispatchEvent(EndpointDescriptionLocator.java:154)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
Caused by: java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:327)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:193)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:180)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:384)
at java.net.Socket.connect(Socket.java:546)
at java.net.Socket.connect(Socket.java:495)
at java.net.Socket.<init>(Socket.java:392)
at java.net.Socket.<init>(Socket.java:206)
at ch.ethz.iks.r_osgi.impl.TCPChannelFactory$TCPChannel.<init>(TCPChannelFactory.java:171)
at ch.ethz.iks.r_osgi.impl.TCPChannelFactory.getConnection(TCPChannelFactory.java:76)
at ch.ethz.iks.r_osgi.impl.ChannelEndpointImpl.<init>(ChannelEndpointImpl.java:212)
at ch.ethz.iks.r_osgi.impl.RemoteOSGiServiceImpl.connect(RemoteOSGiServiceImpl.java:686)
at org.eclipse.ecf.internal.provider.r_osgi.R_OSGiRemoteServiceContainer.doConnect(R_OSGiRemoteServiceContainer.java:525)
at org.eclipse.ecf.internal.provider.r_osgi.R_OSGiRemoteServiceContainer.connect(R_OSGiRemoteServiceContainer.java:506)
... 9 more

I also changed the port in r-osgi:// property to other available ports and machine name (evorq). Zeroconf/generic works, but with different bundles, of course (without ch.ethz.*, o.e.e.provider.jmnds/jslp/r-osgi...).

Running in Eclipse Indigo, with the last version of ECF (3.5.4) in Ubuntu with firewall disabled.

Moreover, when finishing the Host console in Eclipse, a "Terminate Failed" window appears, and I have to kill the java process manually (only with this r-osgi configuration).

Yes, in the same machine, I forgot to state that By now, I am launching client and host with Run Configuration inside Eclipse.

BTW, my idea after solving this is to deploy several instances of the service host in different nodes of a cluster to distribute load and test performance of the providers. As far as I know, the containerfactoryargs in the host's DS component configuration should remain as "localhost:port" (at least in zeroconf/generic), doesn't it?.

On 01/16/2012 10:14 AM, Pablo Mising name wrote:
> Yes, in the same machine, I forgot to state that :) By now, I am
> launching client and host with Run Configuration inside Eclipse.
>
> BTW, my idea after solving this is to deploy several instances of the
> service host in different nodes of a cluster to distribute load and test
> performance of the providers. As far as I know, the containerfactoryargs
> in the host's DS component configuration should remain as
> "localhost:port" (at least in zeroconf/generic), doesn't it?.
>
> Regards!

OK, what is the output of netstat -nape when both host and consumer are
up and running?

Hi Markus. I've uploaded the exit of the netstat to my server. It's available in http://evorq.ugr.es/ecfnetstat.txt (just to avoid adding more noise to the forum and for readability). Also, translated some Spanish words to English (ESCUCHANDO->LISTENING, for example

On 01/17/2012 03:17 AM, Pablo Mising name wrote:
> Hi Markus. I've uploaded the exit of the netstat to my server. It's
> available in http://evorq.ugr.es/ecfnetstat.txt (just to avoid adding
> more noise to the forum and for readability). Also, translated some
> Spanish words to English (ESCUCHANDO->LISTENING, for example ;)

Hi Pablo,

if you look at the netstat output, you will find that r-OSGi doesn't
listen on port 3999 (set in your properties), but rather on the default
port 9278. Is there a reason you need to hard code the port in the
properties?

So, the first FitnessCalculator service binds this two service proxies via DS, and in both services the code is executed in the remote Equinox. Why I have two different proxies? I think I am exporting the remote FitnessCalculator with two different technologies, but I am not pretty sure.

On 01/18/2012 08:20 AM, Pablo Mising name wrote:
> Geez, I'm idiot. I suppossed that I could specify the desired port in
> the properties of the component definition. Setting the port to 9278
> (R-OSGi default port) in the .xml makes the things work.
>
> Thanks for your help! (and sorry for wasting your time!)

Don't blame yourself. To some extend you have just been struck by bug
#267521.

> However (and to avoid create another thread), now I realized there are
> two different imported remote services.
>
> This is a local service implementation that binds other services with
> target (calculatorType=remote). The idea is to do load balancing with
> the other services implementations in different machines.
>
>
> {es.ugr.osgiliath.evolutionary.elements.FitnessCalculator}={calculatorType=distributed,
> component.name=OsgiliathBasicEvolutionaryComponentsDistributedFitness,
> component.id=11, FitnessCalculator.target=(calculatorType=daiwal),
> service.id=72}
> Registered by bundle:
> OsgiliathBasicEvolutionaryComponents_1.0.0.qualifier [20]
> Bundles using service:
> OsgiliathFunctionsProblems_1.0.0.qualifier [7]
> OsgiliathBasicEvolutionaryComponents_1.0.0.qualifier [20]
>
>
> In the local console also there are two other FitnessCalculator service
> proxies. Only another Equinox console with one remote service
> implementation has been launched.
>
>
> {es.ugr.osgiliath.evolutionary.elements.FitnessCalculator}={ecf.rsvc.id=71,
> calculatorType=remote, ecf.rsvc.ranking=0, component.id=12,
> ecf.rsvc.cid=r-osgi://evorq:9278, service.uri=r-osgi://evorq:9278#71,
> ecf.robjectClass=[es.ugr.osgiliath.evolutionary.elements.FitnessCalculator],
> service.id=71, component.name=OsgiliathFunctionsProblemsFitnessCalculator}
> Registered by bundle: R-OSGi Proxy Bundle generated for Endpoint
> r-osgi://evorq:9278#71_0.0.0 [32]
> Bundles using service:
> OsgiliathBasicEvolutionaryComponents_1.0.0.qualifier [20]
> ch.ethz.iks.r_osgi.remote_1.0.0.RC4_v20111230-0120 [4]
>
>
> {es.ugr.osgiliath.evolutionary.elements.FitnessCalculator}={component.name=OsgiliathFunctionsProblemsFitnessCalculator,
> ecf.service.imported.endpoint.service.id=71, ecf.rsvc.ranking=0,
> service.uri=r-osgi://evorq:9278#71, ecf.rsvc.cid=r-osgi://evorq:9278,
> calculatorType=remote,
> ecf.service.imported.endpoint.id=r-osgi://evorq:9278,
> service.imported=org.eclipse.ecf.internal.provider.r_osgi.RemoteServiceImpl@5a9b8ff9,
> service.imported.configs=[ecf.r_osgi.peer], component.id=12, service.id=79}
> Registered by bundle:
> org.eclipse.ecf.osgi.services.remoteserviceadmin.proxy_1.0.0.v20111230-0120
> [11]
> Bundles using service:
> OsgiliathBasicEvolutionaryComponents_1.0.0.qualifier [20]
>
>
> When binding the remote services from the local code, the
> service.toString() method gives me:
> mailto:proxy.evorq_jchihb.es.ugr.osgiliath.evolutionary.elements.FitnessCalculatorImpl@7fc4a2d3
>
> and
> mailto:es.ugr.osgiliath.evolutionary.elements.FitnessCalculator.proxy@org.eclipse.ecf.remoteservice.RemoteServiceID[containerID=r-osgi://evorq:9278;containerRelativeID=71]
>
>
> So, the first FitnessCalculator service binds this two service proxies
> via DS, and in both services the code is executed in the remote Equinox.
> Why I have two different proxies? I think I am exporting the remote
> FitnessCalculator with two different technologies, but I am not pretty
> sure.
>
> Using generic/zeroconf only creates an unique proxy.

This is indeed specific to the r-OSGi provider and ECF remote service
based on top of it. r-OSGi itself registers a service with the service
registry even without ECF remote service. ECF remote services then also
registers a second service. Just use the one provided by ECF RS.

So, the first FitnessCalculator service binds this two service proxies via DS, and in both services the code is executed in the remote Equinox. Why I have two different proxies? I think I am exporting the remote FitnessCalculator with two different technologies, but I am not pretty sure.

On 01/18/2012 08:20 AM, Pablo Mising name wrote:
> Geez, I'm idiot. I suppossed that I could specify the desired port in
> the properties of the component definition. Setting the port to 9278
> (R-OSGi default port) in the .xml makes the things work.
>
> Thanks for your help! (and sorry for wasting your time!)

Don't blame yourself. To some extend you have just been struck by bug
#267521.

> However (and to avoid create another thread), now I realized there are
> two different imported remote services.
>
> This is a local service implementation that binds other services with
> target (calculatorType=remote). The idea is to do load balancing with
> the other services implementations in different machines.
>
>
> {es.ugr.osgiliath.evolutionary.elements.FitnessCalculator}={calculatorType=distributed,
> component.name=OsgiliathBasicEvolutionaryComponentsDistributedFitness,
> component.id=11, FitnessCalculator.target=(calculatorType=daiwal),
> service.id=72}
> Registered by bundle:
> OsgiliathBasicEvolutionaryComponents_1.0.0.qualifier [20]
> Bundles using service:
> OsgiliathFunctionsProblems_1.0.0.qualifier [7]
> OsgiliathBasicEvolutionaryComponents_1.0.0.qualifier [20]
>
>
> In the local console also there are two other FitnessCalculator service
> proxies. Only another Equinox console with one remote service
> implementation has been launched.
>
>
> {es.ugr.osgiliath.evolutionary.elements.FitnessCalculator}={ecf.rsvc.id=71,
> calculatorType=remote, ecf.rsvc.ranking=0, component.id=12,
> ecf.rsvc.cid=r-osgi://evorq:9278, service.uri=r-osgi://evorq:9278#71,
> ecf.robjectClass=[es.ugr.osgiliath.evolutionary.elements.FitnessCalculator],
> service.id=71, component.name=OsgiliathFunctionsProblemsFitnessCalculator}
> Registered by bundle: R-OSGi Proxy Bundle generated for Endpoint
> r-osgi://evorq:9278#71_0.0.0 [32]
> Bundles using service:
> OsgiliathBasicEvolutionaryComponents_1.0.0.qualifier [20]
> ch.ethz.iks.r_osgi.remote_1.0.0.RC4_v20111230-0120 [4]
>
>
> {es.ugr.osgiliath.evolutionary.elements.FitnessCalculator}={component.name=OsgiliathFunctionsProblemsFitnessCalculator,
> ecf.service.imported.endpoint.service.id=71, ecf.rsvc.ranking=0,
> service.uri=r-osgi://evorq:9278#71, ecf.rsvc.cid=r-osgi://evorq:9278,
> calculatorType=remote,
> ecf.service.imported.endpoint.id=r-osgi://evorq:9278,
> service.imported=org.eclipse.ecf.internal.provider.r_osgi.RemoteServiceImpl@5a9b8ff9,
> service.imported.configs=[ecf.r_osgi.peer], component.id=12, service.id=79}
> Registered by bundle:
> org.eclipse.ecf.osgi.services.remoteserviceadmin.proxy_1.0.0.v20111230-0120
> [11]
> Bundles using service:
> OsgiliathBasicEvolutionaryComponents_1.0.0.qualifier [20]
>
>
> When binding the remote services from the local code, the
> service.toString() method gives me:
> mailto:proxy.evorq_jchihb.es.ugr.osgiliath.evolutionary.elements.FitnessCalculatorImpl@7fc4a2d3
>
> and
> mailto:es.ugr.osgiliath.evolutionary.elements.FitnessCalculator.proxy@org.eclipse.ecf.remoteservice.RemoteServiceID[containerID=r-osgi://evorq:9278;containerRelativeID=71]
>
>
> So, the first FitnessCalculator service binds this two service proxies
> via DS, and in both services the code is executed in the remote Equinox.
> Why I have two different proxies? I think I am exporting the remote
> FitnessCalculator with two different technologies, but I am not pretty
> sure.
>
> Using generic/zeroconf only creates an unique proxy.

This is indeed specific to the r-OSGi provider and ECF remote service
based on top of it. r-OSGi itself registers a service with the service
registry even without ECF remote service. ECF remote services then also
registers a second service. Just use the one provided by ECF RS.