hp_ux11.0 socket error of java1.4

peter_wu89
peter_wu89 used Ask the Experts™
on
I have install a hp_ux11.0 system with java1.4 package and the recommended patches for it. but I met a error when use socket of java1.4.  the error i got when ran is:  "java.net.SocketException: Socket closed "
  I wonder if there are other any critial patches need to be installed?

here is the simple test of socket:

1.<TestSocket.java>
import java.net.*;

class TestSocket{
     public static void main(String[] args){
         try{
          System.out.println("Listen the port 10240 ...");
          ServerSocket ss = new ServerSocket(10240);
          Socket s = ss.accept();
          System.out.println("Receive the request from " + s);        
                }catch(Exception ex){
          System.out.println(ex);
            }
     }
}


2.<Request.java>
import java.net.*;

class Request{
     public static void main(String[] a){
         try{
          Socket s = new Socket("localhost",10240);
         }catch(Exception ex){
              System.out.println(ex);
         }
     }
}



Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Commented:
The required patches are the following, or their superseded patches:
      PHNE_22566   s700_800 Cumulative STREAMS Patch
      (replaced by PHNE_25116, superseded)
      PHCO_23770   s700_800 libc cumulative patch
      (replaced by PHCO_25707, best available)
  Those patches fix the returned EBADF from accept() call in threaded applications. Note, that there may be dependant patches that need to be installed first.
  See also:
      http://www.mysql.com/doc/H/P/HP-UX_11.x.html

http://www2.itrc.hp.com/service/patch/mainPage.do

Commented:
Also, this may happen by some weird and unknown reason (unknown for me) on HP-UX machines with multiple network interfaces (2 ethernet cards in addition to a loopback).

Author

Commented:
tks for your help, you comments is helpful, although
I have installed another version of HP_UX to fix it.

Commented:
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is to:

Accept JIEXA's  comments as answer

Please leave any comments here within the next seven days.
 
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
 
st_steve
EE Cleanup Volunteer
Per recommendation.

YensidMod
EE Moderator

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial