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

Bug 314876

Summary: [tcf] TCF "Datagram send failed" messages seen in error log
Product: [Tools] TCF Reporter: Martin Oberhuber <mober.at+eclipse>
Component: CoreAssignee: Eugene Tarassov <eugene>
Status: RESOLVED FIXED QA Contact: Martin Oberhuber <mober.at+eclipse>
Severity: normal    
Priority: P3 CC: cdtdoug, eugene, wb-rel
Version: unspecified   
Target Milestone: 0.3   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Martin Oberhuber CLA 2010-05-28 10:12:13 EDT
CQ:WIND00210473  
Build ID: TCF HEAD of November 2009

I'm unsure what's triggering these messages, but I'm seeing lots of errors logged like the following when my Firewall is on.

I would expect errors like this to be reported to the client application for proper handling, rather than just logging to the error log. From the error log, an end user cannot understand what's going wrong or how to alleviate the problem.

Cannot send datagram packet
java.net.SocketException: Invalid argument: Datagram send failed
        at java.net.PlainDatagramSocketImpl.send(Native Method)
        at java.net.DatagramSocket.send(DatagramSocket.java:612)
        at org.eclipse.tm.internal.tcf.services.local.LocatorService.sendEmptyPacket(LocatorService.java:523)
        at org.eclipse.tm.internal.tcf.services.local.LocatorService.sendAll(LocatorService.java:545)
        at org.eclipse.tm.internal.tcf.services.local.LocatorService.refresh_timer(LocatorService.java:378)
        at org.eclipse.tm.internal.tcf.services.local.LocatorService.access$0(LocatorService.java:330)
        at org.eclipse.tm.internal.tcf.services.local.LocatorService$1$1.run(LocatorService.java:156)
        at org.eclipse.tm.tcf.protocol.Protocol$3.run(Protocol.java:209)
        at org.eclipse.tm.tcf.EventQueue.run(EventQueue.java:100)
        at java.lang.Thread.run(Thread.java:595)
Comment 1 Eugene Tarassov CLA 2010-05-28 18:10:53 EDT
I believe the exception is caused by <a href="show_bug.cgi?id=312457">Bug 312457 </a>, which, in turn, is caused by a Java bug:

InterfaceAddress.getNetworkPrefixLength() does not conform to Javadoc
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6707289

Reporting the error to the client application is not really possible, because clients of Locator service are remote machines, and the error indicates that clients are not accessible. Log file seems the best place to report such errors.

Probably the best fix would be to report the error only first time it happens, and suppress consequent reports.
Comment 2 Eugene Tarassov CLA 2010-06-01 17:15:19 EDT
Fixed. Now Locator services does not log same error more then once.
Comment 3 Martin Oberhuber CLA 2010-07-15 12:20:22 EDT
Looking at the time when this was fixed, it got fixed in TM/RSE 3.2.
Comment 4 Eugene Tarassov CLA 2011-03-02 12:39:39 EST
*** Bug 338650 has been marked as a duplicate of this bug. ***
Comment 5 Doug Schaefer CLA 2011-05-17 10:48:43 EDT
Moving bugs to new home for IP log.
Comment 6 Martin Oberhuber CLA 2013-06-05 06:25:57 EDT
Bulk change: Marking all bugs from the TM era (until June 2011) target 0.3