简体   繁体   English

由于“ERR_CERT_DATE_INVALID”,与 websocket 的连接失败

[英]Connection to websocket has failed due to “ERR_CERT_DATE_INVALID”

I have online website in which SSL is installed.我有安装 SSL 的在线网站。 If I enter the website, I can see a valid SSL certificate in the website.如果我进入网站,我可以在网站中看到有效的 SSL 证书。 Currently, the certificate is valid by November.目前,该证书的有效期为 11 月。 I have a javascript code connects to my website websocket on port 8080. By last week, this worked perfect.我有一个 javascript 代码在端口 8080 上连接到我的网站 websocket。到上周为止,这很完美。 But suddenly, without making any changes to the website at all, everyone who enter the website gets the error:但是突然间,根本没有对网站做任何更改,每个进入网站的人都会收到错误:

WebSocket connection to 'wss://myWebSiteXXX:8080/' failed: Error in connection establishment: net::ERR_CERT_DATE_INVALID

This is the js code that tries to connect:这是尝试连接的js代码:

    const conn = new WebSocket('wss://myWebSiteXXX:8080');

Why is that?这是为什么?

https://website/ and wss://website:8080/ might be the same host but are two different server configurations - one for port 443 and one for port 8080. You've checked only the certificate for the first server ( https:// ) but this is likely not the same certificate as for the seconds server ( wss:// ). https://website/wss://website:8080/可能是同一个主机,但有两种不同的服务器配置 - 一个用于端口 443,一个用于端口 8080。您只检查了第一台服务器的证书 ( https:// ),但这可能与秒服务器( wss:// )的证书不同。 Thus, check your Websocket server configuration and make sure that it provides a valid certificate too.因此,请检查您的 Websocket 服务器配置并确保它也提供了有效的证书。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 无法通过 ERR_CERT_COMMON_NAME_INVALID 在 CodeSandbox.io 上获取 API? - Failed to fetch API on CodeSandbox.io with ERR_CERT_COMMON_NAME_INVALID? Websocket连接被拒绝。 WebSocket与'ws://127.0.0.1:2000 /'的连接失败:连接建立错误:net :: ERR_CONNECTION_REFUSED - Websocket connection refused. WebSocket connection to 'ws://127.0.0.1:2000/' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED chrome 扩展 WebSocket 连接到“ws://localhost:9090/”失败:连接建立错误:net::ERR_CONNECTION_REFUSED - chrome extension WebSocket connection to 'ws://localhost:9090/' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED Apollo Explorer 加载资源失败:net::ERR_CERT_AUTHORITY_INVALID - Apollo Explorer Failed to load resource: net::ERR_CERT_AUTHORITY_INVALID WebSocket 连接到“wss://ip:8080/”失败:连接建立错误:net::ERR_CONNECTION_REFUSED - WebSocket connection to 'wss://ip:8080/' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED WebSocket 连接失败:连接建立时出错:.net::ERR_CONNECTION_REFUSED - WebSocket connection failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED 与'ws://。/'的WebSocket连接失败:连接建立错误:net :: ERR_NAME_NOT_RESOLVED - WebSocket connection to 'ws://./' failed: Error in connection establishment: net::ERR_NAME_NOT_RESOLVED Javascript 套接字(失败:WebSocket 握手期间出错:net::ERR_CONNECTION_RESET) - Javascript Sockets (failed: Error during WebSocket handshake: net::ERR_CONNECTION_RESET) Django 通道失败:WebSocket 握手期间出错:net::ERR_CONNECTION_RESET - Django Channels failed: Error during WebSocket handshake: net::ERR_CONNECTION_RESET wss上的WebSocket连接失败 - WebSocket connection on wss failed
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM