-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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't remove server a user by port in the manager if a plugin failed to initialize #1612
Comments
Just tried with your provided commands: Adding a new server with a plugin that doesn't exist in the local environment:
ssmanger's log:
Port
So it couldn't be reproduced. |
The issue is not with a specific port, its with adding a lot of configurations with V2Ray and running into a race condition where a server fails to bind to a port. After it fails to bind, it's neither possible to remove the server from the manager, nor re-add it. The port is occupied but is unusable. The only solution is to restart the manager at the moment. |
I can attach a repository with a Go program that allocate 500 ports and start 500 SS+V2Ray servers for easier reproduction, if needed |
If I understand it correctly, the |
yes, that's the problem. And for context, I am able to send SIGKILL to a plugin to kill it, but when there's 500 instances it's hard to distinct between them, so preferably |
If any of the plugin processes exited unexpectly, the watcher will exit with an error message: shadowsocks-rust/crates/shadowsocks-service/src/server/server.rs Lines 193 to 207 in 4c2bdae
which will eventually cause the server's In your case, I suspected that You can still enable |
Below are logs using Here is one of them (see
And this is what V2Ray plugin stdout emitted:
Here's |
Replaced FutureUnordered with futures::select_all, and put all sub-tasks into individual tokio tasks.
Please try with the latest commit. |
works like a charm now, thank you for such a fast fix! |
I'm running a shadowsocks server in manager mode, where each config is using v2ray plugin and stress testing it with 300 and more configurations. Sometimes it errors (because of race conditions).
Here is the code I am adding users with (it's in Go, can be written in any other language):
Here's an example of such kind of an error:
Running this:
Doesn't have any effect. The port is still occupied:
$ fuser 45703/tcp 45703/tcp: 72350 $ ps aux | grep 72350 v1rtl 72350 0.0 1.2 2876384 417264 pts/0 Sl+ 22:09 0:01 ssmanager -c config.json
I'm using this config for shadowsocks-manager:
Specs
The text was updated successfully, but these errors were encountered: