Skip to main content
warningConnection ErrorsAffects: Java Edition

How to Fix io.netty.channel.AbstractChannel Error

AnnotatedConnectException means the game couldn't open a connection to the server's address and port. How to read refused and timed out, and what to check.

Quick Fix

Check the address and port, make sure the server is running, and read the words after the exception: Connection refused and Connection timed out point to different problems.

Error Message

io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: getsockopt: mc.example.com/203.0.113.10:25565

How to Fix

1

Read the end of the message. After the error text it shows the host name, IP address and port the game tried.

2

For Connection refused, start the server, wait for Done in the console, and check server-port in server.properties.

3

For Connection timed out, allow TCP on the server port in the server's firewall and check the router's port forwarding.

4

Type the port after a colon, such as play.example.com:25566, when the server doesn't use 25565 and has no SRV record.

5

Test from inside the server's own network first. If that works and outside connections don't, the problem is forwarding or a firewall.

Common Causes

  • Nothing accepts connections on that address and port, because the server is offline, still starting or on another port. The message then says Connection refused.
  • No answer comes back, for example because a firewall drops the packets or the address points to the wrong machine. The message then says Connection timed out.
  • The port is wrong. Without a port the game tries the server's SRV record and otherwise uses 25565, so a server on another port needs the port after a colon.
  • Port forwarding or a firewall on the server side doesn't allow TCP on the game port, so only players on the same network can connect.

Diagnostic Steps

  1. Check the address and port at the end of the message.
  2. Confirm the server is running on that port.
  3. Check the firewall and port forwarding for TCP.
  4. Try again with the numeric IP and port.

FAQ

What is Netty?

The networking library Minecraft uses for its connections. AnnotatedConnectException is Netty's copy of Java's ConnectException with the address and port added to the message.

What do getsockopt and no further information mean?

They come from Java on Windows. Java 8 adds no further information when there is no extra detail, while Java 21 and Java 25 name the call that reported the error, getsockopt. The part that matters is Connection refused or Connection timed out.

Will reinstalling Minecraft fix it?

No. It's a network error between you and the server, so check the server, the port and the network instead.

Related Errors

Need More Help?