Author Topic: Qbittorrent will not reconnect after vpn disconnect and reconnect, must restart!  (Read 5488 times)

darkhunter

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
So if I have Qbittorrent running and the vpn drops, all torrents stop (it's bound to the VPN network interface in advanced settings), this is awesome!

But when the VPN reconnects, qbittorrent will not resume the downloads even though the VPN is back up.

I noticed that the network interface gets assigned a different IP when it comes back up, perhaps this is what's causing the problem? If so can we get qbittorrent to ignore ips when resuming from a network interface?

bjd223

  • Newbie
  • *
  • Posts: 14
  • Karma: +1/-0
    • View Profile
I noticed this also. I think if you wait long enough they will start downloading again but I'm not sure. uTorrent seems to handle this better as the files start to download again right after reconnection.

As VPNs become more popular maybe the way qBittorrent handles these situations should be optimized.

Even adding new torrents when it is in this state seems to do nothing.

saltyseadog

  • Newbie
  • *
  • Posts: 13
  • Karma: +0/-0
    • View Profile
Not sure if this a help or not. I use AirVPN which has a forwarded port option which designates specific port numbers which can be assigned to specific apps, in this case qBittorrent. You then add the port number to the Incoming Connections port in qBittorrent.

bjd223

  • Newbie
  • *
  • Posts: 14
  • Karma: +1/-0
    • View Profile
Not sure if this a help or not. I use AirVPN which has a forwarded port option which designates specific port numbers which can be assigned to specific apps, in this case qBittorrent. You then add the port number to the Incoming Connections port in qBittorrent.

My VPN also supports forwarded ports, I'm specifically using PIA. Pretty much what happens is everything is working great, with ports being open etc. Then you manually disconnect the VPN to test the interface binding you set in the advanced settings is working.

The torrent download stops, because it can't send/receive over the TAP adapter which is good.

Then you re-connect the VPN, which gives you the same IP/port forward from the VPN, but the downloads never seem to start.  It's almost like the app never detects that the connection is back up, so it never starts trying to download again.

Manually refreshing trackers doesn't start the DLs again. And adding new torrents stay at stalled until you close & re-open the app, in which case they begin immediately as you would expect.

This is not the worst behavior, but it would be nice if the app started to download again in a reasonable amount of time so if it happens in the middle of the night your files still download.

I'm not sure how the app handles an adapter disconnection when it is set to "Any Interface". It may run into the same issue.

alain93

  • Newbie
  • *
  • Posts: 13
  • Karma: +0/-0
    • View Profile
Hi,
 I'm using VPNetMon, it shuts off any app when VPN goes down and restart apps when VPN is back.

tvconsumer411

  • Newbie
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Add me to the ME TOO list. 

Until I read this thread, I wasn't sure exactly what was happening.  All I knew was that frequently I had to restart qBittorrent to get it downloading again. 

After reading here and checking closer, "me too".

Thanks

sledgehammer_999

  • qBittorrent maintainer
  • Administrator
  • Forum addict
  • *****
  • Posts: 2406
  • Karma: +150/-2
    • View Profile
This is because your VPN after every reconnect it gives you a new local ip for the VPN interface, while qbittorrent(basically libtorrent) still continues to listen to the old one. You should check with your software and or provider on how to prevent that.
The VPN interface should have the same local ip on your machine, there is no security advantage in changing that.
Relevant libtorrent bug report: https://code.google.com/p/libtorrent/issues/detail?id=713

lunarpoo

  • Newbie
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
"You should check with your software and or provider on how to prevent that."

This can't be solved by blaming the other guy.  Disconnects are going to happen, especially on home cable/DSL connections, which are by far the bulk of torrent endpoints.  Using a VPN to torrent is very popular, and getting more popular every day, especially with privacy issues we've faced lately.  Most VPN providers don't provide static IPs with their standard service, just like ISPs.  This seems to be an error detection/ error recovery issue.  I'm glad we have an explanation, but a fix would be much better.  uTorrent already handles this pretty well (though admittedly it takes much longer than it should to recover). 

The real issue is users who have 100+ torrents seeding 24/7.  Restarting the client seems to require a recheck on a lot of torrents, more often than not.  With 1T of data on a NAS to check, it takes a while. 

Mike_EE

  • Newbie
  • *
  • Posts: 19
  • Karma: +1/-0
    • View Profile
"You should check with your software and or provider on how to prevent that."

This can't be solved by blaming the other guy.  Disconnects are going to happen, especially on home cable/DSL connections, which are by far the bulk of torrent endpoints.  Using a VPN to torrent is very popular, and getting more popular every day, especially with privacy issues we've faced lately.  Most VPN providers don't provide static IPs with their standard service, just like ISPs.  This seems to be an error detection/ error recovery issue.  I'm glad we have an explanation, but a fix would be much better.  uTorrent already handles this pretty well (though admittedly it takes much longer than it should to recover). 

The real issue is users who have 100+ torrents seeding 24/7.  Restarting the client seems to require a recheck on a lot of torrents, more often than not.  With 1T of data on a NAS to check, it takes a while.

As I just wrote in a very similar thread, this happens with other clients as well, partially because your PC and the other clients take time to update their routing tables and qBT has to update incoming requests. I have several systems running and the one with the most torrents (4500+) takes about 30 minutes to get back to full speed, and this is exactly what I experienced with uTorrent.

IronMan

  • Newbie
  • *
  • Posts: 17
  • Karma: +0/-0
    • View Profile
Hi,
 I'm using VPNetMon, it shuts off any app when VPN goes down and restart apps when VPN is back.

What command line option did you use for shutting down qbittorrent on Windows ?

ArmchairArchitect

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
4.5 years since the original post; has this issue been fixed yet?

Still having the same issue on my end.

donknotts

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
4.5 years since the original post; has this issue been fixed yet?

Still having the same issue on my end.
Same here. I'm switching back to an old version of Āµtorrent until this is is fixed as this is basically unusable for me with my dodgy wireless internet service.