Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 323204

Summary: jmdns provider fails when service has several parameters
Product: [RT] ECF Reporter: Bryan Hunt <bhunt>
Component: ecf.providersAssignee: ecf.core-inbox <ecf.core-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: bugs.eclipse.org, slewis
Version: 3.3.0   
Target Milestone: ---   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:

Description Bryan Hunt CLA 2010-08-19 22:23:54 EDT
I'm using Eclipse 3.6 with ECF 3.3

jmnds fails when it tries to register a remote service with many parameters.  This problem can be easily reproduced.

In org.eclipse.ecf.examples.remoteservices.hello.ds.host, modify the hello.xml to include the following properties:


   <property name="org.eclipse.ecf.examaples.remoteservices.hello.ds.host.cfg1" type="String" value="this is the configuration value for parm 1"/>
   <property name="org.eclipse.ecf.examaples.remoteservices.hello.ds.host.cfg2" type="String" value="this is the configuration value for parm 2"/>
   <property name="org.eclipse.ecf.examaples.remoteservices.hello.ds.host.cfg3" type="String" value="this is the configuration value for parm 3"/>
   <property name="org.eclipse.ecf.examaples.remoteservices.hello.ds.host.cfg4" type="String" value="this is the configuration value for parm 4"/>
   <property name="org.eclipse.ecf.examaples.remoteservices.hello.ds.host.cfg5" type="String" value="this is the configuration value for parm 5"/>
   <property name="org.eclipse.ecf.examaples.remoteservices.hello.ds.host.cfg6" type="String" value="this is the configuration value for parm 6"/>
   <property name="org.eclipse.ecf.examaples.remoteservices.hello.ds.host.cfg7" type="String" value="this is the configuration value for parm 7"/>
   <property name="org.eclipse.ecf.examaples.remoteservices.hello.ds.host.cfg8" type="String" value="this is the configuration value for parm 8"/>
   <property name="org.eclipse.ecf.examaples.remoteservices.hello.ds.host.cfg9" type="String" value="this is the configuration value for parm 9"/>


Run the consumer and host and jmdns will hang when advertising the remote service.  I also noticed in the debugger that the jmdns recovery function gets called and never returns which holds a top level lock on jmdns.  If you try to stop the host bundle from the osgi console, you will livelock the console because it is unable to obtain the lock in jmdns.
Comment 1 Scott Lewis CLA 2010-08-19 23:13:14 EDT
I believe there is a zeroconf-imposed limit on the total length of the name and the value of properties.  Since lan-based zeroconf is based upon UDP/multicast IP packets I believe that's the core limitation here.  I don't immediately recall what the limit is, but you may be bumping up against it with these long names, combined with long values, combined with many properties.
Comment 2 Scott Lewis CLA 2010-08-28 16:40:22 EDT
Adding Markus Kuppe to this bug for comment as he has done much of the recent work on discovery API and jmdns provider.
Comment 3 Markus Kuppe CLA 2010-09-09 07:42:12 EDT
Bryan,

have you tried using a newer JmDNS version. It has seen a fair amount of development recently but unfortunately we haven't had time to integrate it into ECF.

Markus
Comment 4 Scott Lewis CLA 2011-08-09 01:34:28 EDT
I think this bug is very likely to be due to the basic limitation in zeroconf/jmdns described in comment 1.   So this is not something ECF can do anything about, unfortunately.