Bug 9295 - [FAQ] Connection not found after initially missing
Summary: [FAQ] Connection not found after initially missing
Status: RESOLVED INVALID
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Team (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P5 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-VCM-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: faq, readme
: 19706 21277 23430 27135 30047 38096 40591 44389 50368 75999 76470 116401 157287 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-02-07 23:31 EST by Nick Edgar CLA
Modified: 2007-03-21 16:47 EDT (History)
15 users (show)

See Also:


Attachments
Bogus testcase (1.54 KB, text/plain)
2002-07-02 06:41 EDT, Tim Ellison CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Edgar CLA 2002-02-07 23:31:09 EST
Build 20020205 using Team 2.0

- at home, I have a workspace with a connection to ottcvs1.ott.oti.com
- tried opening it
- it failed
- realized I hadn't connected through VPN
- did so (without exiting eclipse)
- tried again
- it still failed
- tried pinging ottcvs1.ott.oti.com -- it worked
- restarted eclipse
- it then worked
Comment 1 Michael Valenta CLA 2002-02-08 09:10:35 EST
This is a known problem. We believe it is caused by the VM.
Comment 2 Kevin McGuire CLA 2002-06-09 10:14:18 EDT
*** Bug 19706 has been marked as a duplicate of this bug. ***
Comment 3 Kevin McGuire CLA 2002-06-09 10:16:00 EDT
readme for 2.0
Comment 4 Michael Valenta CLA 2002-06-10 09:43:45 EDT
I believe this is a bug in the IBM JRE. J9 works.
Comment 5 Tim Ellison CLA 2002-07-02 06:40:46 EDT
I'd be interested to see a testcase that reproduces this.
What are the characteristics of the 'workspace connection'?

I tried unsuccessfully to cause the error using a simple HTTP connection with 
an IBM 1.3.0 install (stopping and starting the HTTP server) -- though I 
suspect this is not a similar case.
Comment 6 Tim Ellison CLA 2002-07-02 06:41:51 EDT
Created attachment 1628 [details]
Bogus testcase
Comment 7 Michael Valenta CLA 2002-07-08 10:39:03 EDT
*** Bug 21277 has been marked as a duplicate of this bug. ***
Comment 8 Michael Valenta CLA 2002-07-08 10:57:00 EDT
Upon further testing, this problems occurs for Sun JREs 1.3.1 and 1.4. The next 
step will be to write a simple Java program that is independant of Eclipse to 
see i the problem is somehow related to Eclipse.
Comment 9 Michael Valenta CLA 2002-08-29 10:00:06 EDT
I have run the attached test program at home (Windows ME and Shiva VPN) using 
the following steps:

1) launch the program (TestSockets.java)
2) try to connect
- this fails because the host cannot be found
3) start up my VPN client
4) try to connect
- this still fails
5) shutdown and restart the program
6) try to connect
- this succeeds

I have tried this with IBM JRE 1.3.1, Sun JRE 1.3.1 and JRE 1.4 and J9 and they 
all have the same behavior (I'm not sure why J9 worked before, perhaps I had an 
earlier version or did something extra that caused it to work).

Given the above, it is most likely related to the VPN software. I will be 
upgrading my OS and VPN shortly and will retest then.
Comment 10 Michael Valenta CLA 2002-09-12 07:09:47 EDT
*** Bug 23430 has been marked as a duplicate of this bug. ***
Comment 11 Michael Valenta CLA 2002-09-12 07:11:31 EDT
Bug 23430 reports the problem using the Cisco VPN and Sun's JDK 1.4.1
Comment 12 Michael Valenta CLA 2002-11-26 09:33:43 EST
*** Bug 27135 has been marked as a duplicate of this bug. ***
Comment 13 Michael Valenta CLA 2003-01-31 16:07:49 EST
*** Bug 30047 has been marked as a duplicate of this bug. ***
Comment 14 Gary Gregory CLA 2003-03-22 00:00:32 EST
I am seing this problem again in 2.1.RC3a.

Version: 2.1.0
Build id: 200303202147
Comment 15 Gary Gregory CLA 2003-05-01 14:35:39 EDT
This is still a problem in Version: 2.1.0 Build id: 20030327213.
Comment 16 Michael Valenta CLA 2003-05-26 10:28:54 EDT
*** Bug 38096 has been marked as a duplicate of this bug. ***
Comment 17 Michael Valenta CLA 2003-10-08 09:57:05 EDT
*** Bug 44389 has been marked as a duplicate of this bug. ***
Comment 18 Michael Valenta CLA 2004-01-22 09:27:45 EST
*** Bug 50368 has been marked as a duplicate of this bug. ***
Comment 19 Ryan Lowe CLA 2004-01-22 10:12:35 EST
The default cache time for DNS entries in the Sun 1.4.2 JVM is "cache forever".
 See "networkaddress.cache.ttl" (third one down):

http://java.sun.com/j2se/1.4.2/docs/guide/net/properties.html

WORKAROUND: If you find you are having this problem regularly you can disable
DNS caching with a JVM flag (http://www.rgagnon.com/javadetails/java-0445.html):

-Dnetworkaddress.cache.ttl=0
or
-Dsun.net.inetaddr.ttl=0[JDK1.3]
Comment 20 Michael Valenta CLA 2004-01-22 14:03:04 EST
Thansks. We'll ad this to the FAQ.
Comment 21 Michael Valenta CLA 2004-03-24 21:57:48 EST
*** Bug 40591 has been marked as a duplicate of this bug. ***
Comment 22 Jean-Michel Lemieux CLA 2004-06-11 16:51:05 EDT
Post 3.0
Comment 23 James Taylor CLA 2004-08-25 06:04:36 EDT
This bug can also appear when you have issues with ADSL or similar equipment.
(for example, in-ability to establish connecton to service host). Anything which
causes the connection to be "flakey" when the inital connect is performed. At
this point, you might want to check your connection equipment and reboot that,
as opposed to resetting your dns caching.
Comment 24 Michael Valenta CLA 2004-10-13 12:23:20 EDT
*** Bug 75999 has been marked as a duplicate of this bug. ***
Comment 25 lindor CLA 2004-10-14 23:43:23 EDT
I have found that the -Dnetworkaddress.cache.ttl=0 workaround option
does not appear to work from the command line. I believe this property
cannot be set from the commmand line (when I try it, it does nothing --
also please see Sun's JVM docs).

The appropriate command-line-settable property for Sun's 1.4.2 JVM is:

-Dsun.net.inetaddr.ttl=0

(see the following link for further details -->
 http://java.sun.com/j2se/1.4.2/docs/guide/net/properties.html )

To make sure this is set for the actual JVM that Eclipse is running,
I suggest letting Eclipse set it, as follows:

  eclipse.exe -vmargs -Dsun.net.inetaddr.ttl=0

Comment 26 Michael Valenta CLA 2004-10-18 11:38:42 EDT
*** Bug 76470 has been marked as a duplicate of this bug. ***
Comment 27 Michael Valenta CLA 2005-11-24 10:34:53 EST
*** Bug 116401 has been marked as a duplicate of this bug. ***
Comment 28 Marcel Kuehn CLA 2005-11-29 05:34:51 EST
I got send to this page due the duplicate 'Bug 116401'.
I tried the workaround "-vmargs -Dsun.net.inetaddr.ttl=0" which doesnt work for me, which could also be caused by me using the blackdown-jdk instead of the sun one. 

But as i am using plain IPs instead of dns names to connect to (in my case my CVS Server at home), there shouldnt be any lookups at all ?
Comment 29 Michael Valenta CLA 2005-11-29 08:29:20 EST
Sorry about that. I guess I jumped the gun. anyway, Blackdown is not a supported VM. If you can reproduce the problem with a supported VM, then please reopen the original bug.
Comment 30 Michael Valenta CLA 2006-06-13 16:56:22 EDT
This is a JVM problem. We have described the problem in the readme file and the CVS FAQ.
Comment 31 Michael Valenta CLA 2006-09-14 16:54:59 EDT
*** Bug 157287 has been marked as a duplicate of this bug. ***
Comment 32 C. Lamont Gilbert CLA 2007-03-21 16:47:07 EDT
Its not purely a JVM problem.  Its a general network problem.  It can be caused by any participator in the DNS lookup process.

back in the day this was a bona fide JVM bug because the JVM would cache its failures too long.  Modern JVMs do not cache failures.  But if you have not made the proper connections there is a chance your local DNS can return you the wrong IP address which will be cached forever as a success.

You can avoid that with 
networkaddress.cache.ttl


There is a 2nd way to have a problem.  When JVM connects to an external device like VPN or SSH tunnel, this can disrupt/mask the normal network disconnect/connect etc. notifications to the JVM.

Generally this is probably a bug/malbehavior in that 3rd party software you are using for your connection.