An unknown error occurred while processing the certificate.

GAGA
GAGA
edited January 2022 in Photon Server

i follow the page to setting my photon server.

i have those log in deploy/bin_WinXX/log/Photon-LoadBalancing-.log

Secured using certificate: "abc.def.com" from store: "MY" using machine store

when i use wss://abc.def.com:9090

then those error log in deploy/bin_WinXX/log/Photon-LoadBalancing-.log

CTCPWebSocketServer::OnError() - CFilteringStreamSocketConnectionManager::FilterReadCompleted() - Exception: CServerContext::ContinueHandshake() - An unknown error occurred while processing the certificate.CTCPWebSocketServer::ReadCompleted - Exception - CRequestHeaders::ValidateBasicRequestHeaders() - Handshake headers do not include header: "upgrade" with value: "WebSocket".

my version is Photon-OnPremise-Server-SDK_v4-0-29-11263

how can i fix it ?

Answers

  • hi, @GAGA

    how is your listener configured?

    best,

    ilya

  • GAGA
    GAGA
    edited January 2022

    are you ask about PhotonServer.config ?

    <WebSocketListener IPAddress="0.0.0.0"
                       Port="9090"
                       DisableNagle="true"
                       InactivityTimeout="30000"
                       OverrideApplication="Master"
                       Secure="true"
                       StoreName="MY"
                       CertificateName="abc.def.com"
                       UseMachineStore="true"/>
    <WebSocketListener IPAddress="0.0.0.0"
                       Port="9091"
                       DisableNagle="true"
                       InactivityTimeout="30000"
                       OverrideApplication="Game"
                       Secure="true"
                       StoreName="MY"
                       CertificateName="abc.def.com"
                       UseMachineStore="true"/>
    
    
    

       

  • Configuration looks good

    what client are you using?

    best,

    ilya

  • GAGA
    GAGA
    edited January 2022

    we use CocosCreator

    super(Photon.ConnectionProtocol.Wss, NetworkMgr.AppId, NetworkMgr.AppVersion);

  • @GAGA

    please check using this tool:

    Online WebSocket & Socket.io Tester - PieSocket. in the edit box just enter your wss address

    for instance for wss://ns.exitgames.com it returns next output:

    - Connection log will appear here
    - Connecting to: wss://ns.exitgames.com
    - Connection established
    - RECEIVED: ~m~36~m~6ceb7324-f272-44bf-b826-6740f8fc05e2
    - Connection closed
    

    you should see something like this too

    best,

    ilya

  • GAGA
    GAGA
    edited January 2022


     enter my wss address

    - Connection log will appear here
    - Connecting to: wss://abc.def.com:9090
    - Connection established
    - RECEIVED: ~m~36~m~cb7058c3-4348-4874-aa25-5f1abafd1141
    - RECEIVED: ~m~41~m~~j~{"vals":[227,1,229,0,228,0],"evt":226}
    - Connection closed
    

    deploy/bin_WinXX/log/Photon-LoadBalancing-.log

    CTCPWebSocketServer::OnError() - CFilteringStreamSocketConnectionManager::FilterReadCompleted() - Exception: CServerContext::ContinueHandshake() - An unknown error occurred while processing the certificate.

    help me please !

  • hi, @GAGA

    well, first thing is that your cocos client does not send correct request. I can not help here.

    about second error please clean up logs and try again. if you still see this message I would recommend to upgrade to photon 5. it much simpler to get all this stuff working using openSSL

    best,

    ilya