0
\$\begingroup\$

My Unity project uses the Mirror Networking component and I am using an AWS free tier EC2 instance to host it. I configured the instance following this guide from the Mirror documentation, including adding a security rule to open port 7777, the default port used by Mirror. One difference is that I use a Windows build on the server as the host rather than a dedicated server build because I am unable to build the project as a dedicated server build without running into issues.

When I run the server on the AWS instance and try to connect a client to it, I get the error:

"[SimpleWebTransport] EXCEPTION: SocketException Message: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.

UnityEngine.Logger:Log (UnityEngine.LogType,object)".

The error is hard to find a solution for because it very generic. I am using the SimpleWebTransport since I want WebGL clients to be able to connect. Portchecker tells me that port 7777 (for Mirror) and 22 (for SSH) are closed, but 3389 for remote desktop protocol is open and I can connect to the instance through RDP. It seems weird that port 7777 would be closed despite me adding a security rule for it to be open but the Mirror documentation said that the port would only be open when the game is running, so I am unsure if this is an issue with my AWS configuration or the game.

\$\endgroup\$

1 Answer 1

0
\$\begingroup\$

I fixed it by adding an inbound security rule in the Windows Defender Firewall for port 7777 inside the instance.

I set the rules on the AWS security group and my local Windows Firewall, but forgot about the Windows Firewall for the OS on the instance. This is a step in Mirror's documentation, but they didn't specify whether it was the firewall on the instance or locally and I assumed it was locally.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .