Hi folks, i'm trying to get my simple websocket client to work with ktor 1.5.0 and the cio engine. When I run it locally I have no issues, but when its bundled inside a jib built docker container (adopt open jdk 14) its hanging:
I've tried it against two different websocket severs ... The first screenshot is where it hangs when running inside docker. And the 2nd is where it successfully connects when running on my linux machine.
tim
01/06/2021, 7:51 PM
Successful connection:
tim
01/06/2021, 7:53 PM
Tried downgrading to ws and it connects successfully then 🤔 🤷
tim
01/06/2021, 8:10 PM
Hmm it appears to be something with my network or my laptop/os 😞
tim
01/07/2021, 9:47 AM
Update on this in case anyone else runs into the same issue. The container i'm using is a minimal alpine container for the jre ... which doesn't install ca certificates by default and so web sockets cannot verify the server and it hangs. Would be great if there was a better error message!
Anyways the fix is simply to add the certificates to the container.