ConnectToServer successful, but no CreateServerPeer callback
Options
qingye5x
✭
In subserver i connect to master server , the master log as below:
2012-09-20 18:36:44,453 [12] INFO DanDing.Server.MasterServer.IncomingSubServerPeer [(null)] - game server connection from 127.0.0.1:3780 established (id=2)
but , in subserver , no CreateServerPeer callback, CreateServerPeer is not invoked, how can i debug this problem :?:
It's all run in Photon libs , can't set breakPoint and trace this problem :?
thanks very much~
2012-09-20 18:36:44,453 [12] INFO DanDing.Server.MasterServer.IncomingSubServerPeer [(null)] - game server connection from 127.0.0.1:3780 established (id=2)
but , in subserver , no CreateServerPeer callback, CreateServerPeer is not invoked, how can i debug this problem :?:
It's all run in Photon libs , can't set breakPoint and trace this problem :?
thanks very much~
0
Comments
-
No connect fail replay, no CreateServerPeer call back... -_-0
-
Is there anything in the subservers log when setting the logging level to DEBUG ?
There should be at least an entry that an init request will be sent because the masters gets the init request.
The log entry should look like this: OnOutboundConnectionEstablished: sending init request
Anything after this log entry could help to identify the problem.0 -
Thansk for prompt~!
I just resolved it.
There is no "OnOutboundConnectionEstablished: sending init request" , i found when the SubSever connect to MasterServer, i send a registerRequest to MasterServer, like this:
log.InfoFormat("connection to master at {0}:{1} established (id={2})",
RemoteIP, RemotePort, ConnectionId);
RequestFiber.Enqueue(Register);
So , i think , is the Fiber don't Start? i add a Start invake
log.InfoFormat("connection to master at {0}:{1} established (id={2})",
RemoteIP, RemotePort, ConnectionId);
RequestFiber.Start();
RequestFiber.Enqueue(Register);
Then run my two server, and i got a exception:
2012-09-21 10:13:09,281 [11] ERROR Photon.SocketServer.ApplicationBase [(null)] - System.Threading.ThreadStateException: Already Started
在 ExitGames.Concurrency.Fibers.PoolFiber.Start() 位置 c:\Dev\exitgames-libs\src\Core\Concurrency\Fibers\PoolFiber.cs:行号 179
在 DanDing.Server.SubServer.OutgoingMasterServerPeer..ctor(IRpcProtocol protocol, IPhotonPeer nativePeer, SubServer subServer)
在 DanDing.Server.SubServer.SubServer.CreateMasterPeer(InitResponse initResponse)
在 DanDing.Server.SubServer.SubServer.CreateServerPeer(InitResponse initResponse, Object state)
在 Photon.SocketServer.ServerToServer.TemporaryServerPeer.Photon.SocketServer.IManagedPeer.Application_OnReceive(Byte[] data, SendParameters sendParameters, Int32 rtt, Int32 rttVariance, Int32 numFailures) 位置 c:\svncontent\photon-socketserver-sdk_3.0\src\Photon.SocketServer\ServerToServer\TemporaryServerPeer.cs:行号 237
在 Photon.SocketServer.ApplicationBase.PhotonHostRuntimeInterfaces.IPhotonApplication.OnReceive(IPhotonPeer photonPeer, Object userData, Byte[] data, MessageReliablity reliability, Byte channelId, Int32 rtt, Int32 rttVariance, Int32 numFailures) 位置 c:\svncontent\photon-socketserver-sdk_3.0\src\Photon.SocketServer\ApplicationBase.cs:行号 835
Now i can see the stack trace, i found Photon has invaked CreateServerPeer , and fiber already Start.
Then i invake Register() directly:
log.InfoFormat("connection to master at {0}:{1} established (id={2})",
RemoteIP, RemotePort, ConnectionId);
Register();
And got some other exception:
2012-09-21 10:41:57,687 [12] ERROR Photon.SocketServer.ApplicationBase [(null)] - System.IO.FileNotFoundException: 未能加载文件或程序集“DanDing.Server.MasterServer, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null”或它的某一个依赖项。系统找不到指定的文件。
文件名:“DanDing.Server.MasterServer, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null”
在 DanDing.Server.SubServer.OutgoingMasterServerPeer.Register()
在 DanDing.Server.SubServer.OutgoingMasterServerPeer..ctor(IRpcProtocol protocol, IPhotonPeer nativePeer, SubServer subServer)
在 DanDing.Server.SubServer.SubServer.CreateMasterPeer(InitResponse initResponse)
在 DanDing.Server.SubServer.SubServer.CreateServerPeer(InitResponse initResponse, Object state)
File not found MasterServer.dll, i had forget copy MasterServer.dll to SubServer path .
Copy the MasterServer.dll and fix it.
But it confuse me , why in RequestFiber.Enqueue(Register); there is no exception throw?
Use enqueue no exception or other problem.0