question

lordsplendidhumility avatar image
lordsplendidhumility asked

Failing to connect to PlayStream

On our custom game server, running locally on a machine here at our studio, we get connection errors while trying to start up the PlayStream API. When we call:


> `PlayFabPlayStreamAPI.Start();`

We get a failure with this result:

> SocketException: No connection could be made because the target machine actively refused it.
>
> System.Net.Sockets.Socket.Connect (System.Net.EndPoint remoteEP) (at <60233c34ef3e4e5f892759dbfc5ae27d>:0)
> System.Net.WebConnection.Connect (System.Net.HttpWebRequest request) (at <60233c34ef3e4e5f892759dbfc5ae27d>:0)
> Rethrow as WebException: Error: ConnectFailure (No connection could be made because the target machine actively refused it.
> )
> System.Net.HttpWebRequest.EndGetResponse (System.IAsyncResult asyncResult) (at <60233c34ef3e4e5f892759dbfc5ae27d>:0)
> SignalR.Client._20.Http.HttpHelper.GetResponseCallback (System.IAsyncResult asynchronousResult) (at Assets/PlayFabSdk/Shared/SignalR.NET20/Http/HttpHelper.cs:205)
> UnityEngine.Debug:LogException(Exception)
> SignalR.Client._20.Http.HttpHelper:GetResponseCallback(IAsyncResult) (at Assets/PlayFabSdk/Shared/SignalR.NET20/Http/HttpHelper.cs:213)
> System.Threading._ThreadPoolWaitCallback:PerformWaitCallback()

Should we be able to connect to PlayStream from a server running on-site? Or is the PlayStream servers firewalled away from the general public and only accessible from servers running on AWS? Alternately, it might just be that we're currently on the Free plan (as we're still in internal discussions about whether to go with the Indie or the Pro plan)

We haven't provided a production environment playstream url (as I haven't been able to locate one; I assume that PlayFab just assigns us one once we release), so it's trying to connect to the default server; "http://playstreamlive.playfab.com/signalr".

All of the PlayFabServerAPI appears to work; it's only PlayStream that's failing for us at the moment. Any clue what we might be doing wrong, here?

Custom Game ServersPlayStream
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

·
marcowilliamspf avatar image
marcowilliamspf answered

I don't think your doing anything wrong specifically. The SignalR implementation in the Custom Game Server example was a pre-beta test. It was working but since it was pre-beta, we have not made any automated tests for it yet.

Being that it is pre-beta, it is possible that the server side configuration changed and broke the sample. I'll make a work item for our team to follow up and test the sample.

This isn't a released feature yet, so I wouldn't advise moving forward with it just yet.

6 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.

lordsplendidhumility avatar image lordsplendidhumility commented ·

Okay. There's nothing obvious in the Custom Game Server example's source code which marks that PlayFabPlayStreamAPI.Start() is "pre-beta"; that probably should be made more clear?

0 Likes 0 ·
lordsplendidhumility avatar image lordsplendidhumility commented ·

Incidentally, this feature was excitedly announced, complete with upgrade instructions to start using it, more than two years ago, here:

https://api.playfab.com/blog/new-playstream-feature-and-updates-to-the-playfab-game-server

If subscribing to PlayStream events from a custom game server still isn't a released, supported, or tested feature two years after being announced alongside example code.. should I realistically be making alternate plans to implement the functionality I need, rather than waiting for this functionality to arrive from PlayFab?

0 Likes 0 ·
brendan avatar image brendan lordsplendidhumility commented ·

Yes, and quite candidly, that announcement and the release were premature. The feature had not had time back then to have been thoroughly vetted, and what we found in the course of testing was that it couldn't be supported at scale in its current state. We do plan to release a replacement for it, but we don't have a solid date for that yet.

I'll open a bug to make sure the docs and sample are updated with a call-out that this feature isn't fully supported yet.

1 Like 1 ·
lordsplendidhumility avatar image lordsplendidhumility brendan commented ·

Cool, thanks for the details!

There's really only a small number of extremely-rarely-sent events that I wanted to catch; there may be another, easier way to do what I wanted to do. I'll ask a question about that in a separate topic.

0 Likes 0 ·
Show more comments

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.