-
Notifications
You must be signed in to change notification settings - Fork 489
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can not open websocket when using https, but normal in http #182
Comments
Try Troubleshooting section of README and let me know the result of each step. It is often especially useful to try an environment with native WebWocket support like Chrome. Just guessing, but maybe the host does not provide a valid certificate matching the host name? Guessing so because I believe you cannot get a valid certificate for host name "localhost". Have you installed a fake certificate manually? |
Hi @gimite I install a self-signed certificate which generated by java SDK tool and below is certificate config in my server: server.ssl.key-store = keystore.p12 I followed the trouble shooting and still does not work The socket server I used : javax.websocket.server And in addition, It is working when we using Http instead of Https, all is OK when we use http, we can receive the "onopen onmessage" and so on, but Https can not. |
As mentioned above, it is often helpful to try it with Chrome to see if it works. I'm not so sure but I guess self-signed certificate is rejected by default, as browsers do when you access a self-signed HTTPS web site. Did you do anything special to workaround it e.g., installing a corresponding certificate to the client machine? |
Hi @gimite we changed the server.ssl.enabled-protocols = TLSv1.2 to TLSv1 and changed some ciphers and now is working fine, thank you for your help. |
Hi @gimite, I find a very strange case, when I connected websocket succefully, after about 1 hour later, the socket will disconnected automatically, and server side can not receive the disconnected event, and I get the message "[websocket closed]" in console from IE, can you help me ? Below is conslog log : |
Maybe something in-between (like a router) disconnected the TCP connection? Disconnection can happen (e.g., the network can be disconnected), and the application should somehow handle it (reconnect automatically, show an error message, etc.). |
HI @gimite As I mentioned in last comment form me, I get error code frame.opcode = 1001 ( from your code as attached pic), how can i get this event, where is the event (1001) came from? Flash player or my web socket server? I think it does not come from my web app server, because I did not see the error or other messages from my socket server, does flash player have some configuration or not? |
That looks like a packet sent from the server. |
@GiKyouGetsu Hey man, How did you set your ciphers ? I have the same issue,and set protocols to TLSv1 but still not work.Please let me know how to set the ciphers ,thanks! |
Hi @JayBishop, using ciphers TLS_RSA_WITH_AES_256_CBC_SHA,TLS_RSA_WITH_3DES_EDE_CBC_SHA,TLS_RSA_WITH_AES_128_CBC_SHA,TLS_RSA_WITH_RC4_128_SHA,TLS_RSA_WITH_RC4_128_MD5,TLS_RSA_WITH_DES_CBC_SHA is working for me, if you using springboot you config this like this: |
We try to connect the secure websocket, we can get the policy file and return the correct status when we request 843 port, but we still can not open the webscocket can not received the "onopen" event, and web socket can not establish, but we can connected successful when we connect not secure websocket (http), so what should i do ???
The text was updated successfully, but these errors were encountered: