Skip to content
9MinecraftServer.com home Search servers
EN

Translate this page

Sign up free
Join & fix problems

Fixing "Connection timed out: getsockopt"

"Connection timed out: getsockopt" means your game sent a request to the server's address and port and got no answer at all, so it gave up waiting.

For playersUpdated 6 min read

Quick answer
  • Timed out = nothing answered. Wrong address or port, server offline, or a firewall silently dropping traffic.
  • Refused = the machine answered but nothing listens on that port. Usually wrong port or a stopped server.
  • Fix order: check the server is up, recopy the address and port, drop the VPN, allow Java through the firewall, try another network.
  • io.netty decoder/encoder exceptions are a different problem: data the game couldn't read, usually mods or versions.

"Connection timed out: getsockopt" in Minecraft means your game tried to open a connection to the server's address and port, waited, and heard nothing back. No "no," no "yes," just silence. That silence has four common causes: the address or port is wrong, the server is offline, a firewall is quietly dropping the traffic, or your network can't reach that host at all.

The error looks scary because it's a raw Java message, but once you know how to read it, it points you straight at the fix.

Reading the error, word by word

The full Java Edition version often looks like this:

io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection timed out: getsockopt

PartPlain English
io.netty.channelNetty is the networking library Minecraft uses. This just says "the networking code had a problem."
AnnotatedConnectExceptionThe problem happened while connecting, before any game data moved. So it's not your mods, skin or version.
Connection timed outThe game waited for a reply and none came.
getsockoptThe low-level system call that reported the failure. It carries no extra meaning for you.
no further informationWindows' way of ending the same message. Same meaning as getsockopt.

Some launchers and mods add a number, like "timed out after 30000 ms." That's how long the game waited, in milliseconds. Raising it won't help; if a server hasn't answered in 30 seconds, it isn't going to.

Timed out vs. refused vs. unknown host

These three look alike and mean very different things. Knowing which one you have saves most of the guesswork.

Connection timed out

Nobody answered. Traffic is being dropped somewhere, or the address points at nothing. Suspect: offline server, wrong IP, firewall, blocked network.

Connection refused

A machine answered and said "nothing here." The IP is right but no server listens on that port. Suspect: wrong port, stopped server.

Unknown host

The name never turned into an IP. Suspect: typo, expired domain, DNS trouble.

Fixes, in the order that usually works

  1. Confirm the server is up. Check its page here for the online status and the 7-day chart. A server that restarts nightly will time out for a few minutes each night.
  2. Recopy the address and port. Delete your saved entry and add it again with a fresh copy. Watch for a missing :port, a stray space, or an old address from a server that moved hosts.
  3. Check the edition. A Bedrock address typed into Java (or the reverse) times out. Crossplay servers have two addresses; use the one for your edition.
  4. Turn off your VPN or proxy. Many servers drop VPN traffic on purpose to fight ban evasion.
  5. Allow Java through your firewall. In Windows, open "Allow an app through Windows Defender Firewall" and make sure every javaw.exe entry for Minecraft is ticked. Third-party antivirus firewalls have their own lists.
  6. Try a different network. A phone hotspot is the fastest test. If it works there, your router, school or work network is blocking the port.
  7. Flush DNS and restart the router. On Windows, run ipconfig /flushdns in Command Prompt. This helps when a server recently changed its IP.
  8. Try the numeric IP. If the server publishes one, connecting to it directly skips DNS. If the IP works and the name doesn't, it's a DNS problem.

Minecraft LAN connection timed out

On a LAN, the host's own PC is almost always the blocker. Windows asks about the firewall the first time you open a world to LAN; clicking Cancel blocks Java on that network type for good.

  • On the host, set the network to Private, not Public, in Windows network settings.
  • Allow Java on Private networks in the firewall app list.
  • Use the port the host's chat shows after Open to LAN, not 25565.
  • Use the host's local IP, which starts with 192.168. or 10. on most home networks.
  • Make sure both devices are on the same Wi-Fi, not one on guest Wi-Fi.

Server owners: getsockopt on a hosted or home server

If players everywhere time out, the server side is at fault. Walk through these:

SetupWhat to check
Hosting companyYour host usually assigns the port. Give players the exact address and port from your panel, not 25565. Don't change server-port by hand unless the host says to.
Any serverLeave server-ip blank in server.properties. A wrong value there makes the server listen on nothing players can reach.
Home serverForward TCP 25565 (or your port) to the PC's reserved local IP, and add a Windows firewall inbound rule for it.
Behind CGNATIf your router's WAN address doesn't match what "what is my IP" sites show, you're behind carrier NAT and port forwarding can't work.
Proxy networkWith Velocity or BungeeCord, players connect to the proxy's port. Backend servers shouldn't be public.
CrossplayGeyser's Bedrock port is UDP. It needs its own forward or host allocation.

Our guide to making a server public covers domains and SRV records. Once it's reachable, add it to our list and our pinger will tell you from outside whether it answers.

io.netty decoder and encoder exceptions

These errors also start with io.netty, but they're a different animal. You did connect. Then the game received or tried to send data it couldn't handle.

  • io.netty.handler.codec.DecoderException: your game got a packet it couldn't read.
  • io.netty.handler.codec.EncoderException: Failed to encode packet: your game or the server couldn't write one.

Common causes are a mod missing on one side, mismatched mod versions, a version-translation plugin that can't handle a particular item or block, or a modded item with more data than the packet allows. Network settings won't fix these. Instead:

  • Join with exactly the modpack version the server uses. Our modded server guide shows how.
  • Play on the server's native version instead of relying on version translation.
  • If it happens at one spot, like opening a certain chest, tell the server staff. It's often a single broken item they can remove.

Bedrock, PS5 and other consoles

Bedrock doesn't show Java's netty text. The same situation shows up as "Unable to connect to world" or a plain timeout. The logic is the same, with two Bedrock-specific twists:

  • Bedrock runs over UDP. Networks that allow web browsing but block unusual UDP traffic, like some schools and public Wi-Fi, cause timeouts here even when Java would work.
  • Port goes in its own box. Put the address in Server Address and the number in Port. Default is 19132.

On a PS5, Xbox or Switch you can't type an address in the normal game, so a timeout usually comes from a featured server, a Realm, or a community workaround like BedrockConnect. If a workaround times out, recheck the DNS values against the tool's own project page and make sure you still have an active PlayStation Plus, Xbox Game Pass Essential (formerly Core) or Ultimate, or Nintendo Switch Online membership. The console guides for PS5 and Xbox have the details.

"Timed out" in the middle of playing

If you were already in and got kicked with "Timed out" or "Connection lost," the connection went quiet during play. The server and game swap small keep-alive messages; when those stop arriving, one side gives up. Causes include Wi-Fi dropping for a few seconds, the server freezing during a lag spike, or a heavy upload on your network. If it happens to everyone at once, it's the server. If just you, try a wired connection.

Timed out in single player? Single player runs a small server inside your game. If it freezes, usually from too little RAM for a heavy modpack or a corrupted chunk, your own game times itself out. Allocate more memory in the launcher's installation settings, or remove recently added mods.

Quick questions

Is getsockopt a virus or a ban?

Neither. It's a normal network error. A ban shows a clear ban message; a timeout means the server never even heard you.

Why does only one server time out?

That server is offline, moved, or blocks your network (VPNs and some regions are commonly blocked). Other servers working proves your internet is fine.

Will reinstalling Minecraft fix it?

Almost never. The error happens before any game files matter. Spend the time on the address, firewall and network checks instead.