HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Java - Sever Socket Close Fails
Operating System - HP-UX
1832690
Members
2782
Online
110043
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-27-2002 05:40 AM
03-27-2002 05:40 AM
Hi All
I'm having an application which is using close() method of java.net.SeverSocket class. The call to close()
method just hangs on HP machine, while the same application works perfectly fine on Solaris machine.
If I write a small program to test close() method call on HP, it works fine. But this application just
hangs at close() method call. I have put print's before and after this call. The first print comes but
the second doesn't.
System.out.println("X1");
serverSocket.close() // hangs at this point
System.out.println("X2");
Can anybody give me some pointer on how I can nail down the exact problem in my application.
I have applied all the patches listed at "http://www.hp.com/products1/unix/java/infolibrary/patches.html". Also it is written in release notes of jdk 1.3.1.02 for HP (ftp://ftp.hp.com/pub/gsy/sdk_13102os11.depot) that this issues has been resolved. But I am still facing the same!!!!!!!!
What is the solution for the same?
Regards
Ajay Bansal
I'm having an application which is using close() method of java.net.SeverSocket class. The call to close()
method just hangs on HP machine, while the same application works perfectly fine on Solaris machine.
If I write a small program to test close() method call on HP, it works fine. But this application just
hangs at close() method call. I have put print's before and after this call. The first print comes but
the second doesn't.
System.out.println("X1");
serverSocket.close() // hangs at this point
System.out.println("X2");
Can anybody give me some pointer on how I can nail down the exact problem in my application.
I have applied all the patches listed at "http://www.hp.com/products1/unix/java/infolibrary/patches.html". Also it is written in release notes of jdk 1.3.1.02 for HP (ftp://ftp.hp.com/pub/gsy/sdk_13102os11.depot) that this issues has been resolved. But I am still facing the same!!!!!!!!
What is the solution for the same?
Regards
Ajay Bansal
Solved! Go to Solution.
1 REPLY 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-27-2002 06:11 AM
03-27-2002 06:11 AM
Solution
Hi,
Is the socket waiting for any access
-------
closing a socket when accept or read is pending
If you have one thread performing an accept or read on a socket, and try to close the socket to clean up resources, the default behavior is for the close() to block until the accept or read call completes. If you want to change this behavior, you should use the following Java command line option:
-XdoCloseWithReadPending
This option allows one thread to close a socket when there is an outstanding accept or read pending on the same socket from another thread.
With the -XdoCloseWithReadPending option, the socket close() call closes the socket and, in the context of the thread with the pending read or accept, a SocketException with the message "Socket closed" is thrown.
------------------------------------
http://www.hp.com/products1/unix/java/java2/sdkrte1_3/infolibrary/sdk_rnotes_1-3-1-02.html
I hope this help.
Is the socket waiting for any access
-------
closing a socket when accept or read is pending
If you have one thread performing an accept or read on a socket, and try to close the socket to clean up resources, the default behavior is for the close() to block until the accept or read call completes. If you want to change this behavior, you should use the following Java command line option:
-XdoCloseWithReadPending
This option allows one thread to close a socket when there is an outstanding accept or read pending on the same socket from another thread.
With the -XdoCloseWithReadPending option, the socket close() call closes the socket and, in the context of the thread with the pending read or accept, a SocketException with the message "Socket closed" is thrown.
------------------------------------
http://www.hp.com/products1/unix/java/java2/sdkrte1_3/infolibrary/sdk_rnotes_1-3-1-02.html
I hope this help.
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP