I have an app that is using Django with Nginx alongside with Django Channels. App is dockerized and it is communicating with Nginx on localhost. Recently, we started to work on the version that would use USB Armory for safe storage of important files. And there comes the problem. We are currently using 3 servers to host our app (let's call it A, B and C). All of them handle the basic version of our app (without USB Armory) very well, with no issues. However, once USB Armory is used (no matter if its the real one, or only the emulated docker container), on one machine, the websockets seem to be broken, and in the logs I see that they are disconnected after handshake. Keep in mind, that the logic behind those websockets is the same in all versions of the app, and the Dockerfile we are using have specified versions of libraries, so all three machines have the same environment, alongside with Nginx version and its configuration. I've tried to look through system and nginx log in order to find the cause, but can't seem to get any. I wonder what might be the cause of the same app with the same libraries and code working this much different on one machine.
What is also interesting is that on some rare occasions, on the machine that has problems with Websockets, some of the websockets are opened correctly, but its mostly one-time exception.
question from:
https://stackoverflow.com/questions/65830419/websockets-acting-strangely-on-only-one-server-disconnecting-after-handshake 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…