Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 337536 - [remoteserviceadmin] RemoteReferenceNotFoundException
Summary: [remoteserviceadmin] RemoteReferenceNotFoundException
Status: RESOLVED DUPLICATE of bug 267521
Alias: None
Product: ECF
Classification: RT
Component: ecf.remoteservices (show other bugs)
Version: 3.5.0   Edit
Hardware: PC Windows Vista
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: ecf.core-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-18 04:53 EST by Martin Petzold CLA
Modified: 2013-01-29 17:09 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Petzold CLA 2011-02-18 04:53:35 EST
This Exception is with my use case of RSA (three provider/consumer on one machine). Will have a look at it later.

[log;+0100 2011.02.18 10:50:35:759;WARNING;org.eclipse.ecf.osgi.services.remoteserviceadmin;org.eclipse.core.runtime.Status[plugin=org.eclipse.ecf.osgi.services.remoteserviceadmin;code=2;message=org.eclipse.ecf.osgi.services.remoteserviceadmin.RemoteServiceAdmin:doImportService:getRemoteServiceReferences return null for targetID=r-osgi://jumper:9280,idFilter=[Lorg.eclipse.ecf.core.identity.ID;@1520a48c,intf=devsosgi.simulator.ISimulator,rsFilter=(&(ecf.rsvc.id=69)) on rsContainerID=r-osgi://jumper:9279;severity2;exception=null;children=[]]]
[log;+0100 2011.02.18 10:50:35:760;ERROR;org.eclipse.ecf.osgi.services.remoteserviceadmin;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://jumper:9280,idFilter=[Lorg.eclipse.ecf.core.identity.ID;@1520a48c,interfaces=[devsosgi.simulator.ISimulator, devsosgi.simulator.IAtomicSimulator],rsFilter=(&(ecf.rsvc.id=69)),rsContainerID=r-osgi://jumper:9279;severity4;exception=RemoteReferenceNotFoundException[targetID=r-osgi://jumper:9280, idFilter=[r-osgi://jumper:9279], interfaces=[devsosgi.simulator.ISimulator, devsosgi.simulator.IAtomicSimulator], rsFilter=(&(ecf.rsvc.id=69))];children=[]]]
RemoteReferenceNotFoundException[targetID=r-osgi://jumper:9280, idFilter=[r-osgi://jumper:9279], interfaces=[devsosgi.simulator.ISimulator, devsosgi.simulator.IAtomicSimulator], rsFilter=(&(ecf.rsvc.id=69))]
	at org.eclipse.ecf.osgi.services.remoteserviceadmin.RemoteServiceAdmin.importService(RemoteServiceAdmin.java:1862)
	at org.eclipse.ecf.osgi.services.remoteserviceadmin.RemoteServiceAdmin.importService(RemoteServiceAdmin.java:295)
	at org.eclipse.ecf.osgi.services.remoteserviceadmin.AbstractTopologyManager.handleEndpointAdded(AbstractTopologyManager.java:207)
	at org.eclipse.ecf.internal.osgi.services.distribution.BasicTopologyManager.endpointAdded(BasicTopologyManager.java:45)
	at org.eclipse.ecf.osgi.services.remoteserviceadmin.EndpointDescriptionLocator$1.dispatchEvent(EndpointDescriptionLocator.java:149)
	at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:227)
	at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:337)
[log;+0100 2011.02.18 10:50:35:772;ERROR;org.eclipse.ecf.osgi.services.remoteserviceadmin;org.eclipse.core.runtime.Status[plugin=org.eclipse.ecf.osgi.services.remoteserviceadmin;code=4;message=org.eclipse.ecf.internal.osgi.services.distribution.BasicTopologyManager:handleInvalidImportRegistration:importRegistration=ImportRegistration[importEndpoint=ImportEndpoint[rsReference=null, proxyRegistration=null, importReference=null]];severity4;exception=RemoteReferenceNotFoundException[targetID=r-osgi://jumper:9280, idFilter=[r-osgi://jumper:9279], interfaces=[devsosgi.simulator.ISimulator, devsosgi.simulator.IAtomicSimulator], rsFilter=(&(ecf.rsvc.id=69))];children=[]]]
RemoteReferenceNotFoundException[targetID=r-osgi://jumper:9280, idFilter=[r-osgi://jumper:9279], interfaces=[devsosgi.simulator.ISimulator, devsosgi.simulator.IAtomicSimulator], rsFilter=(&(ecf.rsvc.id=69))]
	at org.eclipse.ecf.osgi.services.remoteserviceadmin.RemoteServiceAdmin.importService(RemoteServiceAdmin.java:1862)
	at org.eclipse.ecf.osgi.services.remoteserviceadmin.RemoteServiceAdmin.importService(RemoteServiceAdmin.java:295)
	at org.eclipse.ecf.osgi.services.remoteserviceadmin.AbstractTopologyManager.handleEndpointAdded(AbstractTopologyManager.java:207)
	at org.eclipse.ecf.internal.osgi.services.distribution.BasicTopologyManager.endpointAdded(BasicTopologyManager.java:45)
	at org.eclipse.ecf.osgi.services.remoteserviceadmin.EndpointDescriptionLocator$1.dispatchEvent(EndpointDescriptionLocator.java:149)
	at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:227)
	at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:337)
Comment 1 Scott Lewis CLA 2011-02-18 10:59:03 EST
Hi Martin.

In looking at the output, there is something that seems wrong (I'm not sure where the error is...it may indeed be a bug, but I'm not sure yet).

Specifically,

RemoteReferenceNotFoundException[targetID=r-osgi://jumper:9280,
idFilter=[r-osgi://jumper:9279], interfaces=[devsosgi.simulator.ISimulator,
devsosgi.simulator.IAtomicSimulator], rsFilter=(&(ecf.rsvc.id=69))]


The targetID = r-osgi://jumper:9280
and the idFilter = r-osgi://jumper:9279

typically these would be the *same*.  I don't understand how these would be different unless explicitly set to be different on service registration.

Could you detail on this bug what (if any) service properties you are setting in your service registration?  Thanks.
Comment 2 Martin Petzold CLA 2011-02-18 12:19:14 EST
Hi Scott,

Properties properties = new Properties();
properties.put("service.exported.interfaces", "*");
properties.put("service.exported.configs", DEVSOSGiConfiguration.CONTAINER_TYPE);
properties.put("devsosgi.component.id", component.id());
properties.put("devsosgi.node.id", node_id);
ServiceRegistration simulatorRegistration = Activator.getContext().registerService(new String[]{ISimulator.class.getName(), IAtomicSimulator.class.getName()}, new AtomicSimulator(component), properties);

DEVSOSGiConfiguration.CONTAINER_TYPE = "ecf.r_osgi.peer";

I think this is because I have a more complex "topology"(?):

Controller (an OSGi framework instance)
----------------------------------------

-> tracks remote INode Service and ISimulator Services

Node A...n (OSGi framework instances)
--------------------------------------

-> registers a remote INode Service
-> registers n remote ISimulator+IAtomicSimulator Services
-> tracks own and other remote ISimulator Services

...and even more complex, these are the top level services! Also there is an ISimulatorAsync Interface. I can test all of this also only inside of one OSGi framework, this works great, it's just the distribution.

If it's the same problem as with 3.4 it is:
1. first remote ISimulator Service registered, lets say by *Node A* -> r-osgi://jumper:9279
2. On consumer side (Controller, could als be another Node) there is a (consumer) container created.
3.  second remote ISimulator Service (same service type!) registered, lets say by *Node B* -> r-osgi://jumper:9280.
-> Now the same consumer container is used, but there should be created another one, because there is a different target (*Node B*) responsible for this second service.

With 3.4 I had the container connect Exception (https://bugs.eclipse.org/bugs/show_bug.cgi?id=334787). I'm not sure, but this could be still the same problem.

I can't look at this at the moment, will work on it this weekend.

In my opinion this is no special topology use case, as e.g laod balancing or redirection, it's just 1..n services with the same service type on each side.
Comment 3 Scott Lewis CLA 2011-02-18 12:40:17 EST
Hi Martin,

(In reply to comment #2)
> Hi Scott,
> 
> Properties properties = new Properties();
> properties.put("service.exported.interfaces", "*");
> properties.put("service.exported.configs",
> DEVSOSGiConfiguration.CONTAINER_TYPE);
> properties.put("devsosgi.component.id", component.id());
> properties.put("devsosgi.node.id", node_id);
> ServiceRegistration simulatorRegistration =
> Activator.getContext().registerService(new String[]{ISimulator.class.getName(),
> IAtomicSimulator.class.getName()}, new AtomicSimulator(component), properties);
> 
> DEVSOSGiConfiguration.CONTAINER_TYPE = "ecf.r_osgi.peer";
> 
> I think this is because I have a more complex "topology"(?):

I think it's more likely to be because of r-osgi's policies wrt running on localhost.  I expect you are trying to run mulitple processes...i.e. one on 9279 and the other on 9280...and perhaps the container selector is getting confused about which one to use for export?

> 
> Controller (an OSGi framework instance)
> ----------------------------------------
> 
> -> tracks remote INode Service and ISimulator Services
> 
> Node A...n (OSGi framework instances)
> --------------------------------------
> 
> -> registers a remote INode Service
> -> registers n remote ISimulator+IAtomicSimulator Services
> -> tracks own and other remote ISimulator Services
> 
> ...and even more complex, these are the top level services! Also there is an
> ISimulatorAsync Interface. I can test all of this also only inside of one OSGi
> framework, this works great, it's just the distribution.

Right...so it looks like some of the services are exposed by one framework, and other exposed by other frameworks...is that right?

Is more than one r-osgi container created within a single framework?  That is...is there more than one r-osgi container instance created inside one process?

> 
> If it's the same problem as with 3.4 it is:
> 1. first remote ISimulator Service registered, lets say by *Node A* ->
> r-osgi://jumper:9279
> 2. On consumer side (Controller, could als be another Node) there is a
> (consumer) container created.
> 3.  second remote ISimulator Service (same service type!) registered, lets say
> by *Node B* -> r-osgi://jumper:9280.
> -> Now the same consumer container is used, but there should be created another
> one, because there is a different target (*Node B*) responsible for this second
> service.

I see.  This is, IMHO, a weakness with r-osgi...it sort of 'wants' to have a separate container for a given consumer...but by default it opens a new server port with every new container instance...which isn't what you want on the consumer...at least for this use case.

But on the consumers...do you want the container to disconnect from the first remote service and connect to the second one?  or do you want to access both?

> 
> With 3.4 I had the container connect Exception
> (https://bugs.eclipse.org/bugs/show_bug.cgi?id=334787). I'm not sure, but this
> could be still the same problem.
> 
> I can't look at this at the moment, will work on it this weekend.

Ok.  If we need to correspond about this feel free to contact me directly at slewis at composent.com.

> 
> In my opinion this is no special topology use case, as e.g laod balancing or
> redirection, it's just 1..n services with the same service type on each side.

I think it is sort of a special topology use case, because the consumer has to to decide:  does the same service instance from two different nodes have to be imported at the same time?  Or can the first service be removed in favor of the second?
Comment 4 Scott Lewis CLA 2013-01-29 17:09:09 EST
As per comment #3 resolving as invalid.  The associated r-osgi feature request is bug 267521.

*** This bug has been marked as a duplicate of bug 267521 ***