If you've tried to join a Minecraft server and been kicked back to the multiplayer screen with Connection Timed Out: getsockopt (or its full Java stack-trace cousin, java.net.ConnectException: Connection timed out: no further information: getsockopt), the good news is that the error has nothing to do with your account, your mods, your version, or the server's whitelist. It's a network-level failure β your Minecraft client never reached the server's IP and port. This guide walks through every fix that actually works, in the order that resolves the most tickets at our hosting panel.

What "Connection Timed Out: getsockopt" actually means
getsockopt is a system call in the Java networking layer that asks the operating system about the state of a TCP socket. When Minecraft surfaces it inside a connection error, what's really happening is that your client opened a TCP socket, sent a SYN packet to the server's IP and port, and waited. After ~30 seconds with no SYN-ACK reply, Java's networking code gave up and threw the exception. Minecraft caught it and showed you the friendly version on screen.
What that means in plain terms: the server never even knew you tried to connect. Nothing on the Minecraft side rejected you β no whitelist, no ban, no version check. The packets simply didn't make it to the server, or the server's reply didn't make it back to you.
This is why getsockopt rules out a huge category of common Minecraft connection issues:
- It's not a ban (
You are banned from this serveris a different error that shows after connecting). - It's not a whitelist (
You are not white-listed on this server!also shows after connecting). - It's not a version mismatch (
Outdated client/Outdated serverhappens after the TCP handshake completes). - It's not mods (mod errors look like
Disconnected: Internal Exceptionafter a successful connect). - It's also a Java editionβonly error string. Bedrock uses RakNet over UDP and surfaces failures with messages like
Unable to connect to worldorCould not connect to server. If you see the literal wordgetsockopt, you're on Java.
With that out of the way, here's the fix list β ordered by how often each one resolves the issue when our 24/7 support team triages a ticket.
What causes Connection Timed Out: getsockopt?
In rough order of how often we see each cause:
- The server is offline, restarting, or still booting (TCP listener not bound yet).
- Wrong IP or port β typo, stale subdomain, or pasting
play.example.comwhile forgetting a custom port like:25566. - Local firewall blocking outbound traffic on the Minecraft port β common on Windows after a Java update changes the binary path.
- Stale DNS cache pointing your client at an old IP after a node migration.
- Router or NAT dropping the connection β common on hotel, university, and corporate networks.
- ISP blocking the port β happens with some mobile carriers and a few consumer ISPs that block non-standard ports.
- VPN, corporate proxy, or anti-virus network filter interfering with the TCP handshake.
- Routing issue between your ISP and the server's datacenter (rare, but real β and the only fix is a node transfer).
Work through the fixes below in order and you'll catch over 95% of cases.
Fix 1: Confirm the server is actually online
Before touching firewall settings or flushing DNS, check the obvious. Open your hosting panel and look at the server's status indicator. In Pterodactyl (what we use at DoomHosting and most decent hosts run), the panel shows a green dot when the daemon is reachable and the JVM is responding. If it shows yellow (starting) or red (offline), the TCP listener isn't bound yet β every player will hit getsockopt while it boots.
Watch the console output. The line you want to see is:
[Server thread/INFO]: Done (X.XXXs)! For help, type "help"
Until that appears, the server isn't accepting connections. Generating a fresh world or applying a large modpack can extend boot to 60 seconds or more β be patient. If the console is stuck on Preparing spawn area: 50% for minutes, the JVM is overloaded; restart with more RAM or check the Minecraft server lag fix guide.
For public outages affecting Mojang's auth servers, check downdetector.com β your dedicated server doesn't depend on Mojang once a player is logged in, but a player joining for the first time on a freshly launched session token will fail if Mojang's session servers are down.
Fix 2: Verify the IP and port (and use the raw IP while debugging)
The single most common ticket cause: someone pasted the wrong port, used a subdomain that hasn't propagated yet, or assumed default port 25565 when their server is actually on a custom port.
- In your hosting panel, copy the connection address exactly as it's shown. At DoomHosting it appears as
IP:PORTunder the server's allocations. - In Minecraft β Multiplayer β Direct Connection, paste it without changes.
- If your server uses default port
25565, the:25565suffix is optional. Anything else (e.g.:25566,:30000), the port is mandatory.
Critical debugging tip: while troubleshooting, paste the raw IP, not your subdomain. A subdomain adds DNS lookup as a possible failure point β if the raw IP works and the subdomain doesn't, your problem is DNS (TTL not yet expired, A record pointing at a stale IP), not the server itself. Once you confirm the raw IP works, the subdomain will start working as soon as DNS propagates (usually 5β30 minutes after a change, up to 24 hours in worst cases).
If you're behind a NAT proxy (some budget hosts share a single public IP across many servers), the public-facing connection address may differ from the internal allocation. Always paste exactly what the panel labels as the connection address β don't try to derive it.
Fix 3: Flush your DNS cache
Stale DNS is real, especially right after a node migration when the server's IP changes but your computer still has the old one cached for a few hours. Flush it:
# Windows (Command Prompt as Administrator):
ipconfig /flushdns
# macOS:
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
# Linux (systemd-resolved):
sudo systemd-resolve --flush-caches
# Ubuntu 22.04 and newer:
sudo resolvectl flush-caches
After flushing, fully close and reopen the Minecraft launcher (not just the world list). The JVM caches DNS lookups for the lifetime of the process β restarting the launcher forces a fresh resolution.
If flushing doesn't help, try adding 8.8.8.8 (Google) or 1.1.1.1 (Cloudflare) as your DNS server in your network adapter settings. Some ISPs run flaky DNS that occasionally returns wrong answers.
Fix 4: Allow Java through Windows Firewall
Windows blocks new applications from accepting outbound connections by default, and every Java update can install a fresh javaw.exe at a new path that the old firewall rule doesn't cover. Re-add the current binary:
- Settings β Update & Security β Windows Security β Firewall & network protection β Allow an app through firewall.
- Click Change settings, then Allow another app.
- Browse to your Java runtime and add both
java.exeandjavaw.exe. - Tick Private and Public on both rows.
- Click OK and try reconnecting.
The location of javaw.exe depends on your launcher:
- Vanilla Minecraft Launcher (Microsoft Store):
C:\Users\<You>\AppData\Local\Packages\Microsoft.4297127D64EC6_8wekyb3d8bbwe\LocalCache\Local\runtime\java-runtime-gamma\windows-x64\java-runtime-gamma\bin\javaw.exe - Vanilla Launcher (standalone install):
C:\Users\<You>\AppData\Roaming\.minecraft\runtime\java-runtime-gamma\windows-x64\java-runtime-gamma\bin\javaw.exe - Prism / MultiMC / Modrinth: open the launcher, Settings β Java, and copy whatever path is configured. These launchers often use a separately installed JDK.
- Separately installed JDK: typically
C:\Program Files\Java\jdk-XX\bin\javaw.exe.
Third-party security suites (Norton, McAfee, Avast, ESET) maintain their own firewall on top of Windows. If you have one installed, do the same allow-listing inside its UI β Windows Firewall rules don't apply to it.
Fix 5: Try a different network (rules out ISP and router)
The fastest 60-second diagnostic to isolate where the problem lives: enable your phone's hotspot, connect your PC to it, and try the server again.
- Works on hotspot, fails on home Wi-Fi β the problem is your router or your home ISP. Restart the router (Fix 6) or call your ISP.
- Fails on both β the problem is your computer (firewall, DNS, anti-virus) or the server itself.
- Works on both for you, but a friend can't connect β their network has the issue, not yours or the server's.
If hotspot fixes it temporarily, install Cloudflare WARP (free, no account needed) and re-test. WARP routes your TCP traffic through Cloudflare's network, which bypasses many ISP-level filtering issues. ProtonVPN's free tier does the same. If the server connects fine on a VPN but not without one, your ISP is filtering the destination IP β known to happen with certain port ranges on some European mobile carriers and a handful of consumer ISPs in restrictive countries.
Fix 6: Restart your router and PC
Cheap, dumb, frequently overlooked, and frequently the answer. Consumer routers maintain a NAT translation table that occasionally gets corrupted β especially after weeks of uptime, large file downloads, or torrent activity. A stale entry can silently drop the SYN-ACK packet on its way back to your PC, producing a perfect getsockopt timeout while every other connection works fine.
Power-cycle the router for 30 seconds (unplug power, wait, plug back in β not a software reboot). Then restart your PC. Then retry the server. This catches more cases than people expect.
Fix 7: Test whether your ISP is blocking the port
Some ISPs filter outbound traffic on non-standard ports. Quickest way to test:
# Windows (PowerShell):
Test-NetConnection -ComputerName <server-ip> -Port <port>
# macOS / Linux:
nc -zv <server-ip> <port>
A TcpTestSucceeded: True (Windows) or succeeded / open (macOS/Linux) means the port is reachable from your network. If you get False, Connection timed out, or filtered, something between you and the server is blocking it.
Run the same test on your phone hotspot. If it succeeds on hotspot but fails on home Wi-Fi, your ISP is the culprit. The cleanest workaround is to ask your host (or change yourself, if self-hosting) to bind the server to a common port like the default 25565 β most ISPs whitelist it explicitly. At DoomHosting we'll change your allocation port from a support ticket in under 5 minutes.
Fix 8: Request a node transfer (last resort)
If every fix above has failed, multiple players from different ISPs all see getsockopt, and the server's panel shows it's online and the port is reachable from your host's own network, the problem is route-level: traffic between certain regions and the node your server lives on isn't completing. The fix is to move your server to a different node.
Contact your host's support and request a node transfer. At DoomHosting it's free and our 24/7 team handles it without data loss β your world, configs, plugins, and player data move with you.
Warning: A node transfer changes your server's IP address and may change its port. After a transfer you'll need to re-add the server in your Multiplayer list with the new connection address, update any subdomain A record / CNAME you've configured (DNS changes can take up to 24 hours to propagate), and tell your players the new address. Always back up your world before requesting a transfer β most hosts do this automatically, but confirm.
A note on LAN, Hamachi, and `getsockopt` on local networks
If you're seeing getsockopt while trying to connect over LAN (your friend opened a world to LAN, or you're running Hamachi / Radmin VPN to play "local" with someone over the internet), the same TCP rules apply β but the most common culprits are slightly different:
- Hamachi/Radmin adapter not connected before the host opened to LAN. Restart both, connect Hamachi first, then open the world.
- The host's Java firewall rule allows Public networks but not Private, or vice versa. Tick both for
javaw.exe(Fix 4). - The host's Wi-Fi profile is set to Public (which Windows treats as untrusted by default and locks down). Settings β Network & Internet β change the active network's profile to Private.
- Different subnets β if you're on
192.168.1.xand they're on192.168.0.x, automatic LAN discovery won't work. Use Direct Connection with the host's actual IP and the random LAN port the host's session opened on.
Still seeing "Connection Timed Out: getsockopt"?
If you've worked through every fix and the error persists, it's time to escalate. DoomHosting's 24/7 support team can pull TCP traces from the server's node to find exactly where the connection is being dropped β often within minutes. We host on Ryzen 9 hardware with full DDoS protection, instant setup, and one-click Forge / Fabric / Paper / Spigot installs starting from $5/month.
FAQ
What does "Connection Timed Out: getsockopt" actually mean in Minecraft?
It's a Java edition error meaning Minecraft's client tried to open a TCP socket to your server's IP and port, but the connection never completed. The getsockopt part refers to the underlying Java/OS function call that reported the timeout β it's not Minecraft-specific code, it's the Java networking layer giving up after waiting roughly 30 seconds for the server to respond.
Is the getsockopt error my fault or the server's?
Usually yours, but not always. If multiple players from different networks all see getsockopt at the same time, the server is offline or its public IP is wrong β that's on the server. If only you see it, it's almost always something between your computer and the server: firewall, DNS, ISP routing, anti-virus, or a wrong IP/port in the Direct Connection field.
Does "Connection Timed Out: getsockopt" mean I'm banned?
No. A ban produces a different error β You are banned from this server β after the connection succeeds. The same is true for whitelist rejections (You are not white-listed on this server!) and version mismatches (Outdated client / Outdated server). All of those happen after the TCP handshake completes. getsockopt fails before the server even knows you tried to connect.
Will a VPN fix the getsockopt error?
Sometimes. If your ISP is blocking the destination port or routing badly to the server's datacenter, a VPN reroutes the traffic over a different path and bypasses the issue. If the problem is your local firewall, a wrong IP, or a stale DNS cache, a VPN won't help. Try Cloudflare WARP first β it's free, no account required, and good enough for the test.
Why do I get getsockopt only on one specific Minecraft server?
Because the issue is between your network and that specific server's IP β not your client. Different Minecraft servers live on different IPs, in different datacenters, on different upstream carriers (Hetzner, OVH, Equinix, AWS, and so on). If your ISP has a routing problem with one of those carriers but not the others, you'll see getsockopt on servers hosted there and connect normally to everything else. A VPN or a node transfer to a different host typically fixes it.
Does "Connection Timed Out: getsockopt" happen on Minecraft Bedrock?
No. Bedrock edition uses a different network stack (RakNet over UDP) and surfaces connection failures with messages like "Unable to connect to world" or "Could not connect to server". If you're seeing the literal string getsockopt in the error, you're on Java edition. The fixes above don't apply unmodified to Bedrock β for Bedrock connection issues, see our how to join a Minecraft Bedrock server guide.



