qbitorrent fails with open port / works with other ports

Windows specific questions, problems.
Post Reply
dkazaz

qbitorrent fails with open port / works with other ports

Post by dkazaz »

OK, this is the most bizarre thing ever.

It started last night.

I have been using qbitorrent for years, probably since v.2 and always had it set to listen to the same port.
I have this port open on my router (a Draytek Vigor 2820) just for the IP address of my desktop PC. I also have UPNP disabled on my router for security reasons.
My configuration has stayed the same since 2012.

Last night I started qbitorrent and noticed it was not downloading. All torrents were "stalled" and all trackers listed as "not contacted yet".
I tried a few changes to settings including "Always announce to all trackers". Nothing worked. I changed the port on the router and the client, nothing again.

Finally I unistalled the client, with its settings and did a clean install - bam it worked. But it worked with a random port, not forwarded on my router. The connection icon at the bottom starts yellow and then turns green. Now qbitorrent only works with a random port assigned at startup - if I set it to the port open on my router it fails again.

The only change I made recently was installing VMWare workstation. I know it installs some virtual network drivers but this shouldn't matter. Incidentally, the Transmission client works fine with the open port.

This is very confusing for me, for the following reasons:

1) The configuration has always worked - what changed now?
2) I always thought that the client could only listen on open ports - how is it working with random ports? I'm starting to think all my networking knowledge is wrong?
3) Why does it fail on the open port when transmission works?

Any answers to the above will be greatly appreciated! :)
unseen19
Veteran
Veteran
Posts: 188
Joined: Mon Mar 15, 2021 1:36 pm

Re: qbitorrent fails with open port / works with other ports

Post by unseen19 »

Hi,

-As UPNP is disabled (good) is your fixed IP still correct on the computer. Portforwarding correct too to this IP?
-Prior launching QBT is the defined port not used by another process ("netstat -ano")
-is the windows inbound firewall rules still present? If you select in it a program instead of just the port, the path is correct?
-anything in the logs?
-Configured port reachable from outside? (favorite search engine with query "check open port" will give you sites to do it
dkazaz

Re: qbitorrent fails with open port / works with other ports

Post by dkazaz »

Thank you so much for answering. To answer your points:

- Yes port forwarding is to the correct IP
- Prior to launching QBT the defined port was not used by another process, except when I installed Transmission in order to test. Afterwards, I changed the port to ensure they were not on the same one.
- Firewall rule is working (I use bitdefnder) for both in and outbound. However when I reinstalled QBT, windows (not bitdefender) asked me to set the rule again. The path is correct.
-Configured port is reachable from outside (I tested)
-The logs have a lot of entries like these:
"C) 2021-04-07T23:32:19 - Failed to listen on IP: 192.168.2.46, port: TCP/44433. Reason: An attempt was made to access a socket in a way forbidden by its access permissions
(C) 2021-04-07T23:32:19 - Failed to listen on IP: 192.168.26.3, port: TCP/44433. Reason: An attempt was made to access a socket in a way forbidden by its access permissions "

The strange thing about the logs, is that they suggest QBT was trying to listen at multiple local IP addresses (!?) which I totally don't get. With the exception of the first one, the rest do not actually exist in my LAN.

I suspect this is nonsense is windows related but still its very strange, especially the logs with the multiple IPs.
Also, since the ports were definitely open, what doe the message about "a way forbidden by its access permissions" mean?

Thanks again for the help!
unseen19
Veteran
Veteran
Posts: 188
Joined: Mon Mar 15, 2021 1:36 pm

Re: qbitorrent fails with open port / works with other ports

Post by unseen19 »

Some attemps;

- bind QBT to a specifi NIC. Once launched the default is a binding to any NIC with the configured port. You should have virtual network or else to have something with 192.168.26.X
- Is QBT launched with a service? Any specific user?
- what if you launch QBT as administrator?
dkazaz

Re: qbitorrent fails with open port / works with other ports

Post by dkazaz »

Hi again,
first the good news. As of this morning QBT can connect through the open port. Everything is working ok.

Now the bad(ish) news. I have not changed anything, so I have no explanation for what the problem was or why it went away or why QBT was attempting to listen on multiple IPs which do not exist.

So although my problem is solves, I am no wiser on what caused it or how to avoid it in future.

I am wondering if it could relate to windows networking and caching somehow...
unseen19
Veteran
Veteran
Posts: 188
Joined: Mon Mar 15, 2021 1:36 pm

Re: qbitorrent fails with open port / works with other ports

Post by unseen19 »

I can only open ports on computer's IPs. If you type "route print", what's listed in the first part "Interface List" ?
There should be all permanent interface you own, but virtual NIC can also exist by virtualization APP/SW for example

Nothing new recently on the APP side?
dkazaz

Re: qbitorrent fails with open port / works with other ports

Post by dkazaz »

Hi again, sorry for the delay in responding, work's been a bit busy.

Route print yields the following:
......Realtek Gaming GbE Family Controller
......TAP-Windows Adapter V9
......Intel(R) Wireless-AC 9260 160MHz
......Microsoft Wi-Fi Direct Virtual Adapter
......Microsoft Wi-Fi Direct Virtual Adapter #2
......VMware Virtual Ethernet Adapter for VMnet1
......VMware Virtual Ethernet Adapter for VMnet8
......Bluetooth Device (Personal Area Network)
......Software Loopback Interface 1
......Hyper-V Virtual Ethernet Adapter
......Hyper-V Virtual Ethernet Adapter #2
......Hyper-V Virtual Ethernet Adapter #3
......Hyper-V Virtual Ethernet Adapter #4

As previously mentioned, the only recent change that seems relevant and coincided with the start of the problem, was instslling VMWare Workstation,which in turn installs Hyper-V. Both of these install several virtual adapters, as can be seen above.

It seems likely that this is somehow related, but I do not understand the specifics and I would like to.

Thanks again for all your help!
unseen19
Veteran
Veteran
Posts: 188
Joined: Mon Mar 15, 2021 1:36 pm

Re: qbitorrent fails with open port / works with other ports

Post by unseen19 »

Well understandable ;)

Due to the nature of the process owning the Virtual NIC or the security it may comes with I think this is a real good start.
As libtorrent tries to bind any NI but you only need to bind to the local computer real NIC try to bind it to the correct one only in the preferences.
Once done you will get rid of such I think
dkazaz

Re: qbitorrent fails with open port / works with other ports

Post by dkazaz »

Sounds like a good idea. I will do that and report back. Thanks!
Post Reply