I have the same error on my local network, it looks like a firewall issue on the host/server side. For me, to troubleshoot I used nmap. The LAN game showed up in multiplayer as 10.0.0.21:49299. nmap reported that port from that IP as closed/filtered; i.e. a firewall issue.
To confirm it is a firewall issue, turn off the firewall (momentarily). See if you're able to connect while the firewall is disabled.
Reason Behind This Error:
- IP issue: In some cases, the problem is caused due to the wrong IP address or the port listed while trying to connect to a server. The IP address along with the correct port is used to forward your connection to the server and connection is established once the server approves. Unless you are using a static IP address, that is quite rare, the IP address assigned to you by the ISP changes from time to time and multiple users might be allocated the same IP address. Therefore, the IP address needs to be edited from time to time.
- Firewall: Also it is possible that the Windows Firewall that you are using might be blocking your connection to the server. Both the Java files and the game directory is to be added to the exclusion list of Windows Firewall in order for the game to connect to the server properly.
- Outdated Java: Minecraft requires the Java software to be updated to the latest version in order for it to work properly. If the Java is outdated on your device and the launcher has been updated to the latest version it might cause conflicts with certain elements of the game and prevent proper connection to the server.
- Incompatible Software: There is a list of software that is not compatible with Minecraft and cause issues if they are installed on the computer on which you are trying to connect to the server. Minecraft has an official list of software which is not compatible with the game and causes conflicts.
Solution 1: Resetting Internet
Whenever the internet router is reset the IP address that is provided by the ISP is changed unless you are using a static IP address. Therefore, in this step, we will be reinitializing the internet settings and the DNS cache by completely power cycling the Internet Router. For that:
- Disconnect the power from the internet router
- Wait for 5 minutes and reconnect the power.
- When the internet access is granted try to connect to the server and check to see if the issue persists.
Solution 2: Adding Exception in Firewall
It is possible that the Windows Firewall that you are using might be blocking your connection to the server. Therefore, in this step, we will be adding an exception in the Firewall for some executables in the Minecraft folder that need internet access. For that:
- Click on the start menu and select the Settings icon.
- In the Settings, click on the “Updates & Security” option.
- Select the “Windows Security” from the left pane and select the “Firewall & Network Protection” option.
- Scroll down and select the “Allow an App through Firewall” option.
- Click on “Change Settings” and select “Yes” on the warning prompt.
- Select the “Allow another app” from the options and click on “Browse“
- Navigate to the game installation directory and select the game and the launcher executable.
- Now repeat the above process again and this time navigate to the directory where you have the Minecraft servers installed.
- Open “Maxwell” folder and then the “MinecraftServer” folder.
- Now allow both the Java executables located inside the folder in the same way.
- Now repeat the process again and instead of clicking “Allow another app” after selecting the “change” option simply scroll down the list of apps available and allow all the “Java Platform SE Binary” options through both the “Private” and “Public” networks.
Open the Minecraft launcher, try to connect to the server and check to see if the issue persists
Solution 3: Adding the IP address and Port
If the IP address that you are using is not a static one, it will change every couple of days or whenever the Internet Connection is reset. Therefore, in this step, we are going to be checking the IP address and the correct port for the game and add it to the Minecraft Launcher. For that:
Solution 4: Checking for Port Filtering
We came across numerous instances where users were accidentally filtering ports. Even though the port forwarding was working alright, the filtering automatically nullifies it and you will not be able to connect to Minecraft servers.
Solution 5: Checking ISP Network Access
If none of the above methods work, you should check your ISP’s network access. ISPs sometimes block network access to specific domains and don’t allow you to go through. Contact your ISP and verify that internet access isn’t indeed blocked.