Java startup is delayed for minutes
I've had this problem for months now. Whenever I try to start a java application or applet, it fails to start for some time. For example, frostwire or an applet through the browser plugin. After some minutes, it starts, but that is just plain annoying and java might as well be useless in many cases. This btw happens in any linux version of java on this machine, including the sun JRE and fedora's icedtea. I know that java is one big bug, but does anyone have a clue about a fix or workaround?
|
The URL you gave works find for me Firefox 3, Ubuntu(Gutsy) and Sun JRE 1.6 update 3.
Probably the thing to do is use ControlPanel and set ShowConsole and enable all the debugging and see if the console tells you anything about what it is doing when wasting all that time. Also check PATH, LD_LIBRARY_PATH, and CLASSPATH for a network mount or autofs directory. It may be timing out trying to check some directory for files it doesn't really need. -- Will |
It's doesn't look that simple, it's nothing in the variables that I can see. I enabled the java console, it stopped at the line that is network related and ends in 'proxy=DIRECT'. True enough, it's network related. When I disable all network devices, jars start up normally. Found nothing to fix it though, it's really no use without internet connection. One thing that I have noticed is that it may be oss4 related since that's what I installed. That's the only thing I remember changing in 2 separate distros that are behaving this way. Though it doesn't matter if I uninstall it and return to alsa, it doesn't change. If it is due to oss4, I'm about to just reinstall the whole system, forget about oss4 and hope it wasn't updates or some other tweak that did it.
|
Wondering if its happening because its trying to map the hostname to the ip address. If you have given your machine a name can you map it to the ip address in /etc/hosts file and see if it solves your problem.
Quote:
|
Yes, I gave the machine a name, but it's already in /etc/hosts.
|
You might narrow it down more by seeing the network activity related to it
try sudo tcpdump -npv Run it for a minute or two before java so you can filter out the noise from other programs either by shutting down programs or adding some filters to tcpdump so you can tell what is java related, then run java. It might be trying to look up a host name you don't expect, or connect to some file server to check for class files/resources etc. -- Will |
Ok, I'm not sure what to make of it or if this is related, but right at the moment when I try to access the applet on the first post, it scrolls this and then keeps waiting (my IP is x):
Code:
14:06:19.537759 IP (tos 0x0, ttl 64, id 766, offset 0, flags [DF], proto TCP (6), length 60) x.x.x.x.46685 > 127.0.0.1.56870: S, cksum 0xedb8 (correct), 126610946:126610946(0) win 5840 <mss 1460,sackOK,timestamp 1109244 0,nop,wscale 5> Code:
14:09:28.540066 IP (tos 0x0, ttl 64, id 46808, offset 0, flags [DF], proto TCP (6), length 60) x.x.x.x.41815 > 74.208.57.244.http: S, cksum 0xb8f2 (correct), 3112335774:3112335774(0) win 5840 <mss 1460,sackOK,timestamp 1298246 0,nop,wscale 5> |
74.208.57.244 seems to be the "fg2p.com" which is in the html source of the webpage you mentioned so the series of http requests and responses after it starts seems appropriate and I see the same thing in my logs.
I don't see anything similar to the sending of data from port 46685 to port 56870 both on your local machine. you could try sudo netstat -nape | grep 46685 sudo netstat -nape | grep 56870 to see if any program has registered those ports. |
No, nothing shows up.
|
All times are GMT -5. The time now is 03:25 AM. |