question

eliowrite avatar image
eliowrite asked

Clients automatically disconnect from server while connection process.

Hello.

I have problem of automatic disconnection from the server when I tried to connect my client via Unity3D NetworkConnection.

A similar problem has been described by the oglazirin here: https://community.playfab.com/questions/3898/connecting-to-custom-server-build.html

However, if in this case it was just a local network problem, I'm sure that, in my case, the connection attempt is made with the correct address and port.

I noticed some interesting things.

If you look at the Archived Games, the lobby is launched each time, but stops after 4-10 seconds.

In addition, in each of them only the following events are visible (code below).

I'll be grateful for any help or advice.

Thank you for your time.

{
    "EventName": "player_matched_with_lobby",
    "LobbyId": "9D088FFA5D459ADA",
    "GameMode": "Basic",
    "Region": "USCentral",
    "ServerBuildVersion": "1.01",
    "ServerHost": "107.21.76.4",
    "ServerIPV6Address": "2600:1f18:70d:5100:c54:d9a2:bd2:6b56",
    "ServerPort": 9000,
    "ServerHostInstanceId": null,
    "EventNamespace": "com.playfab",
    "EntityType": "player",
    "Source": "PlayFab",
    "TitleId": "2751",
    "EntityId": "CDC6C2B32A11107C",
    "EventId": "8c17f2bf45284194aae9c3881b74d3a8",
    "SourceType": "BackEnd",
    "Timestamp": "2018-05-15T10:59:00.0432286Z",
    "History": null,
    "CustomTags": null,
    "Reserved": null
}

{
    "EventName": "gamelobby_started",
    "GameServerData": null,
    "CustomCommandLineData": null,
    "CustomMatchmakerEndpoint": null,
    "MaxPlayers": null,
    "EventNamespace": "com.playfab",
    "EntityType": "gamelobby",
    "Source": "PlayFab",
    "TitleId": "2751",
    "GameMode": "Basic",
    "Region": "USCentral",
    "ServerBuildVersion": "1.01",
    "ServerHost": "107.21.76.4",
    "ServerIPV6Address": "2600:1f18:70d:5100:c54:d9a2:bd2:6b56",
    "ServerPort": 9000,
    "ServerHostInstanceId": "i-0b8008fdc2f774f15",
    "Tags": null,
    "EventId": "c099bd4766564ccd95b9e630b3775307",
    "EntityId": "9D088FFA5D459ADA",
    "SourceType": "BackEnd",
    "Timestamp": "2018-05-15T10:59:00.0432286Z",
    "History": null,
    "CustomTags": null,
    "Reserved": null
}

{
    "EventName": "gamelobby_ended",
    "EventNamespace": "com.playfab",
    "EntityType": "gamelobby",
    "Source": "PlayFab",
    "TitleId": "2751",
    "GameMode": "Basic",
    "Region": "USCentral",
    "ServerBuildVersion": "1.01",
    "ServerHost": "107.21.76.4",
    "ServerIPV6Address": "2600:1f18:70d:5100:c54:d9a2:bd2:6b56",
    "ServerPort": 9000,
    "ServerHostInstanceId": "i-0b8008fdc2f774f15",
    "Tags": null,
    "EventId": "d1b554eea8d449d7b78a7455305dd4f5",
    "EntityId": "9D088FFA5D459ADA",
    "SourceType": "BackEnd",
    "Timestamp": "2018-05-15T10:59:04.4859171Z",
    "History": null,
    "CustomTags": null,
    "Reserved": null
}
unity3dCustom Game Servers
screenshot-1.png (151.2 KiB)
screenshot-2.png (70.6 KiB)
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
brendan avatar image
brendan answered

Since all builds have been deleted from the title, it's very difficult for us to provide any feedback on possible causes of the issue. However, I would strongly suspect that the client disconnecting is directly related to the issue of the servers stopping a few seconds after starting. To diagnose that, you'd normally look at the log file output, to see what was happening during the startup. Since there are no log files captures for your servers, I have to assume there was a problem with the build starting at all. What happens when you run this build locally and connect to it?

2 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

eliowrite avatar image eliowrite commented ·

Thanks for your reply!

I use builds that are as similar to example projects here: https://github.com/PlayFab/PlayFabGameServer

If this helps you, I can upload the server build that I used again.

If I run my server locally in the Unity Editor, everything works well and clients can connect.The problem is observed only with remote connection.

Would like to ask about logging. Can I read server logs after the lobby has been completed?

And if so, do I correctly indicate the path to the logs?

log_file_path="\log.txt"

0 Likes 0 ·
brendan avatar image brendan eliowrite commented ·

No, you need to leave log_file_path set to <log_file_path>. We automatically fill in that parameter with the complete path to the file, which you must use to write out your log file, if you want it captured by our service after the session is complete. But yes, if you write a log file to that location, it will be captured and so be available on the archived games tab. For debugging, that would be your best first step - make sure you're logging to the right place, and check the output from your game executable, to see if everything is working correctly.

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.