LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Java startup is delayed for minutes (https://www.linuxquestions.org/questions/linux-software-2/java-startup-is-delayed-for-minutes-644462/)

Q.. 05-24-2008 05:15 AM

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?

wshackle 06-03-2008 06:36 PM

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

Q.. 06-04-2008 12:32 PM

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.

aditya immaneni 06-04-2008 02:25 PM

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:

Originally Posted by Q.. (Post 3174720)
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.


Q.. 06-05-2008 08:41 PM

Yes, I gave the machine a name, but it's already in /etc/hosts.

wshackle 06-08-2008 09:31 AM

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

Q.. 06-09-2008 03:16 PM

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>
14:06:22.537181 IP (tos 0x0, ttl 64, id 767, offset 0, flags [DF], proto TCP (6), length 60) x.x.x.x.46685 > 127.0.0.1.56870: S, cksum 0xe200 (correct), 126610946:126610946(0) win 5840 <mss 1460,sackOK,timestamp 1112244 0,nop,wscale 5>
14:06:28.537175 IP (tos 0x0, ttl 64, id 768, offset 0, flags [DF], proto TCP (6), length 60) x.x.x.x.46685 > 127.0.0.1.56870: S, cksum 0xca90 (correct), 126610946:126610946(0) win 5840 <mss 1460,sackOK,timestamp 1118244 0,nop,wscale 5>
14:06:40.537186 IP (tos 0x0, ttl 64, id 769, offset 0, flags [DF], proto TCP (6), length 60) x.x.x.x.46685 > 127.0.0.1.56870: S, cksum 0x9bb0 (correct), 126610946:126610946(0) win 5840 <mss 1460,sackOK,timestamp 1130244 0,nop,wscale 5>
14:07:04.537171 IP (tos 0x0, ttl 64, id 770, offset 0, flags [DF], proto TCP (6), length 60) x.x.x.x.46685 > 127.0.0.1.56870: S, cksum 0x3df0 (correct), 126610946:126610946(0) win 5840 <mss 1460,sackOK,timestamp 1154244 0,nop,wscale 5>
14:07:52.537186 IP (tos 0x0, ttl 64, id 771, offset 0, flags [DF], proto TCP (6), length 60) x.x.x.x.46685 > 127.0.0.1.56870: S, cksum 0x826f (correct), 126610946:126610946(0) win 5840 <mss 1460,sackOK,timestamp 1202244 0,nop,wscale 5>

Then once it started, I scrolled up thousands of lines and this is the beginning of it after that:

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>
14:09:28.671553 IP (tos 0x0, ttl 48, id 0, offset 0, flags [DF], proto TCP (6), length 48) 74.208.57.244.http > x.x.x.x.41815: S, cksum 0x6548 (correct), 3976753743:3976753743(0) ack 3112335775 win 5840 <mss 1380,nop,wscale 8>
14:09:28.671649 IP (tos 0x0, ttl 64, id 46809, offset 0, flags [DF], proto TCP (6), length 40) x.x.x.x.41815 > 74.208.57.244.http: ., cksum 0xa6dd (correct), ack 1 win 183
14:09:28.674351 IP (tos 0x0, ttl 64, id 46810, offset 0, flags [DF], proto TCP (6), length 248) x.x.x.x.41815 > 74.208.57.244.http: P 1:209(208) ack 1 win 183
14:09:28.901145 IP (tos 0x0, ttl 48, id 60186, offset 0, flags [DF], proto TCP (6), length 40) 74.208.57.244.http > x.x.x.x.41815: ., cksum 0xa6a9 (correct), ack 209 win 27
14:09:28.972171 IP (tos 0x0, ttl 48, id 60187, offset 0, flags [DF], proto TCP (6), length 584) 74.208.57.244.http > x.x.x.x.41815: P 1:545(544) ack 209 win 27
14:09:28.972272 IP (tos 0x0, ttl 64, id 46811, offset 0, flags [DF], proto TCP (6), length 40) x.x.x.x.41815 > 74.208.57.244.http: ., cksum 0xa3cb (correct), ack 545 win 217
14:09:28.974766 IP (tos 0x0, ttl 64, id 46812, offset 0, flags [DF], proto TCP (6), length 40) x.x.x.x.41815 > 74.208.57.244.http: F, cksum 0xa3ca (correct), 209:209(0) ack 545 win 217


wshackle 06-10-2008 06:17 PM

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.

Q.. 06-12-2008 07:37 PM

No, nothing shows up.


All times are GMT -5. The time now is 03:25 AM.