Create game failing after a few goes

epredator
epredator
edited June 2013 in Photon Server
I am using PUN and have been attached to photon cloud for a while. generally everything has run smoothly.
I recently sparked up a windows server 2008r2 on rackspace and put the photon server on that.

I switched my code to point to my own server and it worked well, but when I came back to test it again it seemed to not be connecting. "createGame failed, client stays on masterserver: OperationResponse 227: ReturnCode: 32762 (Failed to get server instance.). Parameters: {}."

I am using the loadbalancing out of the box version with game servers 1 and 2 all local to the machine. No fancy configs.

I have it started as an application

What I have noticed is that I can give it a kick into working by setting the ip config on the photon menu to local, then back to its autodetect IP (this seems to touch the gameserver 1 and 2 config files)

If I do that then I can create games again. After any of the created games have been quit I then lose the ability to create games and get the failed instance messages again.

I managed to take unity out of the loop by using the loadbalancer test client. It gives me the same problem.

First time I run it all the games are created.

second time I run it having closed the games down I get
C:\photon\deploy\bin_tools\loadbalancing.client\
[4552] Press Return to End
MASTER: GameList event received. Currently: 0 Games visible.
MASTER: Received error response: opCode=227, err=32762, msg=Failed to get server
instance.
MASTER: GameList event received. Currently: 0 Games visible.
MASTER: Received error response: opCode=225, err=32760, msg=No match found
MASTER: GameList event received. Currently: 0 Games visible.
MASTER: Received error response: opCode=225, err=32760, msg=No match found

Then if I touch the ip , swithing to local, then back to auto public and run it again it then works

So it seems I am exhausting a pool of something, or each of the game servers think they are full and so report back to the master client that things are not good? Is there a timeout or some config I am missing here.

Would it help to have a load more than 2 game servers (obviously in the long run that makes sense when they are on different boxes but I don't really need that at the moment.

As I said this is out of the box recent download I have not tinkered with anything only opened windows firewall ports, and in general it works the first time and I can have 5+ people connected in world in unity.

Any pointers or suggestions gratefully received

Thanks
ian/epredator

Comments

  • Just to add to this I did read
    "Deploying a Game Server
    When you deploy your LoadBalancing project to a production server, you should not host 2 Game Server applications on one server. Remove all settings for “GameServer2” from the PhotonServer.config, and delete the /deploy/LoadBalancing/GameServer2 directory.

    You need to make sure that the Game Servers can register at the Master Server. Set the MasterIPAddress in the Photon.LoadBalancing.dll.config to the Master’s public IP."

    which is something that I have just tried. It seemed to be working but after about 30 mins went back to its old ways
  • Trying again, rebooted machine several times.
    I tried changing the force restart in the config for the apps to enable restart false. In case it was creating too many things.
    That led to the master server not even being reachable. Edited the files back, rebooted to make sure nothing hanging around. Started it again.
    This time it seems to be behaving a bit, i.e. I can run test client several times in a row.
    I will see if over time it goes back to it old ways, its not been 30 minutes yet.
    I don't feel I can trust it yet for my clients on monday to run their scenarios.
  • Hi!

    It seems that your GS indeed have a problem to reach the master server.

    // Wild guess:

    It's a bit hard to tell witout any config or log files, but I *would* guess that in your first try, you had 2 GS applications, which both used the very same config file - and registered at the master with the same IP:Port (like, 127.0.0.1:5055). In that case, the master assumed that there was only one GS instance that registered over and over again, so it constantly closed one connection when the next one was created.

    You (unintentionally) solved this by removing one GS app; another solution would have been to change the GS config file to use separate ports.

    Hint: if you use the deploy.prompter.cmd, a suitable & unique config file for each GS app is copied over from /src-server/Loadbalancing/Config/.

    // End of wild guess ;)

    However, I can't explain why it failed again after ~ 30 minutes.
    In case you still have problems - can you please remove the "/deploy/log" directory, restart Photon and send me the MSMaster.log + GSGame.log files after the problem occurred? (Either per PM or attach them to this post). I'll check the logs and we'll find a solution.
  • Thankyou for responding and putting my mind at rest about what was likely to be happening.
    I think the 30 minutes thing may have been a red herring or a hangover from some caching.
    Knowing about the deploy script is very helpful too.
    So far I have not managed to replicate the problem again. It has been running for a good few hours, both with some connections and without.
    Tomorrow I will apply more load as we have a lot of packets flying about.
    Also this time I am not running the dashboard html, though the service is running. I am wondering if all the graphs and traffic was overloading the machine a bit too.
    I will look out for any weirdness and let you see the logs, having stripped them back to just the incident should it happen again.
    Thanks,
    Ian/epred