wss : failed: Error in connection establishment: net::ERR_SSL_VERSION_OR_CIPHER_MISMATCH

0471huhehot

将http改成https后出错,原来在http中没问题的,现在改成https后,浏览器提示:98:261 WebSocket connection to 'wss://www.xsdancer.com:8282/' failed: Error in connection establishment: net::ERR_SSL_VERSION_OR_CIPHER_MISMATCH
代码:

$context = array(
    'ssl' => array(
        'local_cert'  => '/www/server/panel/vhost/ssl/fullchain.pem', // 或者crt文件
        'local_pk'    => '/www/server/panel/vhost/ssl/privkey.pem',
        'verify_peer' => false
    )
);
// gateway 进程,这里使用Text协议,可以用telnet测试
//$gateway = new Gateway("websocket://0.0.0.0:8282");
$gateway = new Gateway("websocket://0.0.0.0:8282",$context);//ssl方式

$gateway->transport = 'ssl';// 开启SSL,websocket+SSL 即wss
5487 1 0
1个回答

latin

debug方式运行,看下服务端报错

  • 0471huhehot 2019-09-26

    debug方式运行了,浏览器连接的时候没有任何提示,只有浏览器提示:WebSocket connection to 'wss://xsdancer.com:8282/' failed: Error in connection establishment: net::ERR_SSL_VERSION_OR_CIPHER_MISMATCH

年代过于久远,无法发表回答
×
🔝