Minecraft.Co.Com Guides
Verified practical guide

Minecraft getsockopt Errors: Documented Meanings and a TCP Check

Use the specific exception text in the complete connection error to identify what Java reports.

Minecraft getsockopt Errors: Documented Meanings and a TCP Check

Use the specific exception text in the complete connection error to identify what Java reports.

Connection refused

Java's ConnectException documentation defines the exception as an error connecting a socket to a remote address and port. It states that refusal typically occurs when no process is listening at that address and port.

Connection timed out

Java's Socket documentation states that SocketTimeoutException is thrown when the configured connection timeout expires before the connection is established.

Unknown host

The same Java documentation states that UnknownHostException can be thrown when the connection cannot be established because the endpoint is unresolved.

Verify the Minecraft server entry

Minecraft's official server page directs Java and Bedrock players to use Add server to join an existing server.

Test a TCP port on Windows

Microsoft documents Test-NetConnection as accepting a DNS name or IP address and a remote port for TCP testing. Run the following in PowerShell, replacing the example host and port:

Test-NetConnection -ComputerName play.example.net -Port 25565

The documented detailed TCP output uses TcpTestSucceeded to report whether the connection was established.

Sources and verification

  • Minecraft ServersDirects Minecraft Java and Bedrock players to use Add server to join an existing server.
  • ConnectException — Java SE 11 & JDK 11Defines ConnectException and explains that refusal typically occurs when no process is listening at the remote address and port.
  • Socket — Java SE 26 & JDK 26Documents SocketTimeoutException when a connection timeout expires and UnknownHostException when an endpoint is unresolved.
  • Test-NetConnectionDocuments TCP testing against a DNS name or IP address and remote port, including the TcpTestSucceeded result.