Submitted On 17-SEP-1999
wlwinhh
Have you tried to set the property on the commandline
by calling java with -Dsun.net.inetaddr.ttl=0 ?
This works with Apache & JServ.
Submitted On 30-SEP-1999
KleemannR
The bug still reproduces even with "-Dsun.net.inetaddr.ttl=0" from
the command line. I'm running Win95.
Submitted On 27-OCT-1999
ggyepesi
If you reload InetAddress with a private classloader then it will tell the
right IP address.
Submitted On 13-NOV-2000
KleemannR
FYI. I'm now contacting a remote host in order to determine
my local ip address. This gets around other problems such
as NAT. I'm no longer blocking on this bug.
Submitted On 09-MAY-2001
cypherpunk9
ignore that...i think it was a different cause.
Submitted On 09-MAY-2001
cypherpunk9
im getting crashes with the same thing on linux.
#
# HotSpot Virtual Machine Error, Internal Error
<SNIP>
#
# Error ID: 53484152454432554E54494D450E4350500183
#
# Problematic Thread: prio=5 tid=0x804df08 nid=0x2a6e
runnable
#
./c: line 4: 10862 Aborted ~/java/bin/java
-server -Xms64M -Xmx128M testinetaddr
Submitted On 13-NOV-2001
mthornton
In JDK 1.4 a new security property has been added
(networkaddress.cache.ttl) which is set in the
java.security file in the JRE/lib/security directory. This
controls the caching policy. With this set to a positive
value, the result of InetAddress.getAllByName will track
changes. However, InetAddress.getLocalHost is still cached
indefinitely (i.e. never changes). So by finding our local
host name we can then use getAllByName to track changes in
our own IP address(es).
Submitted On 13-NOV-2001
mthornton
Another approach with 1.4, is to use the
java.net.NetworkInterface class. The list of network
interfaces (and their associated addresses) changes
dynamically even when the cache property is set to cache
indefinitely.
However, the cacheing on getLocalHost should still be
stopped --- I can't see any security issue in being allowed
to track changes in your own address (especially as there
are ways to bypass the cache).
Submitted On 02-SEP-2002
schlm3
The latest change in hopper (1.4.1) introduced a huge
overhead in getting the localHostAdress. My Project used this
function to produce reasonably unique ID's for Objects in a
Network environment, thus creation 400 Objects (including
parsing of XML-file and others) took about 1.5 seconds in
1.4.0_01 . Running the same code in 1.4.1-rc took about 9.5
seconds ! After looking about the bug with OptimizeIt, I found
the InetAdress.getLocalHost() to be the reason for this.
While this is not a problem, because I can cache the value by
myself, it should be considered in the releasenotes.
Submitted On 03-SEP-2002
BatemanA
The change is documented in the release notes - see :-
http://java.sun.com/j2se/1.4.1/networking-relnotes.html
Submitted On 24-SEP-2002
ferval
I have the same problem, i tested with 1.1.8, 1.2.2, 1.3.0
all have the problem, wouldn't be better to fix this issue?.
I don't see the need to cache this information since there
are arp cache, dns cache server, etc. and probably if i'm
calling this method several times is because i'm looking for
changes in the ip address (ppp connections, dhcp address
changes).
PLEASE NOTE: JDK6 is formerly known as Project Mustang
|