Socket exception
Client exception
Java.net.ConnectException:Connection Refused:connect.
This exception occurs when the client makes a new Socket (IP, port) operation because either the machine with an IP address cannot be found (that is, it does not exist from the current machine to the specified IP route), or the IP exists, but the specified port is not found for listening. This problem occurs, first check whether the client's IP and port is wrong, if correct, ping the server from the client to see if it can ping, if you can ping (service server to the ping ban will need another way), then look at the server to listen to the specified port program to start.
Java.net.SocketException:Socket is closed
Often the reason is that the self has actively closed the connection (called the Close method of the socket) and then read and write to the network connection.
Java.net.SocketException: (Connection reset or connect reset by Peer:socket write error)
The first is that if one end of the socket is closed (either actively or closed due to an unexpected exit), the other end sends the data, and the first packet that is sent throws the exception (Connect reset by peer). The other is an exit, but the connection is not closed when it exits, and the other end throws the exception if the data is read from the connection (Connection reset). Simply speaking, it is caused by read and write operations after a disconnected connection.
Java.net.SocketException:Broken Pipe.
Throw Socketexcepton:connect Reset by Peer:socket write error, throw the exception if you continue to write the data
(not yet detected)
Java.net.BindException:Address already in Use:jvm_bind.
The exception occurs when the server side makes a new ServerSocket (port is a 0,65536 integer value) operation. The reason for the exception is that one of the ports like Port has been started and is listening. With the Netstat–an command, you can see a port with a listending state. You can solve this problem by looking for a port that is not occupied.
Java.net.SocketException:Socket is closed
(with Client)
Java.net.SocketException: (Connection reset or connect reset by Peer:socket write error)
(with Client)
Java.net.SocketException:Broken Pipe.
Thank you for reading, I hope to help you, thank you for your support for this site!