Community
Participate
Working Groups
Build Identifier: M20090917-0800 I have used TCF (0.2.0) for an own agent and the auto-discovery worked fine. Now I have upgraded to TCF (0.3.0) and the auto-discovery stopped working. The agent is unchanged (because already delivered). Is there an incompatibility between these version of TCF? Can older agent no longer be used with the new version of TCF? Reproducible: Always Steps to Reproduce: Upgrade from TCF 0.2.0 to TCF 0.3.0 Try to use the auto-discovery feature
I cannot reproduce the problem using latest Java code and 0.2.0 agent on Windows. Everything seems to work fine. The problem might be caused by bug 318260: https://bugs.eclipse.org/bugs/show_bug.cgi?id=318260 which was fixed after tag 0.3.0 was created. Could you try the latest Java code to see if the problem will go away?
I have tried with the latest code and the problem still exists. The problem seems to be in the routine that tries to get the network address from the IP-config. The line InetAddress addr = map.get(s.substring(n + 3)); in the method private void getWindowsSubNetList(HashSet<SubNet> set) throws Exception { fails because at my machine the returned address line from the IPCONFIG output is: "IPv4-Adresse . . . . . . . . . . : 192.168.1.1(Bevorzugt)" so s.substring(n + 3) returns "192.168.1.1(Bevorzugt)" which is not found in the map of enumerated IP addresses. I think parsing IP addresses this way is very error-prone because the returned string is language-dependend. When I completely remove the windows specific part and use the generic enumeration part (with disabled IPv6 on my machine) auto-discovery works fine. I also tried changing the parsing algorithm to only take an IP-number like text: String address = s.substring(n + 3); String address2 = ""; for (int i = 0; i < address.length(); i++) { char ch = address.charAt(i); if (!((ch >= '0' && ch <= '9') || ch == '.')) break; address2 += ch; } InetAddress addr = map.get(address2); and this also works fine.
After some digging on the net I found that ipconfig on Vista sometimes shows DHCP status after an IP address, a word like Preferred/Deprecated/Invalid. I have committed a fix that only takes an IP-number-like part of the string, as you suggested. Thanks!
Moving bugs to new home for IP log.
Bulk change: Marking all bugs from the TM era (until June 2011) target 0.3