I'm working on Eclipse STS 2.7.2 with Java JDK 1.6, Windows XP SP3. I work behind a proxy which requires authentication.
I wrote two simple client and server plugins which work using DS and Zookeeper discovery. They refer to an IHello interface bundled in a third plugin.
The server publishes a simple Hello service which returns a string "hello" when invoked on 192.16.23.28:6666/hello and starts Zookeper with VM arguments
-Dzoodiscovery.dataDir=bla
-Dzoodiscovery.flavor=zoodiscovery.flavor.standalone=192.168.23.28:3030;clientPort=3031
xml is:
<?xml version="1.0" encoding="UTF-8"?>
<scr:component xmlns:scr="NOLINKALLOWED" name="it.eng.test.remote.ds.helloservice">
<implementation class="it.eng.test.remote.ds.helloservice.HelloService"/>
<property name="service.exported.interfaces" type="String" value="*"/>
<property name="service.exported.configs" type="String" value="ecf.generic.server"/>
<property name="ecf.exported.containerfactoryargs" type="String" value="ecftcp://192.168.23.28:6666/hello"/>
<service>
<provide interface="it.eng.test.remote.ds.hello.IHello"/>
</service>
</scr:component>
the client starts Zookeeper with VM arguments
-Dzoodiscovery.autoStart=true
-Dzoodiscovery.flavor=zoodiscovery.flavor.standalone=192.168.23.28:3031;clientPort=3030
In both cases the OSGi framework is started with the -console -consoleLog -clean arguments.
I then created two separated run configuration for both server and client (Run as->run configurations..) adding all required bundles (most important ones: org.eclipse.ecf.provider.remoteservice and org.eclipse.ecf.provider.zookeeper) and their dependencies.
Based on that configuration I defined two separated product configurations (new->product definition->select run configuration) for both client and server.
Now, if I run them by clicking on the link "Launch an Eclipse application" inside the respective product configuration, everything works. The server publishes the service, the client gets it and shows "Hello" on output. netstat -a | grep 6666 shows that someone is listening on that port and netstat -a | grep 30 shows that port 3030 and 3031 are being used.
Eclipse is configured to use my proxy correctly.
If I export them as an Eclipse product based on the aforementioned configurations (export->eclipse product->select product configuration), I get two folders: client and server.
Inside them there's everything needed to run the applications inside an external OSGi framework, including configuration files for both the framework (config.ini) and the VM (eclipse.ini).
The applications are started with STS.exe -console which opens an OSGi console with all the required bundles installed and started.
Starting the server works, I see someone listening on 6666 and zookeeper reports that the service has been published.
If I start the client, nothing happens. No output, no connections on 3030 and 3031, no errors. It simply does nothing, zookeeper however says it has started discovery.
Using localhost instead of my IP changes nothing, it still works inside Eclipse but not outside.