-
-
Notifications
You must be signed in to change notification settings - Fork 322
Docker images not working as expected with SSL #449
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
Comments
Now I'm aware of the distroless issue. I still don't know what causes the segmentation fault, yet I've tried several times and had no luck replicating the issue. Do you have a step by step guide for this? I'm trying to get my hands dirty. |
Ok! i've looked into this a lot more today. This issue only seems to happen when Strange thing is with the same exact configuration With a bunch of experimentation i can confirm that this issue still happens even if i use an older version of alpine (such as the one that was on the older images). So the issue is either present in the soketi code or the uWebsockets code (not the image itself). Ill continue to dig into this tomorrow! |
Ok i've looked into this more, a couple of releases ago uWebSockets.js released an update that moved their cryptographic package away from OpenSSL and instead used BoringSSL. This seems to have broken SSL or somehow changed what is required. v20.1.0 release notes here: https://github.com/uNetworking/uWebSockets.js/releases/tag/v20.1.0 For now i've created a PR to revert to v20.0.0 to get SSL working. However i will also create a ticket in the upstream repo and get this fixed there. I have tested this and can confirm this fixes the issue. |
Apparently Alpine isn't supported at
Thoughts? |
I can, at most, set up a parallel image for Debian-based Node.js, just to keep the reverse compatibility with the current Alpine images. uWebSocket should work fine non-SSL in Alpine, right? |
Yeah, I've had no issues without ssl and reverse proxy configs seem fine. We might just need to monitor it as features could break at anytime. A Debian image would be good though gives some options. |
Absolutely not. Never has been. Alpine is a muslc distro that, in their own FAQ:
Besides, muslc will ruin performance of uWS if it even manages to run without blowing up immediately. It is sheer luck that it hasn't blown up before. I tested SSL support and it worked just fine. |
Will be released in next 0.x update. |
There are small glibc Docker images. Busybox is one that is 5MB or something. We can only support Node.js from an enterprise perspective; LTS versions and only on official platforms. If Node.js were run by Apple or Microsoft or Oracle or ant such company, this would be enforced and always correct, but Node.js is run by partly companies and partly amateurs who just mix and match with the sources as they like, without caring the slightest about ABI rules. For instance, some distros compile Node.js with entirely wrong OpenSSL versions which breaks compiled modules. And they do this because they want all packages to use the same OpenSSL version, and will gladly break ABI that way. So right now the only dependency we have is glibc and that is a hard dependency.
This mentality worries me. Instead of just following set rules, the mentality here is to further break the rules only to use unsupported platforms, which are not even good for uWS - for instance we rely on memchr which is SIMD optimized in glibc and entirely unoptimized for loop in muslc. And we know that BoringSSL is 18% faster than OpenSSL for the loads we see, so nothing of this is for the better. |
We have just updated our docker images, we were stuck on the
soketi/pws
images for a while. After taking a look a the newer images located atquay.io/soketi/soketi
i have noticed two issues.-alpine
seem to have a segmentation fault and don't work at all. The seg fault happens as soon as you try to connect to the echo server from a frontend application.-distroless
seem to no longer be generating since about 2 months ago (last one was0.30.2-16-distroless
). Its worth noting these images are recommended for production in the documentation. here: https://docs.soketi.app/getting-started/installation/dockerI have confirmed that the distroless images do not have the seg fault and work fine. I have also confirmed the seg fault was not present in the older
soketi/pws
images.The text was updated successfully, but these errors were encountered: