Moderator Note
This report relates to users receiving this issue on Realms only, and can connect to other third-party servers just fine.
If this is the case, and have potential information that can help this report, please leave a comment on this report - also, I would recommend visiting the Technical Support Resources as well, as they may be able to help you with your issue.
If you have this issue on non-Realms servers as well, please visit the Technical Support Resources.
I have been getting the "Internal exception java.io.ioexception: an existing connection was forcibly closed by the remote host " error on various realms, but specifically my own realm.
I have contacted and worked with the technical support resources, with them I have done these attempts to resolve the issue, but to no accord could they even seem to resolve the issue.
I have:
1. Flushed my DNS.
2. Changed my Ethernet Cable.
3. Removed Norton.
4. Removed Hamachi.
5. Disabled my Firewall.
6. Tried connecting to my modem via Hotspot tether.
7. Triple Checked all Necessary Ports.
8. Ran Malware and Adware Scans.
9. Restarting my Modem/Router.
10. Uninstalled and disabled my VPNs.
11. Uninstalled and Reinstalled Minecraft in to an alternate location.
12. Reinstalled and updated Java.
13. Reinstalled Windows.
14. Checked to see if my ISP was blocking connection to Azure (They are not as my wife is the Realm Host and using the same Modem / Router ).
15. Reloaded the realm various times.
After all these steps to no accord could I stay connected more than 5 seconds to 10 minutes until getting said error.
Linked issues
is duplicated by
Attachments
Comments

I was sent here by them, after they helped me try all that above. None of which resolved any of said issue.
[media]
Other devices on the user's internet are able to join the Realm, so it's not the ISP or the Router. The user has also reinstalled Windows, and also done all the other things as seen above. There is nothing we can do from the technical support resource point of view, hence I am reopening.
👍
This is not the first time someone reported this issue on Realms, but so far we've always assumed that the error is caused somewhere on the user's end, and sent them over to community support.

Little update, I CAN connect to Realms via Bedrock, but still not at all through Java.
No idea if that will help at all, but that is an update.

@violine1101 This problem is constant throughout the history of Realms, and it happens irregularly to me as well as people I am playing with (most of the time, we play for hours without a disconnect, but sometimes it disconnects multiple times in a row, then BAM, the 7th it does not), so we can presume it's not a problem on users end.
Please consider it a problem on your end from this point on.

For the majority of users, it is a problem on their end - I can categorically confirm this as part of the tech support volunteer team. However, we now discovered that in rare cases, it is not, and that is why this report exists.

I have tried using java that is not bundled with MC, and also did a manual update on my network card, still getting the error, as of 1.16.

I have this issue regularly. Here's what I've done to troubleshoot so far:
1) Tried multiple computers (Windows and Mac)- no change
2) Tried different ISPs - no change (Windstream, AT&T, Spectrum, Metronet)
3) Tried rebooting - no change
4) Tried connecting via wired connection rather than wireless - no change
This is happening right now (see timestamp) so much that I cannot stay logged in for more than a few minutes, sometimes only a few seconds. Typically, right before I get cut off with this error message blocks begin to pop back and forth from their recently changed state, I pop back and forth if moving (not sprinting, just moving at regular speeds), or the blocks that I have in my hand flip back and forth. There is no issue with a downloaded backup copy of the game run in local mode, or when shared to the local LAN, only when accessed via Realms. This performance suggests that the servers are oversubscribed, under-resourced, and/or bandwidth is oversubscribed for this service. Clients do not get Java errors that their connections were forced closed by the remote end from a simple timeout. That is a different error message entirely.
The problem is intermittent, and processes running in the background do not experience disconnections or interruptions. Speed test indicates that my download speed is 75+ and upload 70+ currently while this is happening. I maintain a regular ping to multiple external hosts in various parts of the world without interruption or spikes in response time (google.com, cnn,com, bbc.co.uk, etc.) during the issue.

Just wanna add something interesting, you won't get kicked on SUPERFLAT Realm World, only on default and large biomes ones

Hello there guys; Just wanted to add again that I am having the exact same issue!! I had a brief break for some reason about the same time I got the email regarding this issue formally. I managed to play on one realm world for quite a while and got all excited so bought two more Realm World Packs; WHAT A FOOL! I am now not even able to get on one fully AT ALL! I cannot believe that such an obviously common problem cannot be corrected, or that we "FOOLS" are even allowed to purchase a defective product at all until it is fixed, I'm very upset that I have just wasted the money I did. I will be wanting a refund asap!
To those who are responsible; please stop offering Realms Worlds until you have actually fixed this problem, it's not fair to you customers.

Having the same issue, no matter which account I use.

Having the same issue - support directed me to follow this ticket.
I consistently get 'Internal Exception: java.io.IOException: An existing connection was forcibly closed by the remote host' awhile (~5-10 minutes) after connecting to my realm from a specific computer on my home network.
Other computers on my home network do not have the same issue, other players on different networks have not experienced the issue either. I have tried both via ethernet and over wireless. I've tried uninstalling Minecraft and java and reinstalling Minecraft (I didn't reinstall java after finding out it was no longer required).
Just before setting up the Java Realms server I set up a Bedrock Realms server and did not have any issues.
I used Wireshark to watch my network traffic leading up to the error occurring. It seemed to consistently fail after a TCP Packet was lost and a retransmission occurred.
Feel free to reach out if I can offer any more details regarding the issue.

I ve been getting same issue since today. Yesterday I started playing on realms for the first time. Since about 15:00 today i ve been getting same error on my realm where i play alone. Cant connect for more then few seconds.

Is this actively being worked on? I'm having the same issue and i've tried everything

I have same issue too. Me and my friends want to start playing together on Minecraft Realms, but I keep disconnecting in 10 seconds or max 5 mins for some reason. My friends can able to play in my realm.

So, OP here for this issue.
I have found a fix, but it is honestly annoying.
Complete Clean Reinstall of Windows.
I still do not know what may have caused the issue overall, but having done this, it is no longer an issue for me.
Though, I would wish for this thread to stay open, as a clean install should not be the only fix for this issue.

Thank you for the update. While that does suggest that it is something on the user's end, the user should not have to reinstall the entire operating system, so this remains open.

I have two Realms accounts. No problems at first with Sisco modem. Upgraded our network with new Sagemcom modem and Airties Mesh Setup. After the switch we get the error code. Random on bouth pc's from 1sec to 5 min. Got a replacemet modem yesterday. Same problem. All signals are great from the provider, checked by experts. Tried a old router with no luck. Do not know what to do now.

So I got the same issue as all of u guys and I wanna say that it's an issue from mojangs side, tried everything possible to fix this but nah, won't get fixed so 181 days and still not solved?? I know many ppl are dealing with this so maybe try to fix it soon?
Any updates?

I fixed this issue too, or I seem to have. It turns out I had a faulty motherboard and replaced it and it worked just fine. For reference, it was specifically the ethernet port on the back had gone bad, I could still use the internet and connect to servers and such but it must not have been a strong enough connection for Realms and it shut me out. Since replacing the Motherboard I am able to connect and receive packets from the server as normal (I made comparative screenshots and before I was receiving none). My fix might only be specific to me, and it did end up being technical. Thought I should post here since it may be the same for others too,
TL;DR check your internet download speed, as it may not be high enough for realms to be able to communicate with you.

Wanted to give an input to the two solutions I have seen posted recently. First in regard to doing a clean install of Windows. As the Mod says, the user shouldn't really have to do a clean install of his system to fix the issue. However, there has been other mentions of someone else trying a clean install of Windows without success, so even though it worked for some, it hasn't for everyone.
Coldwyn Johnson's solution to replace his motherboard also doesn't seem to check out as a solution in my end. Maybe there is another way to check this out, but I have 400 mbps download speed and 30 mbps upload speed while also sharing internet with someone who doesn't have this issue on their system. Maybe there is another way to check stability?

Is this being worked on because i have 26 days left on my realm and i would love to play it but i can barely play it because of this bug and i have tried everything, is there something that i can do that i havent tried already??

Hey! I've had this problem for almost over a year now and recently downloaded opitfine because of some lag issues. I earlier today found out that because of optifine I could play on my friends realm! I do sometimes still get the message when trying to connect to the realm but after a few times of reconnecting I can play again. I suggest everyone who has this problem try to install optifine. It might not work for everyone though, because my friend ( who also has this problem ) tried to install optifine and it didnt work. Worth a try though!

The only fix that worked for me was a VPN. I downloaded a free VPN and it works just fine, lasts for about 10 minutes until I run out of data which is longer than I could ever connect before. Very annoying, very temporary and very unfortunate how there is no real fix. Just a side note, but I never had this problem before switching to a different ISP, T-Mobile.

I have the exact same problem. Same error message tried. I have tried different possibilities but nothing has worked. Fix?

I've been using protonvpn (which is free) and windscribe (10gb limit) in order to play minecraft. They both work fine enough but i'd really like to find a fix because they increase my ping :/

Anyone else use a hotspot as a router? I read T-Mobile doesn’t allow azure port 445 through its hotspot and I’m using an off provider (mint mobile) https://social.technet.microsoft.com/wiki/contents/articles/32346.azure-summary-of-isps-that-allow-disallow-access-from-port-445.aspx

ya I think it was the isp. I did a port check and nothing came back but a vpn worked like a charm. Didn’t want to use a vpn cause of how they feel about them but it did the trick. My isp must have been making them boot me. T-Mobile/Mint. Hotspot router. Thanks yal for all the different advice

Ok this is such a random little issue because I upgrade directly to t mobile, mints isp, and still have this problem even with the vpn and doing all this. Every time I think I’m about to fix it I don’t. It was literally working all day after I got the vpn fix with mint. :/

It seems the solutions for this issue are very different, so perhaps they're not all the same, but we're all just converging on the same error message?
I've tried everything short of changing hardware and reinstalling windows.
VPN, Hotspot, disabling firewall, different account, you name it!
I've yet to hear back from the mojang support, but judging on this thread i'll just be sent here.

Mojang Keeps deleting my comments, I'm taking a screenshot of this one, because for months they have been charging my credit card for a game I cant play because they refuse to give a clear answer, so we cannot play a game I'm paying for.
But I will make sure to share this in social media so Mojang gets exposed for the lack of interest and customer service.
Its ridiculous all they do is close tickets as duplicates but never give an actual solution.

I submitted a post about this problem a couple of months ago. (I'm buried in the 80 "resolved" duplicate issue links.) My friend and I decided to try again with Realms and within 5 minutes of logging in I still have the same "java forcibly closed by host" error? Why has this problem taken almost a year to solve? Why is there little to no information on the status of this problem? Why do you guys seem to not care about this issue at all? Glad I'm not the one making payments on this Realm like I was the last time or I'd be a lot more upset.
I realize this post isn't very constructive because if you want my helpful post please refer to my "duplicated issue" post here: https://bugs.mojang.com/browse/MC-200722 . This is merely me expressing my frustration in an attempt to get anyone's attention. I will also be screenshotting this.

I had the same issue while on version 1.16.5 and i tried all the above fixes but it didnt work, then i changed the version to 1.16.4 and i haven't gotten disconected for 23 minutes so you guys can try it

@matieusz druh Thanks, this solution worked for me as well!

Same thing happends to me too and i've tried all the solutions the person listed in the ppost and nothing worked

Still happening in 1.17.1

A friend of mine has a realms server on version 1.18.1 and this started happening to me today after exploring the Nether a bit for the first time.
Thank you for your report!
Minecraft Realms for Java Edition has received a lot of updates and fixes over the last two years, so this issue has probably already been fixed in the meantime (e.g. because it was a temporary outage or an issue with the base game).
Since this bug report has not been updated since at least two years, please let us know if this is still an issue in current versions of Minecraft and update the bug report if applicable. If this is no longer an issue, please let us know as well. Thanks!
This issue is being temporarily resolved as Awaiting Response. Once the requested information has been delivered, the report will be reopened automatically.
Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki – 📖 FAQs
Thank you for your report!
However, this issue is Invalid.
This is a technical support issue; this site is for bug reports only. We do not have the resources to provide you with technical support.
Please contact the Community Support.
Quick Links:
📓 Issue Guidelines – 💬 Community Support – 📧 Customer Support – ✍️ Feedback and Suggestions – 📖 Game Wiki