Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Communications Framework (ECF) » ContainerConnectException / Connection refused using R-OSGi
ContainerConnectException / Connection refused using R-OSGi [message #779861] Mon, 16 January 2012 17:35 Go to next message
Pablo Mising name is currently offline Pablo Mising nameFriend
Messages: 24
Registered: July 2010
Junior Member
Hi all.

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


The bundles available in HOST are:

Quote:

id State Bundle
0 ACTIVE org.eclipse.osgi_3.7.1.R37x_v20110808-1106
1 ACTIVE org.eclipse.equinox.concurrent_1.0.200.v20110502
2 ACTIVE org.objectweb.asm_3.3.1.v201105211655
3 ACTIVE org.eclipse.core.contenttype_3.4.100.v20110423-0524
4 ACTIVE ch.ethz.iks.r_osgi.remote_1.0.0.RC4_v20111230-0120
5 ACTIVE org.eclipse.ecf_3.1.300.v20110531-2218
6 ACTIVE org.eclipse.ecf.identity_3.1.100.v20110531-2218
7 ACTIVE OsgiliathFunctionsProblems_1.0.0.qualifier
8 ACTIVE org.eclipse.ecf.discovery_4.0.0.v20111230-0120
9 ACTIVE org.eclipse.ecf.provider.jmdns_4.1.0.v20111230-0120
10 ACTIVE org.eclipse.equinox.preferences_3.4.1.R37x_v20110725
11 ACTIVE org.eclipse.ecf.osgi.services.remoteserviceadmin.proxy_1.0.0.v20111230-0120
12 ACTIVE es.ugr.osgiliath_1.0.0
13 ACTIVE org.eclipse.ecf.provider_4.2.100.v20111230-0120
14 ACTIVE org.eclipse.equinox.ds_1.3.1.R37x_v20110701
15 ACTIVE org.eclipse.ecf.remoteservice_6.0.200.v20111230-0120
16 ACTIVE org.eclipse.equinox.util_1.0.300.v20110502
17 ACTIVE org.eclipse.ecf.osgi.services.distribution_2.0.100.v20111230-0120
18 ACTIVE org.eclipse.ecf.osgi.services.remoteserviceadmin_2.0.100.v20111230-0120
19 ACTIVE org.eclipse.equinox.registry_3.5.101.R37x_v20110810-1611
20 ACTIVE OsgiliathBasicEvolutionaryComponents_1.0.0.qualifier
21 ACTIVE org.eclipse.core.jobs_3.5.100.v20110404
22 ACTIVE org.eclipse.osgi.services_3.3.0.v20110513
23 ACTIVE org.eclipse.osgi.services.remoteserviceadmin_1.0.0.v20111201-0027
24 ACTIVE org.eclipse.equinox.app_1.3.100.v20110321
25 ACTIVE org.eclipse.ecf.provider.r_osgi_3.2.0.v20111230-0120
26 ACTIVE OsgiliathEvolutionaryAlgorithm_1.0.0
27 ACTIVE org.eclipse.core.runtime_3.7.0.v20110110
28 ACTIVE org.eclipse.equinox.common_3.6.0.v20110523
29 ACTIVE ch.ethz.iks.slp_1.1.0.v20111230-0120
30 ACTIVE org.eclipse.ecf.sharedobject_2.2.100.v20111230-0120


And in CONSUMER:

Quote:

id State Bundle
0 ACTIVE org.eclipse.osgi_3.7.1.R37x_v20110808-1106
1 ACTIVE org.eclipse.equinox.concurrent_1.0.200.v20110502
2 ACTIVE org.objectweb.asm_3.3.1.v201105211655
3 ACTIVE org.eclipse.core.contenttype_3.4.100.v20110423-0524
4 ACTIVE ch.ethz.iks.r_osgi.remote_1.0.0.RC4_v20111230-0120
5 ACTIVE org.eclipse.ecf_3.1.300.v20110531-2218
6 ACTIVE org.eclipse.ecf.identity_3.1.100.v20110531-2218
7 ACTIVE OsgiliathFunctionsProblems_1.0.0.qualifier
8 ACTIVE org.eclipse.ecf.discovery_4.0.0.v20111230-0120
9 ACTIVE org.eclipse.ecf.provider.jmdns_4.1.0.v20111230-0120
10 ACTIVE org.eclipse.equinox.preferences_3.4.1.R37x_v20110725
11 ACTIVE org.eclipse.ecf.osgi.services.remoteserviceadmin.proxy_1.0.0.v20111230-0120
12 ACTIVE es.ugr.osgiliath_1.0.0
13 ACTIVE org.eclipse.ecf.provider_4.2.100.v20111230-0120
14 ACTIVE org.eclipse.equinox.ds_1.3.1.R37x_v20110701
15 ACTIVE org.eclipse.ecf.remoteservice_6.0.200.v20111230-0120
16 ACTIVE org.eclipse.equinox.util_1.0.300.v20110502
17 ACTIVE org.eclipse.ecf.osgi.services.distribution_2.0.100.v20111230-0120
18 ACTIVE org.eclipse.ecf.osgi.services.remoteserviceadmin_2.0.100.v20111230-0120
19 ACTIVE org.eclipse.equinox.registry_3.5.101.R37x_v20110810-1611
20 ACTIVE OsgiliathBasicEvolutionaryComponents_1.0.0.qualifier
21 ACTIVE org.eclipse.core.jobs_3.5.100.v20110404
22 ACTIVE org.eclipse.osgi.services_3.3.0.v20110513
23 ACTIVE OsgiliathExperimentLauncher_1.0.0.qualifier
24 ACTIVE org.eclipse.osgi.services.remoteserviceadmin_1.0.0.v20111201-0027
25 ACTIVE org.eclipse.equinox.app_1.3.100.v20110321
26 ACTIVE org.eclipse.ecf.provider.r_osgi_3.2.0.v20111230-0120
27 ACTIVE OsgiliathEvolutionaryAlgorithm_1.0.0
28 ACTIVE org.eclipse.core.runtime_3.7.0.v20110110
29 ACTIVE org.eclipse.equinox.common_3.6.0.v20110523
30 ACTIVE ch.ethz.iks.slp_1.1.0.v20111230-0120
31 ACTIVE org.eclipse.ecf.sharedobject_2.2.100.v20111230-0120


Properties set in the Component Declaration of the remote service (host) are:
 <property name="service.exported.interfaces" type="String" value="*"/>
   <!-- ECF GENERIC -->
   <!--<property name="service.exported.configs" type="String" value="ecf.generic.server"/>
   <property name="ecf.exported.containerfactoryargs" type="String" value="ecftcp://localhost:3788/server"/> This part works with the appropiate bundles-->
   <!-- R-OSGI -->
   <property name="service.exported.configs" type="String" value="ecf.r_osgi.peer"/>
   <property name="ecf.exported.containerfactoryargs" type="String" value="r-osgi://localhost:3999/server"/>
 


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).

Thanks in advance!


Re: ContainerConnectException / Connection refused using R-OSGi [message #779866 is a reply to message #779861] Mon, 16 January 2012 17:46 Go to previous messageGo to next message
Markus Kuppe is currently offline Markus KuppeFriend
Messages: 177
Registered: July 2009
Senior Member
On 01/16/2012 09:35 AM, Pablo Mising name wrote:
> Hi all.
> 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
>
>
> The bundles available in HOST are:
>
> Quote:
>> id State Bundle
>> 0 ACTIVE org.eclipse.osgi_3.7.1.R37x_v20110808-1106
>> 1 ACTIVE org.eclipse.equinox.concurrent_1.0.200.v20110502
>> 2 ACTIVE org.objectweb.asm_3.3.1.v201105211655
>> 3 ACTIVE org.eclipse.core.contenttype_3.4.100.v20110423-0524
>> 4 ACTIVE ch.ethz.iks.r_osgi.remote_1.0.0.RC4_v20111230-0120
>> 5 ACTIVE org.eclipse.ecf_3.1.300.v20110531-2218
>> 6 ACTIVE org.eclipse.ecf.identity_3.1.100.v20110531-2218
>> 7 ACTIVE OsgiliathFunctionsProblems_1.0.0.qualifier
>> 8 ACTIVE org.eclipse.ecf.discovery_4.0.0.v20111230-0120
>> 9 ACTIVE org.eclipse.ecf.provider.jmdns_4.1.0.v20111230-0120
>> 10 ACTIVE org.eclipse.equinox.preferences_3.4.1.R37x_v20110725
>> 11 ACTIVE
>> org.eclipse.ecf.osgi.services.remoteserviceadmin.proxy_1.0.0.v20111230-0120
>>
>> 12 ACTIVE es.ugr.osgiliath_1.0.0
>> 13 ACTIVE org.eclipse.ecf.provider_4.2.100.v20111230-0120
>> 14 ACTIVE org.eclipse.equinox.ds_1.3.1.R37x_v20110701
>> 15 ACTIVE org.eclipse.ecf.remoteservice_6.0.200.v20111230-0120
>> 16 ACTIVE org.eclipse.equinox.util_1.0.300.v20110502
>> 17 ACTIVE
>> org.eclipse.ecf.osgi.services.distribution_2.0.100.v20111230-0120
>> 18 ACTIVE
>> org.eclipse.ecf.osgi.services.remoteserviceadmin_2.0.100.v20111230-0120
>> 19 ACTIVE
>> org.eclipse.equinox.registry_3.5.101.R37x_v20110810-1611
>> 20 ACTIVE OsgiliathBasicEvolutionaryComponents_1.0.0.qualifier
>> 21 ACTIVE org.eclipse.core.jobs_3.5.100.v20110404
>> 22 ACTIVE org.eclipse.osgi.services_3.3.0.v20110513
>> 23 ACTIVE
>> org.eclipse.osgi.services.remoteserviceadmin_1.0.0.v20111201-0027
>> 24 ACTIVE org.eclipse.equinox.app_1.3.100.v20110321
>> 25 ACTIVE org.eclipse.ecf.provider.r_osgi_3.2.0.v20111230-0120
>> 26 ACTIVE OsgiliathEvolutionaryAlgorithm_1.0.0
>> 27 ACTIVE org.eclipse.core.runtime_3.7.0.v20110110
>> 28 ACTIVE org.eclipse.equinox.common_3.6.0.v20110523
>> 29 ACTIVE ch.ethz.iks.slp_1.1.0.v20111230-0120
>> 30 ACTIVE org.eclipse.ecf.sharedobject_2.2.100.v20111230-0120
>
>
> And in CONSUMER:
>
> Quote:
>> id State Bundle
>> 0 ACTIVE org.eclipse.osgi_3.7.1.R37x_v20110808-1106
>> 1 ACTIVE org.eclipse.equinox.concurrent_1.0.200.v20110502
>> 2 ACTIVE org.objectweb.asm_3.3.1.v201105211655
>> 3 ACTIVE org.eclipse.core.contenttype_3.4.100.v20110423-0524
>> 4 ACTIVE ch.ethz.iks.r_osgi.remote_1.0.0.RC4_v20111230-0120
>> 5 ACTIVE org.eclipse.ecf_3.1.300.v20110531-2218
>> 6 ACTIVE org.eclipse.ecf.identity_3.1.100.v20110531-2218
>> 7 ACTIVE OsgiliathFunctionsProblems_1.0.0.qualifier
>> 8 ACTIVE org.eclipse.ecf.discovery_4.0.0.v20111230-0120
>> 9 ACTIVE org.eclipse.ecf.provider.jmdns_4.1.0.v20111230-0120
>> 10 ACTIVE org.eclipse.equinox.preferences_3.4.1.R37x_v20110725
>> 11 ACTIVE
>> org.eclipse.ecf.osgi.services.remoteserviceadmin.proxy_1.0.0.v20111230-0120
>>
>> 12 ACTIVE es.ugr.osgiliath_1.0.0
>> 13 ACTIVE org.eclipse.ecf.provider_4.2.100.v20111230-0120
>> 14 ACTIVE org.eclipse.equinox.ds_1.3.1.R37x_v20110701
>> 15 ACTIVE org.eclipse.ecf.remoteservice_6.0.200.v20111230-0120
>> 16 ACTIVE org.eclipse.equinox.util_1.0.300.v20110502
>> 17 ACTIVE
>> org.eclipse.ecf.osgi.services.distribution_2.0.100.v20111230-0120
>> 18 ACTIVE
>> org.eclipse.ecf.osgi.services.remoteserviceadmin_2.0.100.v20111230-0120
>> 19 ACTIVE
>> org.eclipse.equinox.registry_3.5.101.R37x_v20110810-1611
>> 20 ACTIVE OsgiliathBasicEvolutionaryComponents_1.0.0.qualifier
>> 21 ACTIVE org.eclipse.core.jobs_3.5.100.v20110404
>> 22 ACTIVE org.eclipse.osgi.services_3.3.0.v20110513
>> 23 ACTIVE OsgiliathExperimentLauncher_1.0.0.qualifier
>> 24 ACTIVE
>> org.eclipse.osgi.services.remoteserviceadmin_1.0.0.v20111201-0027
>> 25 ACTIVE org.eclipse.equinox.app_1.3.100.v20110321
>> 26 ACTIVE org.eclipse.ecf.provider.r_osgi_3.2.0.v20111230-0120
>> 27 ACTIVE OsgiliathEvolutionaryAlgorithm_1.0.0
>> 28 ACTIVE org.eclipse.core.runtime_3.7.0.v20110110
>> 29 ACTIVE org.eclipse.equinox.common_3.6.0.v20110523
>> 30 ACTIVE ch.ethz.iks.slp_1.1.0.v20111230-0120
>> 31 ACTIVE org.eclipse.ecf.sharedobject_2.2.100.v20111230-0120
>
>
> Properties set in the Component Declaration of the remote service (host)
> are:
>
> <property name="service.exported.interfaces" type="String" value="*"/>
> <!-- ECF GENERIC -->
> <!--<property name="service.exported.configs" type="String"
> value="ecf.generic.server"/>
> <property name="ecf.exported.containerfactoryargs" type="String"
> value="ecftcp://localhost:3788/server"/> This part works with the
> appropiate bundles-->
> <!-- R-OSGI -->
> <property name="service.exported.configs" type="String"
> value="ecf.r_osgi.peer"/>
> <property name="ecf.exported.containerfactoryargs" type="String"
> value="r-osgi://localhost:3999/server"/>
>
>
>
> 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).
>
> Thanks in advance!
>
>
>

Hi Pablo,

do both host and consumer run on the same machine?

Markus
Re: ContainerConnectException / Connection refused using R-OSGi [message #779877 is a reply to message #779866] Mon, 16 January 2012 18:14 Go to previous messageGo to next message
Pablo Mising name is currently offline Pablo Mising nameFriend
Messages: 24
Registered: July 2010
Junior Member
Yes, in the same machine, I forgot to state that Smile 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!
Re: ContainerConnectException / Connection refused using R-OSGi [message #779887 is a reply to message #779877] Mon, 16 January 2012 18:44 Go to previous messageGo to next message
Markus Kuppe is currently offline Markus KuppeFriend
Messages: 177
Registered: July 2009
Senior Member
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?

Thanks
Markus
Re: ContainerConnectException / Connection refused using R-OSGi [message #780204 is a reply to message #779887] Tue, 17 January 2012 11:17 Go to previous messageGo to next message
Pablo Mising name is currently offline Pablo Mising nameFriend
Messages: 24
Registered: July 2010
Junior Member
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 Wink

Edit: Added here a grep "java" ecfnetstat.txt

Quote:

tcp6 0 0 :::9278 :::* LISTEN 1000 5977987 9573/java
tcp6 0 0 :::9279 :::* LISTEN 1000 5975832 9633/java
udp6 0 0 :::5353 :::* 1000 5975833 9633/java
udp6 0 0 :::5353 :::* 1000 5977988 9573/java
unix 2 [ ] FLUJO CONNECTED 5980185 9633/java
unix 2 [ ] FLUJO CONNECTED 5979669 9573/java
unix 3 [ ] FLUJO CONNECTED 4836126 6262/java
unix 2 [ ] FLUJO CONNECTED 4830169 6262/java
unix 3 [ ] FLUJO CONNECTED 4830166 6262/java

[Updated on: Tue, 17 January 2012 11:20]

Report message to a moderator

Re: ContainerConnectException / Connection refused using R-OSGi [message #780371 is a reply to message #780204] Tue, 17 January 2012 17:13 Go to previous messageGo to next message
Markus Kuppe is currently offline Markus KuppeFriend
Messages: 177
Registered: July 2009
Senior Member
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?

Markus
Re: ContainerConnectException / Connection refused using R-OSGi [message #780566 is a reply to message #780371] Wed, 18 January 2012 16:20 Go to previous messageGo to next message
Pablo Mising name is currently offline Pablo Mising nameFriend
Messages: 24
Registered: July 2010
Junior Member
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!)

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:
proxy.evorq_jchihb.es.ugr.osgiliath.evolutionary.elements.FitnessCalculatorImpl@7fc4a2d3
and
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.
Re: ContainerConnectException / Connection refused using R-OSGi [message #780967 is a reply to message #780566] Thu, 19 January 2012 03:31 Go to previous message
Markus Kuppe is currently offline Markus KuppeFriend
Messages: 177
Registered: July 2009
Senior Member
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.

Thanks
Markus
Re: ContainerConnectException / Connection refused using R-OSGi [message #780968 is a reply to message #780371] Wed, 18 January 2012 16:20 Go to previous message
Pablo Mising name is currently offline Pablo Mising nameFriend
Messages: 24
Registered: July 2010
Junior Member
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!)

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.
Re: ContainerConnectException / Connection refused using R-OSGi [message #780969 is a reply to message #780968] Thu, 19 January 2012 03:31 Go to previous message
Markus Kuppe is currently offline Markus KuppeFriend
Messages: 177
Registered: July 2009
Senior Member
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.

Thanks
Markus
Previous Topic:problems at installing ECF 3.5.3 on Indigo
Next Topic:ECF 3.5.5 released
Goto Forum:
  


Current Time: Fri Dec 19 07:19:17 GMT 2014

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

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