ServerToServer error 10060

Options
cuongvu
cuongvu
edited May 2014 in Photon Server
Hi,

I have tried to develop a server to server connection feature in my game and I get a problem and I dont know how to resolve. I use ConnectToServerTcp to connect to Master Server from GameApplication.cs

These are logs:

In OnServerConnectionFailed method (GameApplication.cs)
Master connection failed with err 10060: Disconnect

And in photon log :
9264: 18:04:15.462 - CTCPOutboundConnectionManager::ReadCompleted - Exception - CTCPOutboundConnectionManager::ProcessDataStream() - Invalid message format, expected first byte to be 0xFB. Got: 0x2e - 2E 4E 45 54 01 00 02 00 00 00 00 00 00 00 02 00 03 01 00 03 00 01 01 15 02 00 00 53 79 73 74 65 6D 2E 52 75 6E 74 69 6D 65 2E 52 65 6D 6F 74 69 6E 67 2E 52 65 6D 6F 74 69 6E 67 45 78 63 65 70 74 69 6F 6E 3A 20 54 63 70 20 63 68 61 6E 6E 65 6C 20 70 72 6F 74 6F 63 6F 6C 20 76 69 6F 6C 61 74 69 6F 6E 3A 20 65 78 70 65 63 74 69 6E 67 20 70 72 65 61 6D 62 6C 65 2E 0D 0A 20 20 20 61 74 20 53 79 73 74 65 6D 2E 52 75 6E 74 69 6D 65 2E 52 65 6D 6F 74 69 6E 67 2E 43 68 61 6E 6E 65 6C 73 2E 54 63 70 2E 54 63 70 53 6F 63 6B 65 74 48 61 6E 64 6C 65 72 2E 52 65 61 64 41 6E 64 4D 61 74 63 68 50 72 65 61 6D 62 6C 65 28 29 0D 0A 20 20 20 61 74 20 53 79 73 74 65 6D 2E 52 75 6E 74 69 6D 65 2E 52 65 6D 6F 74 69 6E 67 2E 43 68 61 6E 6E 65 6C 73 2E 54 63 70 2E 54 63 70 53 6F 63 6B 65 74 48 61 6E 64 6C 65 72 2E 52 65 61 64 56 65 72 73 69 6F 6E 41 6E 64 4F 70 65 72 61 74 69 6F 6E 28 55 49 6E 74 31 36 26 20 6F 70 65 72 61 74 69 6F 6E 29 0D 0A 20 20 20 61 74 20 53 79 73 74 65 6D 2E 52 75 6E 74 69 6D 65 2E 52 65 6D 6F 74 69 6E 67 2E 43 68 61 6E 6E 65 6C 73 2E 54 63 70 2E 54 63 70 53 65 72 76 65 72 53 6F 63 6B 65 74 48 61 6E 64 6C 65 72 2E 52 65 61 64 48 65 61 64 65 72 73 28 29 0D 0A 20 20 20 61 74 20 53 79 73 74 65 6D 2E 52 75 6E 74 69 6D 65 2E 52 65 6D 6F 74 69 6E 67 2E 43 68 61 6E 6E 65 6C 73 2E 54 63 70 2E 54 63 70 53 65 72 76 65 72 54 72 61 6E 73 70 6F 72 74 53 69 6E 6B 2E 53 65 72 76 69 63 65 52 65 71 75 65 73 74 28 4F 62 6A 65 63 74 20 73 74 61 74 65 29 0D 0A 20 20 20 61 74 20 53 79 73 74 65 6D 2E 52 75 6E 74 69 6D 65 2E 52 65 6D 6F 74 69 6E 67 2E 43 68 61 6E 6E 65 6C 73 2E 53 6F 63 6B 65 74 48 61 6E 64 6C 65 72 2E 50 72 6F 63 65 73 73 52 65 71 75 65 73 74 4E 6F 77 28 29 05 00 00 00 00 - .NET.......................System.Runtime.Remoting.RemotingException: Tcp channel protocol violation: expecting preamble... at System.Runtime.Remoting.Channels.Tcp.TcpSocketHandler.ReadAndMatchPreamble().. at System.Runtime.Remoting.Channels.Tcp.TcpSocketHandler.ReadVersionAndOperation(UInt16& operation).. at System.Runtime.Remoting.Channels.Tcp.TcpServerSocketHandler.ReadHeaders().. at System.Runtime.Remoting.Channels.Tcp.TcpServerTransportSink.ServiceRequest(Object state).. at System.Runtime.Remoting.Channels.SocketHandler.ProcessRequestNow().....


Thank you.

Comments

  • That's interesting.. it means that the Game Server side can not read the data that it receives from the master.

    1. what is your network setup? are you running master + game server application on the same physical machine? Are the applications loaded in the same Photon instance? If those are different Photon processes, are you using the same Photon version for Game Server and Master?

    2. can you send me the PhotonServer.config and show me the line of code where you call ConnectToServerTcp? (if you don't want to post your config here, just send me a PM)

    Thanks!
  • cuongvu
    Options
    Thanks Nicole,

    1. I setup master and gameserver in the same physical machine, they are in one photon instance and I use latest photon server release.

    2. I sent you my PhotonServer.config

    This is method to connect to Master server

    [code2=csharp]public void ConnectToMaster(IPEndPoint endPoint)
    {
    if (this.Running == false)
    {
    return;
    }

    if (this.ConnectToServerTcp(endPoint, Constants.MasterApplicationName, endPoint))
    {
    if (Log.IsInfoEnabled)
    {
    Log.InfoFormat("Connecting to master at ip={0}, serverId={1}", endPoint, GameContext.GameServer.ServerId);
    }
    }
    else
    {
    Log.WarnFormat("master connection refused - is the process shutting down ? serverId={0}", GameContext.GameServer.ServerId);
    }
    }[/code2]

    Thanks for your help,
  • cuongvu
    Options
    Hi Nicole ,

    As we discussed in private message, I re-install os on my computer and it's working without any source code changing.
    It is really weird.

    Thanks for your help.