alvyxaz / barebones-masterserver

Master Server framework for Unity
475 stars 106 forks source link

Quick Setup Example Failed to Run on Multiple VPSes #208

Closed gotanidea closed 6 years ago

gotanidea commented 6 years ago

I tried to run the Quick Setup example on two VPSes (one as a Master Server and the other as a Game Server). I have one Windows VPS with 18.118.177.118 as its IP address and another Windows VPS with 18.116.116.144 as its IP address. Each VPS has a MasterAndSpawner.exe and a GameServer.exe that are stored in a directory:

C:\Users\User\Documents\Games

I run the MasterAndSpawner.exe on the VPS with 18.118.177.118 IP address, with this command:

MasterAndSpawner -msfStartMaster -msfMasterIp 127.0.0.1 -msfStartSpawner -msfMachineIp 18.116.116.144 -msfMaxProcesses 5 -batchmode -nographics

The Client.exe is run on another machine and it can connect to the Master Server (the MasterAndSpawner.exe that runs on the VPS with 18.118.177.118 IP address). It can even trigger a creation of a Game Server on the Master Server VPS, if I use 18.118.177.118 as -msfMachineIp argument.

But if the -msfMachineIp argument is 18.116.116.144, which is the IP address of the second VPS, I can only log in to the Master Server, by using the Client.exe. After clicking the following buttons: Games List >> Create Game Server >> Create Room, I got this error message:

"[Warn | UnetRoomConnector] Client failed to connect to game server: [RoomAccessPacket| PublicAddress: 18.116.116.144:1500"

What should I do to fix this issue?