Hi Noel,
I tried sun.net.client.defaultConnectTimeout, java.net.connectiontimeout,
sun.net.spi.nameservice.nameservers and
still, when I run InetAddress.getByName() on a nonexistant host, it takes a very long
time for UnknownHostException to be
thrown. Once I disable my VPN software, the exception is thrown right away. I would
appreciate your help diagnosing this
problem.
Here are the results of IPCONFIG /ALL when the VPN is disabled:
Windows IP Configuration
Host Name . . . . . . . . . . . . : stalker
Primary Dns Suffix . . . . . . . :
Node Type . . . . . . . . . . . . : Unknown
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No
DNS Suffix Search List. . . . . . : na.scansoft.com
montreal.speechworks.com
speechworks.com
Ethernet adapter Network Bridge (Network Bridge):
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : MAC Bridge Miniport
Physical Address. . . . . . . . . : 32-30-70-D8-75-8A
Dhcp Enabled. . . . . . . . . . . : No
IP Address. . . . . . . . . . . . : 192.168.1.100
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.1.1
DNS Servers . . . . . . . . . . . : 216.58.97.21
216.58.97.20
And here they are with the VPN enabled:
Windows IP Configuration
Host Name . . . . . . . . . . . . : stalker
Primary Dns Suffix . . . . . . . :
Node Type . . . . . . . . . . . . : Hybrid
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No
DNS Suffix Search List. . . . . . : na.scansoft.com
montreal.speechworks.com
speechworks.com
Ethernet adapter Network Bridge (Network Bridge):
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : MAC Bridge Miniport
Physical Address. . . . . . . . . : 32-30-70-D8-75-8A
Dhcp Enabled. . . . . . . . . . . : No
IP Address. . . . . . . . . . . . : 192.168.1.100
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.1.1
DNS Servers . . . . . . . . . . . : 216.58.97.21
216.58.97.20
Ethernet adapter Scansoft VPN:
Connection-specific DNS Suffix . : pb.scansoft.com wa.scansoft.com
eu.scansoft.com speechworks.com
Description . . . . . . . . . . . : Cisco Systems VPN Adapter
Physical Address. . . . . . . . . : 00-05-9A-3C-78-00
Dhcp Enabled. . . . . . . . . . . : No
IP Address. . . . . . . . . . . . : 10.4.0.102
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . :
DNS Servers . . . . . . . . . . . : 10.4.0.50
10.2.0.232
Primary WINS Server . . . . . . . : 10.4.0.50
Secondary WINS Server . . . . . . : 10.2.0.232
.... I think the problem may not be DNS-related exactly. Maybe the WINS
servers are at fault? If so, is there a way to
bypass WINS servers for a specific Java application? Do you have any idea what else it
could be? Here is the testcase I used
to reproduce the problem.
class test
public static void main(String[] args)
{
try
{
System.out.println(InetAddress.getByName("thishostdoesntexist.com"));
}
catch (UnknownHostException e)
{
e.printStackTrace();
}
}
with the following commandline: "java -Dsun.net.client.defaultConnectTimeout=5
-Djava.net.connectiontimeout=5 -
Dsun.net.spi.nameservice.nameservers=216.58.97.21,216.58.97,20 test".
Thanks,
Gili
On Mon, 20 Oct 2003 21:22:51 -0400, Noel J. Bergman wrote:
>> I got James' DNS list to exclude the (bad) VPN DNS server, but
>> InSpammerBlacklist uses InetAddress.getByName() which ignores
>> this list. I need to be able to tell InSpammerBlacklist and
>> other mailets to exclude this bad DNS.
>See: http://java.sun.com/j2se/1.4/docs/guide/net/properties.html
>Specifically, set the "sun.net.spi.nameservice.nameservers" property.
> --- Noel
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]