CTCPSocketServer::ReadCompleted - Exception

edited October 2010 in Photon Server
We finally managed to start photon on our new server, but now we cant connect it to our application

our application was set in PhotonSocketServer.xml as default.

While trying to connect photon says in logs:
"3212: 22:09:21.633 - CTCPSocketServer::ReadCompleted - Exception - CTCPStreamProcessor::ProcessDataStream() - Invalid message format, expected first byte to be 0xF0 OR 0xFC. Got: 3c - 3C 70 6F 6C 69 63 79 2D 66 69 6C 65 2D 72 65 71 75 65 73 74 2F 3E 00 - <policy-file-request/>."

What does it mean?


  • this looks like a policy file request for flash; did you exclude the policy app?
  • You mean I need to exclude the following from the config file?

    <!-- Flash & Silverlight Policy Server -->
  • yes... and you still have this section configured?

    <!-- Policy request listener for Unity and Flash (port 843) and Silverlight (port 943) -->
    <!-- multiple Listeners allowed for different ports -->
  • yes.

    I excluded policy application declaration, but it did' help...
  • yufituris wrote:
    I excluded policy application declaration, but it did' help...
    now i'm confused. Is it working now or not?
    If not, can you please send me your config so I can review it?
  • yufituris wrote:
    Got: 3c - 3C 70 6F 6C 69 63 79 2D 66 69 6C 65 2D 72 65 71 75 65 73 74 2F 3E 00 - <policy-file-request/>."

    This means that you are using some kind of client which requests a "policy" or "crossdomain" file, before it lets you communicate with any server. Flash and Silverlight will request those files. Unity 3 will also make this request when you build for a webplayer and in webplayer itself. Other Unity-supported platforms won't make this request.

    To solve this, you should run Photon with the "Policy" application configured to start. The Photon Server SDK starts it by default and makes it listen to TCP ports 843 and 943. See PhotonSocketServer.xml and look out for node <TCPPolicyListeners> and <Application Name="Policy"...>. You could also check the PhotonCLR.log if "Policy" started.

    You need to open TCP port 843 in all firewalls surrounding your server machine. Otherwise it won't work. If a policy request is made, you will find a log entry "Policy sent." in deploy\log\Policy.txt. If those don't show up: check your firewalls again. In 99% of the cases, some firewall rule simply keeps the request from reaching the server.

    Hope this helps.
  • We finally managed to start PhotonServer. It turned out that the problem was with our dll, which we had forgotten to recompile for 64-bit problem.

    But the error discribed above still occurs. I have tried to chek firewall already, but may be i should try better... :)
  • Stupid me.
    The firewall is not an issue. You already got the policy request in your logs. That's proof that TCP 843 is open.

    But: You should check if the Policy app is running and responding. Check the logs as described above.