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
Bug: bind address/port already in use #457
Comments
Hey there, I am experiencing the exact same behaviour running shinyproxy 2.6.1. It just seems to randomly occur and currently we just have to restart docker to get this working again.. Thanks! |
Interesting case! |
24.0.7 |
Hi |
I'm unable to reproduce this issue. It seems like the
Hopefully with this information I'm able to set up a similar environment and reproduce the problem. |
|
Thank you for the details, the issue with ZFS sounds interesting, I could try to use a ZFS host. At least it seems your server has enough resources, so I don't think we need to look into that direction. W.r.t to the application.yml, you can strip any secrets and urls, I just want to make sure there are no unexpected things in it (e.g. low-level spring settings). |
Yes, resource testing was the first thing I jumped to when I saw CPU logs on netdata - which is why Server B has 8 VCPU and it still wouldn't alleviate the issue. Port range start was changed to 40k as I originally thought that got rid of the issue when we got the same error on 20k ports.
|
Hi @spinanicky I was not able to reproduce this consistently, but I have seen it happening a few times randomly as well. As mentioned above it seems the |
@LEDfan you have been very active - my email is flooded with your name :-) I will have a look over the weekend, but don't let this hold you up with a release. Thank you for testing. |
Thank you for pushing the update. We've got the same issue with our installation, so +1 to this. I'll upgrade now, and see if it fixes it. On the side note, you could request port |
@LEDfan is this normal: I am also seeing in the lsof established table that Shinyproxy seems to be taking both IPv4 and IPv6 routes and forwarding them to ports. I am going to try and disable IPv6 on the docker network and see if that does anything. |
@LEDfan - the bug persists with the new release. <driver failed programming external connectivity on endpoint sp-container-d968fae8-6410-4d94-b924-5a96fd0248cc-0 (24782c3abc75b009fd8d49afe09cb6201da9901bc1cb50cf85d15be3bb8e4493): Error starting userland proxy: listen tcp4 0.0.0.0:40002: bind: address already in use"} |
Hi @spinanicky that is unfortunate, I'll continue having a look. |
Running 3.0.2 and we have tried several approaches to fixing this issue (including restarting both docker and shiny before a large group signs on).
Long story short we keep getting errors saying the port is already in use. It is hit an miss where sometimes we have 60+ users connected and sometimes we get to 10 and it starts throwing this error.
EDIT: we are seeing two different errors:
Bind for 0.0.0.0:[0-9]+ failed: port is already allocated
listen tcp4 0.0.0.0:[0-9]+: bind: address already in use
There are no containers listed in shinyproxy or docker as running on that port.
Yet even after killing the process the error still persists with the same port "being occupied". We are seeing this occur over and over again and I believe it is tied to what others have seen here as well:
https://support.openanalytics.eu/t/error-500-port-is-already-allocated/604
I created a script as an interim solution to try and rapidly kill hung containers (note: you have to update the path to your shinyproxy log on line 10):
https://gist.github.com/spinanicky/d82763292cacf357b26fd2dfcf11836c
The text was updated successfully, but these errors were encountered: