HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Java Exception when calling socketAccept()
Operating System - HP-UX
1833569
Members
4154
Online
110061
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
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
05-07-2002 01:46 PM
05-07-2002 01:46 PM
Java Exception when calling socketAccept()
Hi,
I am not able to run any Java 1.2 or 1.3 software that accepts a tcp connection from a client machine. eg Tomcat.
Here is the exception that is thrown:
java.net.SocketException: Socket closed
at java.net.PlainSocketImpl.socketAccept(Native Method)
at java.net.PlainSocketImpl.accept(Unknown Source)
at java.net.ServerSocket.implAccept(Unknown Source)
at java.net.ServerSocket.accept(Unknown Source)
at tcpServer1.main(tcpServer1.java:42)
The system is a 2 CPU - L1000 running hpux 11.0
We do not have this problem on another L1000 running 11.0. (Single CPU).
We have verified that all the patches listed for java are applied. http://www.hp.com/products1/unix/java/infolibrary/patches.html
Any ideas, we can't use any Java application servers on this machine!
Here is a simple server that fails. It echos lines of input.
import java.net.*;
import java.io.*;
import java.io.IOException;
public class tcpServer1 {
private static OutputStreamWriter out;
public static void main (String args[]) {
int port;
ServerSocket server_socket;
BufferedReader input;
try {
port = Integer.parseInt(args[0]);
} catch (Exception e) {
port = 9000;
System.out.println("port = " + port + " (default)");
}
try {
server_socket = new ServerSocket(port);
System.out.println("Server waiting for client on port " + server_socket.getLocalPort());
// server infinite loop
while (true) {
Socket socket = server_socket.accept();
System.out.println("New connection accepted " + socket.getInetAddress()
+ ":" + socket.getPort());
input = new BufferedReader(new InputStreamReader(socket.getInputStream()));
// print received data
try {
out = new OutputStreamWriter(socket.getOutputStream());
while (true) {
String message = input.readLine();
if (message == null)
break;
out.write(message + "\r\n");
out.flush();
}
} catch (IOException e) {
System.out.println(e);
}
// connection closed by client
try {
socket.close();
System.out.println("Connection closed by client");
} catch (IOException e) {
System.out.println(e);
}
}
} catch (IOException e) {
System.out.println(e);
e.printStackTrace();
}
}
}
Thanks,
Mike Warne
mike.warne@pihana.com
I am not able to run any Java 1.2 or 1.3 software that accepts a tcp connection from a client machine. eg Tomcat.
Here is the exception that is thrown:
java.net.SocketException: Socket closed
at java.net.PlainSocketImpl.socketAccept(Native Method)
at java.net.PlainSocketImpl.accept(Unknown Source)
at java.net.ServerSocket.implAccept(Unknown Source)
at java.net.ServerSocket.accept(Unknown Source)
at tcpServer1.main(tcpServer1.java:42)
The system is a 2 CPU - L1000 running hpux 11.0
We do not have this problem on another L1000 running 11.0. (Single CPU).
We have verified that all the patches listed for java are applied. http://www.hp.com/products1/unix/java/infolibrary/patches.html
Any ideas, we can't use any Java application servers on this machine!
Here is a simple server that fails. It echos lines of input.
import java.net.*;
import java.io.*;
import java.io.IOException;
public class tcpServer1 {
private static OutputStreamWriter out;
public static void main (String args[]) {
int port;
ServerSocket server_socket;
BufferedReader input;
try {
port = Integer.parseInt(args[0]);
} catch (Exception e) {
port = 9000;
System.out.println("port = " + port + " (default)");
}
try {
server_socket = new ServerSocket(port);
System.out.println("Server waiting for client on port " + server_socket.getLocalPort());
// server infinite loop
while (true) {
Socket socket = server_socket.accept();
System.out.println("New connection accepted " + socket.getInetAddress()
+ ":" + socket.getPort());
input = new BufferedReader(new InputStreamReader(socket.getInputStream()));
// print received data
try {
out = new OutputStreamWriter(socket.getOutputStream());
while (true) {
String message = input.readLine();
if (message == null)
break;
out.write(message + "\r\n");
out.flush();
}
} catch (IOException e) {
System.out.println(e);
}
// connection closed by client
try {
socket.close();
System.out.println("Connection closed by client");
} catch (IOException e) {
System.out.println(e);
}
}
} catch (IOException e) {
System.out.println(e);
e.printStackTrace();
}
}
}
Thanks,
Mike Warne
mike.warne@pihana.com
1 REPLY 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-07-2002 01:51 PM
05-07-2002 01:51 PM
Re: Java Exception when calling socketAccept()
Hi Dan,
Try to check:
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x0b1172106351d5118fef0090279cd0f9,00.html
Regards,
Bassoi
Try to check:
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x0b1172106351d5118fef0090279cd0f9,00.html
Regards,
Bassoi
If you never try, never will work
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