question

zyjchil avatar image
zyjchil asked

PlayFabGameServer,Can't start up?

I tried to start this server in the Unity Editor by following the PlayFabGameServer example

https://github.com/PlayFab/PlayFabGameServer.

I have added my TitleID and Secret key to PlayFabSharedSettings, as README.TXT said, but I still can not see the effect started in the video showd https://www.youtube.com/watch?v=hZCsuXUy2ng (UNet server does not start and is told error "SocketException: The connection attempt failed because the connected party did not respond correctly after a period of time or the connected host did not respond." ). Here is some ScreenShot of my editor work. Is there any mistack in my params setting?Or Is there some else work shold be done in Dashboard? Thank you!

10 |1200

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

brendan avatar image
brendan answered

Can you have a look at Marco's info in this thread (https://community.playfab.com/questions/13134/the-core-of-using-custom-game-server.html)?

In it, he describes in detail the steps needed to test using a locally-hosted server with that sample.

1 comment
10 |1200

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

zyjchil avatar image zyjchil commented ·

Thanks for your help! Mr. Marco's explanation gives me a very clear understanding of how this sample client connects to the server. Unfortunately, this perfect teaching is not helpful to the problems I currently face. I explained in detail the problems I encountered below. If you have time to help answer it? thank you very much!

0 Likes 0 ·
zyjchil avatar image
zyjchil answered

Thanks for Brendan's help! But I still have question.

What bothers me is that the GameServerSource project can not work correctly in my UnityEditor. The final step looks normal is requestting to establish a connection with PlayFabSettings.ProductionEnvironmentPlayStreamUrl. (line 65 of "https://github.com/PlayFab/PlayFabGameServer/blob/master/GameServerSource/Assets/PlayFabSDK/Server/PlayStream/PlayFabPlayStreamAPI.cs") As this connection can not always be established, the next job can not start, also my local UNet service will not be turned on at all.

I did not write ProductionEnvironmentPlayStreamUrl, its value is set to "http://playstreamlive.playfab.com/signalr" by default. Every time I start up the ServerScene finally I was told Unable to establish a connection with PlayStream's address. I believe the sample cloned from GitHub is complete and available, and no other things should I do to it, just like Mr. Marco said "Note: That on the server, you should not have to do ANYTHING to make connection work. We have handled all of this for you. As long as you are implementing the client correctly, it should work. ".But it still confused me why my server can not start?

The sample client worked perfectly, and when I started local_hosted UNetServer directly, I was able to connect to it. And this client access PlayFab user authentication and Matchmake also go well.

1 comment
10 |1200

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

brendan avatar image brendan commented ·

Thanks for the additional details. Marco will be following up with you on this soon.

0 Likes 0 ·
Yuriy avatar image
Yuriy answered

@Brendan, I am having an identical issue as @zyjchil. Registered for the service, downloaded the Custom Server from github. Went through the setup steps and the server throws a Socket exception after a few seconds after start. Client works just fine, except it can't connect to the server since the server doesn't run the socket. If it helps, when a clients starts, I can see the connection on the PlayFab dashboard. When the server starts, nothing happens.

10 |1200

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

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.