简体   繁体   中英

Connection to websocket has failed due to “ERR_CERT_DATE_INVALID”

I have online website in which SSL is installed. If I enter the website, I can see a valid SSL certificate in the website. Currently, the certificate is valid by November. I have a javascript code connects to my website websocket on port 8080. By last week, this worked perfect. 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:

    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:// ). Thus, check your Websocket server configuration and make sure that it provides a valid certificate too.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM