This is a brief guide for those who experience multiplayer lag and connection errors on their Minecraft client. This thread is based on the unmodified client so for those who seek assistance for a modified client will not receive it here.
One of the many connection errors
To begin with, restart your PC and your router. Make sure you wait 10 seconds before you turn the router back on. Also, you will need to assure that your internet connection has a good ping. The lower the better. Take a ping test. 100ms is an excellent ping but 10ms which is a hundredth of a second is almost instantaneous. If you are getting anything higher than 100ms it can be noticeable in Minecraft and if you are constantly getting anything higher than 1000ms then you should consider contacting your internet provider. If you are getting kicked from servers resulting in timeout errors then it’s most likely your ping.
If your ping is fine, take a look at these suggestions:
Is your Minecraft client's version the same as the server's?
Is your network interface carddriver up-to-date? A simple update may fix the most ambiguous problems. If you aren’t familiar with this you can visit this page which will guide you through the process of updating your NIC driver.
Disable unneeded network interfaces. If you don’t need Hamachi and Virtual Box you should disable them. They can slow down or interfere with your connection.
Try disabling your firewall and any antivirus software as they could interfere with the connection as well. However, you should firstly consider the risks in doing this.
Reinstall a fresh version of Minecraft if you haven’t yet. Make sure you save all your worlds first.
Is java up-to-date? This is essential for Minecraft and can fix a wide range of problems - non multiplayer related as well.
Allocate more RAM to Minecraft. This solution has been deemed to fix socket exceptions. This tutorial will explain how to do it.
If the problem started to appear right after an automatic or manual system update you should be able to revert it to a previous restore point.
As for LAN multiplayer, you have to assure that all the users in the network have a different local IP address. Usually DHCP solves the problem of assigning each device with a unique address in a network. In Windows, DHCP should be enabled by default. If the computer has a static IP assigned to it inside a DHCP based network, it’s best enabling DHCP to avoid any conflicts. However, in some cases, a DHCP server may mistakenly create IP conflicts. To fix an IP conflict with DHCP enabled you can reset your computer or in Windows type ipconfig /release then ipconfog /renew through the command prompt.
You can also avoid conflicts and DHCP by assigning each computer a unique static IP address. It’s painstakingly time consuming but you only have to do it once.
This sums up the brief guide and hopefully it will be updated in the future. If you are still getting errors or lag please provide a list of system specs, ping, packet loss, jitter and an overview of your network setup. I’d recommend that you test your computer on a different network or vice versa. In this way it’s easier to pinpoint the culprit.
I have a problem that wasn't resolved by any of your hints, however. Perhaps you can help. This is the error I'm seeing: Link. Along with the following error message in the game output:
[13:44:54] [Client thread/INFO]: Connecting to tyro.serverminer.com, 25565
[13:44:55] [Server Connector #1/ERROR]: Couldn't connect to serverjava.net.ConnectException: Connection refused: no further information: tyro.serverminer.com/22.214.171.124:25565
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) ~[?:1.8.0]
at sun.nio.ch.SocketChannelImpl.finishConnect(Unknown Source) ~[?:1.8.0]
at io.netty.channel.socket.nio.NioSocketChannel.doFinishConnect(NioSocketChannel.java:191) ~[netty-all-4.0.15.Final.jar:4.0.15.Final]
at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:255) ~[netty-all-4.0.15.Final.jar:4.0.15.Final]
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:502) ~[netty-all-4.0.15.Final.jar:4.0.15.Final]
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:452) ~[netty-all-4.0.15.Final.jar:4.0.15.Final]
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:346) ~[netty-all-4.0.15.Final.jar:4.0.15.Final]
at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:101) ~[netty-all-4.0.15.Final.jar:4.0.15.Final]
at java.lang.Thread.run(Unknown Source) ~[?:1.8.0]
I've tried the options you went over, but haven't had any luck yet as the problem seems to be with my router. You asked for my system specs. I've tried it on two computers with the same results, but here they are anyways:
My desktop computer has Windows 8.1 Pro 64-bit, an Intel i7-2600K CPU @ 3.40GHz, 32GB of RAM and an AMD Radeon HD 5700 graphical card.
My laptop computer has Windows 7 Home Premium 64-bit, an Intel i7-3610QM CPU @ 2.30GHz, 8GB of RAM and an NVIDIA GeForce GTX 660M graphical card.
I did the ping test from my desktop and got these results:
On pingtest.net: Grade A, 0% packet loss, 6ms ping, 11ms jitter
Via cmd: average ping to tyro.serverminer.com (mc15.serverminer.com, 126.96.36.199) was 17ms
The culprit is likely not my computer or the internet connection. The problem arose when I installed a new router. It works on different networks (4G tethering), and it works when I install the old router. I have to install the new router for hardware reasons though, otherwise someone in the house has no internet.
The new router is a SiteCom N300. The old is a Netgear WNR3500v2. I tried to copy the settings from the old as much as possible.
Anyways, there are 6 devices connected to the new router right now, all with different IPs (192.168.0.100 through 192.168.0.105) and that's correct. All devices are accounted for. I couldn't check all MAC-addresses while my housemates aren't there but my desktop's and laptop's MAC-addresses are there (didn't check my phone). No other device should be connected unless a neighbour has cracked our wifi password somehow. DHCP is enabled and working fine.
Other people are able to connect to the server, so the problem must be local. Furthermore, while the server I'm connecting to currently runs snapshot 1.8 pre-release 1 of Minecraft, I am able to connect to a different server that still runs 1.7.10, so that tells me it might be something that changed since the latest stable release.
The server admin, in an effort to help me, upgraded the server to 1.8 pre-release 1 to see if that might help; the problem also arose while the server was on 14w34d. So I'm sure the client has the same version. I upgraded my network adapter drivers as you said, installed the latest Java version, disabled the firewalls in both my computers and the router (they are back on now, it didn't help), re-downloaded the launcher, allocated 2GB of RAM to Minecraft, and renewed the DHCP leases. But the problem is clearly in the router, so I also updated the router firmware, reset the router numerous times, and forwarded port 25565 to my desktop and laptop. That's about all I know of.
Have you any other ideas on how I could try to fix this?
Unplug all the devices from the new router except for your main game computer. Also disable WiFi. Do this momentarily and see if you are able to connect. I fear that the new router you have may me struggling.
I unplugged all other devices and turned off wifi in the settings page, then reset the router. The problem persists.
There's clearly something wrong within the router itself. I'd have to say that you've done a great job at providing every single detail surrounding the issue but unfortunately I do not have a clue why the router is causing it. There's one way to find out but it won't easy; that is analyzing each packet sent from the attempt of the connection to the abort of the connection.
If you're interested I could have a go at analyzing the packets myself. However, this will require you to download a program called Wireshark...
I am familiar with Wireshark, luckily, and already had it installed. I've made a capture of when I clicked on the server to join, to be downloaded here. Obviously I couldn't capture the whole process of starting up Minecraft, since that would give away my login data. This is just a couple of seconds when it makes the connection to the server and then gives the error.
I'll understand though if you can't help me with this. Analysing my network packets really goes above and beyond, so to say. In any case, I thank you heartfelt.
I must say that I don't get much wiser from seeing these packets. I tried forwarding port 43390 since there seems to be some traffic there, but that didn't work. My computer is at 192.168.0.101, and it's a Shuttle, so there's a few of the terms coming up in that capture. The faulty router is at 192.168.0.1. Other devices are all in 192.168.0.1**. I had to turn wifi back on and plug the other devices in, so other people have their internet again.
I had been googling around before I posted it on this forum and the exception seems to crop up from time to time in different versions, but nobody ever posts an answer to those topics.
The packets being sent from your computer to the minecraft server arrive with a false checksum meaning that the original packets sent by your computer have been corrupted along the way. Wireshark suggests that it is being caused by a checksum offload from your network card. I don't believe it is the case because it works fine with your older router. Which concludes... man I hate jumping to conclusions... which concludes that your router is indeed faulty, screwing up the packets.
Edit: Just to make sure open up the network adapter properties in windows and click on "configure". Go to advanced and disable checksum offload for ipv4 and TCP ipv4. Redo the capture like you did before.