ECONNREFUSED- What it is and how to fix

Explaining the ECONNREFUSED Error

Rarely, when users attempt to connect to Foundry VTT on The Forge they receive something like the following error: Error communicating with Foundry VTT: connect ECONNREFUSED followed by an IP address. When this happens, the user will be unable to connect to the world.

This usually occurs after a major update to Foundry VTT, the world’s system, or in some rare cases, an update to a module. As it turns out, this is expected behavior. When Foundry VTT has to do a major migration to world data (at least as of version 10), it will not respond while migrating. This results in the unusually named error, where the user will not be able to connect to their world. Foundry VTT is on, but it is dedicating itself to migrating world data before responding to users attempting to join the world.

Fixing the ECONNREFUSED Error

Thankfully, this is a relatively easy issue to fix! If you get this error when connecting to your world, take the following steps:

  1. Attempt to connect to the world again.
  2. If the world does not load right away, immediately cancel loading into the world.
  3. Wait 15 minutes for the world to finish migrating its data.
  4. Attempt to reconnect again.

After taking these steps, your world should be good to go.

If the Error Continues

If you have taken these steps and the error is still occurring, this is usually the result of one or more of the following:

  • The world size is large, resulting in longer than expected migration time.
  • There is a module conflict resulting in long migration times.
  • The migration has gotten stuck, for whatever reason.

We recommend taking the following steps:

  1. Attempt to connect to the world, and wait another 30 minutes. If this fixes the issue, it likely means that the world is too large, which could result in other issues- we recommend checking out a guide to fixing that here.
  2. Launch the game in safe configuration, which you can learn how to enable here. This will disable all modules activated in your world. If this fixes the error, it means there is a module error that was interrupting, or delaying your world migration.
  3. If the prior steps have not fixed the migration issues, turn your server/world off, and then on again on your My Foundry page. Attempt to connect, and if the world does not begin loading right away wait 15 minutes. Attempt to reconnect again at this point. If this fixes the error, it means that a bug occurred which prevented the migration from continuing.

Out of the rare cases in which this issue occurs, these steps will fix 99% of user issues. If you continue to experience these troubleshooting issues after following these steps, please reach out on our Discord, or email us at [email protected].

1 Like