I have a set of OSGi services running in karaf that
are using r_osgi and web sockets to make them available via http
on port 80. I am able to connect to these services from a
client installed on the same machine but not from computers over
the internet.
I think this is due to timeout while waiting to make the
connection from client to server over the Internet. I put the
exceptions received on the client below.
The client throws the following exception after
approximately 20 seconds.
!STACK 0
ch.ethz.iks.r_osgi.RemoteOSGiException: Interrupted while
waiting for callback
at
ch.ethz.iks.r_osgi.impl.ChannelEndpointImpl.sendAndWait(ChannelEndpointImpl.java:1361)
at
ch.ethz.iks.r_osgi.impl.ChannelEndpointImpl.sendLease(ChannelEndpointImpl.java:749)
at
ch.ethz.iks.r_osgi.impl.RemoteOSGiServiceImpl.connect(RemoteOSGiServiceImpl.java:725)
at
org.eclipse.ecf.internal.provider.r_osgi.R_OSGiRemoteServiceContainer.doConnect(R_OSGiRemoteServiceContainer.java:551)
at
org.eclipse.ecf.internal.provider.r_osgi.R_OSGiRemoteServiceContainer.connect(R_OSGiRemoteServiceContainer.java:532)
at
org.eclipse.ecf.internal.provider.r_osgi.R_OSGiRemoteServiceContainer.getRemoteServiceReferences(R_OSGiRemoteServiceContainer.java:251)
at
org.eclipse.ecf.internal.provider.r_osgi.R_OSGiRemoteServiceContainer.getRemoteServiceReferences(R_OSGiRemoteServiceContainer.java:217)
at
org.eclipse.ecf.osgi.services.remoteserviceadmin.RemoteServiceAdmin$14.run(RemoteServiceAdmin.java:2288)
at
org.eclipse.ecf.osgi.services.remoteserviceadmin.RemoteServiceAdmin$14.run(RemoteServiceAdmin.java:1)
at
java.security.AccessController.doPrivileged(Native Method)
at
org.eclipse.ecf.osgi.services.remoteserviceadmin.RemoteServiceAdmin.importService(RemoteServiceAdmin.java:2284)
at
org.eclipse.ecf.osgi.services.remoteserviceadmin.RemoteServiceAdmin.importService(RemoteServiceAdmin.java:428)
at
org.eclipse.ecf.osgi.services.remoteserviceadmin.AbstractTopologyManager.handleECFEndpointAdded(AbstractTopologyManager.java:293)
at
org.eclipse.ecf.internal.osgi.services.distribution.BasicTopologyManagerImpl.handleEndpointAdded(BasicTopologyManagerImpl.java:104)
at
org.eclipse.ecf.internal.osgi.services.distribution.BasicTopologyManagerImpl.endpointChanged(BasicTopologyManagerImpl.java:181)
at
org.eclipse.ecf.internal.osgi.services.distribution.Activator$ProxyEndpointEventListener.deliverSafe(Activator.java:206)
at
org.eclipse.ecf.internal.osgi.services.distribution.Activator$ProxyEndpointEventListener.endpointChanged(Activator.java:183)
at
org.eclipse.ecf.osgi.services.remoteserviceadmin.EndpointDescriptionLocator$1.dispatchEvent(EndpointDescriptionLocator.java:198)
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.lang.InterruptedException
at
java.lang.Object.wait(Native Method)
at
ch.ethz.iks.r_osgi.impl.ChannelEndpointImpl.sendAndWait(ChannelEndpointImpl.java:1357)
...
19 more
119106 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.ws://easa.vogelware.com,idFilter=[Lorg.eclipse.ecf.core.identity.ID;@48b68d98,interfaces=[com.easa.motordb.services.IDcMotorEntity],rsFilter=null,rsContainerID=r-osgi.ws://TimLaptop;severity4;exception=ch.ethz.iks.r_osgi.RemoteOSGiException:
Interrupted while waiting for callback;children=[]]
ch.ethz.iks.r_osgi.RemoteOSGiException: Interrupted while
waiting for callback
at
ch.ethz.iks.r_osgi.impl.ChannelEndpointImpl.sendAndWait(ChannelEndpointImpl.java:1361)
~[na:na]
at
ch.ethz.iks.r_osgi.impl.ChannelEndpointImpl.sendLease(ChannelEndpointImpl.java:749)
~[na:na]
at
ch.ethz.iks.r_osgi.impl.RemoteOSGiServiceImpl.connect(RemoteOSGiServiceImpl.java:725)
~[na:na]
at
org.eclipse.ecf.internal.provider.r_osgi.R_OSGiRemoteServiceContainer.doConnect(R_OSGiRemoteServiceContainer.java:551)
~[na:na]
at
org.eclipse.ecf.internal.provider.r_osgi.R_OSGiRemoteServiceContainer.connect(R_OSGiRemoteServiceContainer.java:532)
~[na:na]
at
org.eclipse.ecf.internal.provider.r_osgi.R_OSGiRemoteServiceContainer.getRemoteServiceReferences(R_OSGiRemoteServiceContainer.java:251)
~[na:na]
at
org.eclipse.ecf.internal.provider.r_osgi.R_OSGiRemoteServiceContainer.getRemoteServiceReferences(R_OSGiRemoteServiceContainer.java:217)
~[na:na]
at
org.eclipse.ecf.osgi.services.remoteserviceadmin.RemoteServiceAdmin$14.run(RemoteServiceAdmin.java:2288)
~[na:na]
at
org.eclipse.ecf.osgi.services.remoteserviceadmin.RemoteServiceAdmin$14.run(RemoteServiceAdmin.java:1)
~[na:na]
at
java.security.AccessController.doPrivileged(Native Method)
~[na:1.7.0_65]
at
org.eclipse.ecf.osgi.services.remoteserviceadmin.RemoteServiceAdmin.importService(RemoteServiceAdmin.java:2284)
~[na:na]
at
org.eclipse.ecf.osgi.services.remoteserviceadmin.RemoteServiceAdmin.importService(RemoteServiceAdmin.java:428)
~[na:na]
at
org.eclipse.ecf.osgi.services.remoteserviceadmin.AbstractTopologyManager.handleECFEndpointAdded(AbstractTopologyManager.java:293)
~[na:na]
at
org.eclipse.ecf.internal.osgi.services.distribution.BasicTopologyManagerImpl.handleEndpointAdded(BasicTopologyManagerImpl.java:104)
~[na:na]
at
org.eclipse.ecf.internal.osgi.services.distribution.BasicTopologyManagerImpl.endpointChanged(BasicTopologyManagerImpl.java:181)
~[na:na]
at
org.eclipse.ecf.internal.osgi.services.distribution.Activator$ProxyEndpointEventListener.deliverSafe(Activator.java:206)
~[na:na]
at
org.eclipse.ecf.internal.osgi.services.distribution.Activator$ProxyEndpointEventListener.endpointChanged(Activator.java:183)
~[na:na]
at
org.eclipse.ecf.osgi.services.remoteserviceadmin.EndpointDescriptionLocator$1.dispatchEvent(EndpointDescriptionLocator.java:198)
~[na:na]
at
org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
~[na:na]
at
org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
~[na:na]
Caused by: java.lang.InterruptedException: null
at
java.lang.Object.wait(Native Method) ~[na:1.7.0_65]
at
ch.ethz.iks.r_osgi.impl.ChannelEndpointImpl.sendAndWait(ChannelEndpointImpl.java:1357)
~[na:na]
...
19 common frames omitted