-
-
Notifications
You must be signed in to change notification settings - Fork 4k
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
bind ip address to network interface seems to require restart if ip address has been changed #6495
Comments
IINM, this is a fundamental issue of an Internet-using server like qBittorrent (peer-to-peer programs are both client and server). One of the first things the program has to do is declare to the TCP/IP stack that it is listening: a process known as binding. That involves telling it which interfaces/addresses and ports it is using. In order to change something this fundamental, it has to release the bind and then re-bind, but that means peers and so on have to find you again. All in all, it can get pretty complicated, thus why it's left for something to be done the next time it starts up. |
@WhosAsking I am afraid I don't understand your objection to releasing the previous bindings, then rebinding under a new IP address, in the case that the previously used interface or local address becomes unavailable. Is it strictly a question of design complexity, or do you believe that such a change would result in unwanted behavior? I suggest that preserving the previous peer connections should not be a driving consideration, because as the original report correctly indicates, once a particular local address is lost and replaced with a new one, not only is it impossible to maintain the previous connections, but the overall feature has limited usefulness unless the application attempts to make new connections using the new address. Broadly, then, the application should maintain connections over one interface and address at a time, and certain events should cause it to break connections over and unbind from a previous address, and begin again with a new one. Do you agree with this suggestion, and if not, would you please offer your reasoning? |
Two bits worth, I tend to agree with @brainchild0 . |
qBitTorrentx64/v4.0.4, Windows 10x64 Home, 1709 16299.192 OK, as far as I can tell it's fixed with v4.04, not a 100% with v4.0.3. In my testing I can now start qBitTorrent with:
I believe that's the functionality we all wanted on the torrent side. Great work team!Not sure if this is a worry but:
^ You would not use 'Any Interface' whilst using a VPN, unless it's application had an in-built Firewall. |
fullstop: folks jumping the gun here a bit remember you need to have both the interface AND the ip set in the options for the binding to work correctly if you just set the ip it will use your public IP until the vpn is up. which defeats the point of binding now if your only connection is though the vpn this isn't a problem if its not and e.g you want to start the vpn on demand for torrent tasks it still doesn't detect the interface state change correctly |
if you set the interface to the TAP adapter it does indeed come up when the vpn comes online. however it still displays RED incoming connection state and still complains about in the log also takes a good 30 seconds to come up 3/2/2018 12:26 AM - qBittorrent failed listening on interface vpn.ip.here.0 port: TCP/4242. Reason: The requested address is not valid in its context. |
I uploaded a video of the issue in-action make sure to pay attention to what I am saying in the video particularly the bit about bind to IP's scope not being limited to the selected interface which I think part of the issue there and qbit continuing to use the public ip interface even after the vpn is established |
Just wanted to add that I still have this problem also in 4.04. I am binding to my virtual network adaptor for my VPN, but as soon as I change IP in my VPN software qBitorrent requires a restart for it connect to trackers. A good way to see if its working or not is to test a known working torrent with lots of trackers. Once you change the ip of the binded VPN interface all those trackers will gradually appear as not working and in the message field you get the message: "the requested address is not valid in its context". |
I'm running 4.1.2 and i still have the same issue. Nothing has been changed. If i get a new IP address i need to restart qBT. |
Just repeating Sopor for v4.1.5, same issue. My VPN provider has decided to start changing my IP several times a day, connection stays live, qBT is bound to its interface, All IP Addresses, but all torrents cease until I restart the qBT. |
Check out this app I found. https://github.com/dynamichael/qConnectionSitter It watches the network interface for disconnect/reconnect and restarts qBittorrent when the connection is re-established. Having this built into qBittorrent would be the best solution, but this has resolved the issue of having to manually restart qBittorrent every time my VPN disconnects/reconnects. |
bumping this, this is getting tiresome maby target for 5.0 ? |
I can confirm this issue and would love a fix |
I wrote a script to re-bind qBittorrent to a specified interface, it updates the config and restarts qBittorent if your IP has changed. See here: https://github.com/bazg177/qBittorrent-binder/blob/master/qBittorrent-binder.bat |
I think this was fixed in 4.2.x since it supports Interface/IP address changes without requiring a restart. |
Great, will check this out |
In the advanced settings i can bind qBT to my network interface instead of my IP address and that sounds like a very good idea but even if the optional IP address is set to 'All addresses' it still require a restart of qBT if my IP address has been changed. I'm aware that both settings require restart but for me that is if i change the settings and not if the IP address get changed. If this require a restart then i can't find any use of this feature. So i wondering if something is wrong or this need to be fixed?
qBT 3.3.10
Windows 7
The text was updated successfully, but these errors were encountered: