Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 6437 - Timeout when launching
Summary: Timeout when launching
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P1 critical (vote)
Target Milestone: ---   Edit
Assignee: Darin Wright CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 6919 49659 (view as bug list)
Depends on:
Blocks:
 
Reported: 2001-11-29 12:24 EST by Darin Wright CLA
Modified: 2004-01-22 22:00 EST (History)
9 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Darin Wright CLA 2001-11-29 12:24:53 EST
From Eclipse Corner:

"I am continuing to experience problems with timeouts with both JDK 1.3 and
JDK 1.4. I think, however, that I found one resonably reproducible quirk 
in this. It seems that when I am connected to the network I do not
experience any timouts, but when I am disconnected (I use a laptop), I get
the timeouts, though if I try again it does connect to the VM. Any ideas
on why this may be happenning, and how to solve it?"
Comment 1 Darin Wright CLA 2001-12-04 18:11:26 EST
Please verify (Jared).
Comment 2 Darin Wright CLA 2001-12-04 18:11:57 EST
Sorry, updated wrong bug. Re-openned.
Comment 3 Venu Thachappilly CLA 2001-12-11 10:24:15 EST
Darin, here is one :
  I have never been able to get Debug to work on my work PC.  I have tried 
almost all nightly and stable builds till Dec06.  Here are my specs

Windows NT
Pentium 800 MHz 256M Ram
I am on a lan and can 'ping localhost'
JDK 1.3.1 and JDK 1.4Beta 3

But the 1127 build can debug on my home laptop (1.1G 512Mb Win XP).
JDK 1.3.1 and JDK 1.4Beta 3

Hope it helps
Comment 4 David Buttler CLA 2001-12-11 11:36:40 EST
I often get VM timeout messages when debugging a program. I assume that
it is because the machine I am running eclipse on only has 128 MB of
RAM, running Win98, and I am in the habit of running several
applications at one time (Eclipse, Mozilla, XFree86, several xterms, etc).
Usually the problem does not occur when only eclipse is running and I am
only debugging one application at a time.

If I press retry often enough, eventually the debug process will start.  The
number of times I have to press retry seems to vary with the mood my computer is
in, as well as with how much stuff I have going on

Comment 5 Darin Wright CLA 2001-12-11 12:28:08 EST
I notice similar behavior. When launching times out, it is usually on the first 
launch of a VM that I have not yet launched. After the first launch works 
(perhaps pressing "re-try" several times), subsequent re-lanuches work fine. 
Thus, launching time outs could be related to VM startup, DLL loading, etc.
Comment 6 Murray Spork CLA 2001-12-12 19:21:03 EST
Debug is not working on my machine either - I get the timeout message. 

Linux 2.4.7-10smp
Redhat 7.2
Dual P3s with 1GB RAM
JDK 1.3.1_01Eclipse build 20011206
I can run the application within Eclipse.
I am on a LAN.

Comment 7 Darin Wright CLA 2001-12-13 16:59:35 EST
*** Bug 6919 has been marked as a duplicate of this bug. ***
Comment 8 Juliana T CLA 2001-12-13 17:37:48 EST
I've tried doing "Retry" for 10 minutes, having hit "Retry" 23 times.  Not 
working.  The VM comes up fairly quickly in R1.0 installed in the same machine.
Comment 9 Darin Wright CLA 2001-12-13 21:01:31 EST
See bug#1613

The new error reporting that will be avialable in the next build should shed 
some light on what is going wrong.
Comment 10 Darin Swanson CLA 2001-12-14 10:55:59 EST
To better diagnose problems with VM launching, a patched
org.eclipse.jdt.debug.ui plugin is available.

This patch is only for the 20011206 build.

If you are not experiencing problems with launching a VM in debug mode,
this patch will not be of interest.

http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/jdt-debug-
home/patches/20011206.1/org.eclipse.jdt.debug.ui.zip
Comment 11 Venu Thachappilly CLA 2001-12-17 13:03:43 EST
This is the error I get when trying to debug with the new patch installed.  I 
know this has been reported elsewhere, but just so people reading this bug will 
know what is going on:

=================
err:: No such file or directory
Error[2] in gethostbyname() call!
Socket transport failed to init.
Transport dt_socket failed to initialize, rc = -1
=================

This sounds very much like a the problem someone mentioned where eclipse was 
trying to launch the vm with invalid options for hostname.
Comment 12 Venu Thachappilly CLA 2001-12-19 11:20:24 EST
This is what I found :

This works:
===========
c:\> j:\Apps_pub\jdk13110\bin\java.exe -Xdebug -Xnoagent -Djava.
compiler=NONE -Xrunjdwp:transport=dt_socket,address=localhost:8000

This fails with the gethostbyname message:
=========================================
c:\> j:\Apps_pub\jdk13110\bin\java.exe -Xdebug -Xnoagent -Djava.
compiler=NONE -Xrunjdwp:transport=dt_socket,address=127.0.0.1:8000

What I mean by works is that I get (I assume because there is no server running 
on localhost).

Error [2] in connect() call!
err:: No such file or directory
Socket transport failed to init.
Transport dt_socket failed to initialize, rc = -1.


whereas in the failed testcase I get

Error [2] in gethostbyname() call!
err:: No such file or directory
Socket transport failed to init.
Transport dt_socket failed to initialize, rc = -1.
FATAL ERROR in native method: No transports initialized


BTW I can ping both localhost and 127.0.0.1


I tried this on another machine on which debugging works and there both the 
test cases 'worked'.

I guess it has something to do with my network configuration.
Comment 13 Darin Wright CLA 2001-12-19 17:40:49 EST
I found that when I "un-plug" my internet connection, I get a timeout error 
(but I succeed on "retry"). When I am connected, there are no problems. I 
experimented with using "localhost" instead of "127.0.0.1", and when 
using "localhost" I have no problems launching (even when uplugged).

Released fix to HEAD.
Comment 14 Darin Wright CLA 2002-01-02 11:23:38 EST
From Eclipse Corner:

> I found a solution to the timeout problem on my machine [I was getting a
> gethostbyname() error].
>
> On windows NT:
>   open c:\winnt\system32\drivers\etc\hosts
>
>   add the line
>
>   127.0.0.1       127.0.0.1
>
> (This should trick the socket libraries to resolve 127.0.0.1 to 127.0.0.1
> !!!)
>
> restart eclipse.
Comment 15 Darin Wright CLA 2002-01-14 14:24:54 EST
Marking as verified. I have not heard of any launching timeout problems 
recently. If anyone is still having trouble with the latest code base 
(20020109) please re-open this PR.
Comment 16 Tim Tyler CLA 2002-10-12 04:11:34 EDT
Am still experiencing timeouts when launching the Sun 1.4.0 JVM from Eclipse.

The problem is 100% repeatable.

My hosts file now reads:

# For example:
#
#      102.54.94.97     rhino.acme.com          # source server
#       38.25.63.10     x.acme.com              # x client host

127.0.0.1       127.0.0.1
127.0.0.1       localhost

I have set timeout to large values - it is currently 40000.

Ping works:

C:\Documents and Settings\Administrator>ping 127.0.0.1

Pinging 127.0.0.1 with 32 bytes of data:

Reply from 127.0.0.1: bytes=32 time<1ms TTL=128

Other commands that may be relevant:

C:\Documents and Settings\Administrator>java.exe -Xdebug -Xnoagent -
Djava.compil
er=NONE -Xrunjdwp:transport=dt_socket,address=localhost:8000
Error [2] in connect() call!
err:: No such file or directory
Socket transport failed to init.
Transport dt_socket failed to initialize, rc = -1.
FATAL ERROR in native method: No transports initialized

C:\Documents and Settings\Administrator>java.exe -Xdebug -Xnoagent -
Djava.compil
er=NONE -Xrunjdwp:transport=dt_socket,address=127.0.0.1:8000
Error [2] in connect() call!
err:: No such file or directory
Socket transport failed to init.
Transport dt_socket failed to initialize, rc = -1.
FATAL ERROR in native method: No transports initialized

This is all on WindowsXP - 
Version: 2.0.1
Build id: 200208291828

...any ideas?
Comment 17 Jared Burns CLA 2002-12-13 11:59:18 EST
Tim, the error you're getting from that command is expected. You're not 
specifying a main class to run or setting a classpath.

If you have other issues, please open a new bug report.
Comment 18 Darin Wright CLA 2004-01-13 10:32:26 EST
*** Bug 49659 has been marked as a duplicate of this bug. ***
Comment 19 Darin Wright CLA 2004-01-22 22:00:12 EST
*** Bug 49659 has been marked as a duplicate of this bug. ***