Operating System - HP-UX
1825011 Members
4712 Online
109678 Solutions
New Discussion юеВ

Java ServerSocket close() hang

 
SOLVED
Go to solution
Chamitha Wijesekera
Frequent Advisor

Java ServerSocket close() hang

Hi, the Java class ServerSocket, close() method seems to hang on HP-UX in my application. The socket exists and I can print out its details immidiately prior to the close() command. However the close() command seems to hang the application but at times it completes after more than 45 min! The same code works fine on Win2K.
Any idea why this might be?

I'm using HP-UX 11.i and JDK version 1.3.1.05. Thanks!
6 REPLIES 6
Pierrick herve
Advisor
Solution

Re: Java ServerSocket close() hang

you should test the option :
-XdoCloseWithReadPending

learn and explain
Chamitha Wijesekera
Frequent Advisor

Re: Java ServerSocket close() hang

Is that option used when executing javac or the java command?
Chamitha Wijesekera
Frequent Advisor

Re: Java ServerSocket close() hang

I added the -XdoCloseWithReadPending option when invoking the java command. However I still get the issue where my socket closer() hangs
Pierrick herve
Advisor

Re: Java ServerSocket close() hang

yes this option is for the "java" command. Did you have a java exception error ?

is it the same with the option ?

it's maybe a socket problem.

try to install :


PHKL_25233 : 80 Kb, 700_800 11.11 select(2) and poll(2) hang
PHKL_25389 : 210 Kb, 700_800 11.11 Core PM, vPar, Psets Cumulative Patch
PHKL_25871 : 90 Kb, 700_800 11.11 eventport syscalls;socket close(2) hang fix
PHNE_25644 : 5800 Kb, 700_800 11.11 cumulative ARPA Transport patch
PHNE_26728 : 1760 Kb, 700_800 11.11 Cumulative STREAMS Patch
# Total : 7940 Kb, 5 patches

theese 5 patches are interdependants so you have to install them together.

regards,
Pierrick
learn and explain
Pierrick herve
Advisor

Re: Java ServerSocket close() hang

you can find the information on this option on :
http://www.hp.com/products1/unix/java/infolibrary/prog_guide/java1_3/hot
spot.html#-XdoCloseWithReadPending

regards,
Pierrick
learn and explain
Chamitha Wijesekera
Frequent Advisor

Re: Java ServerSocket close() hang

Hi, I think adding the socket close hanging patch made it work fine! That was the exact issue I was having. There were some other patches that it was dependent on though. When I added them too eveything seemed to work ok. Thanks a LOT man!!