Deluge looses or ignores port assignment

General support for problems installing or using Deluge
Lazybones
Leecher
Leecher
Posts: 62
Joined: Sat Dec 31, 2011 11:00 pm

Deluge looses or ignores port assignment

Post by Lazybones »

I have been noticing some odd behavior..

If I restart (using the init script restart) the daemon often looses its active port, or if I make changes on the Preference->network tab I sometimes notice the active port changes to a random one.

Both my Incoming and Outgoing ports are set to specific values and use random is unchecked.. I also have UPnP and NAT-PMP unchecked...

Does this happen to anyone else?

Client Version: 1.3.3 (Windows)
Server Version: 1.3.3 (Debian Wheezy installed from source)
Libtorrent Version: 0.15.9.0
Lazybones
Leecher
Leecher
Posts: 62
Joined: Sat Dec 31, 2011 11:00 pm

Re: Deluge looses or ignores port assignment

Post by Lazybones »

Was doing some digging on libtorrent docs and apparently the expected behavior is that if the preferred port is not available it will use a random one, however this raises questions:

Why is the port not available? When you change something on the network screen is the port not released? Does it get reset forcing a check on availability?
Could deluge not toss up an error or do a fault check if you have fixed ports but the active port does not match? Maybe auto retry releasing the ports and assigning them again?
Cas
Top Bloke
Top Bloke
Posts: 3681
Joined: Mon Dec 07, 2009 6:04 am
Location: Scotland

Re: Deluge looses or ignores port assignment

Post by Cas »

Have you tried leaving the outgoing ports on random.
Lazybones
Leecher
Leecher
Posts: 62
Joined: Sat Dec 31, 2011 11:00 pm

Re: Deluge looses or ignores port assignment

Post by Lazybones »

Cas wrote:Have you tried leaving the outgoing ports on random.
I can try that again, however I have them set for network QoS reasons so I can shape my Bittorent traffic..

However I am fairly sure that I switched it back to random and still sometimes found the inbound port was lost.
Lazybones
Leecher
Leecher
Posts: 62
Joined: Sat Dec 31, 2011 11:00 pm

Re: Deluge looses or ignores port assignment

Post by Lazybones »

Notice it had lost its ports again after a recent set of reboots, I set the outbound ports to random with no luck.. I had to toggle the inbound port to random, wait then toggle it back to my selected port before it would go back.
Cas
Top Bloke
Top Bloke
Posts: 3681
Joined: Mon Dec 07, 2009 6:04 am
Location: Scotland

Re: Deluge looses or ignores port assignment

Post by Cas »

What is the range of ports you are using?
Lazybones
Leecher
Leecher
Posts: 62
Joined: Sat Dec 31, 2011 11:00 pm

Re: Deluge looses or ignores port assignment

Post by Lazybones »

Inbound 3390
Out is now random
Cas
Top Bloke
Top Bloke
Posts: 3681
Joined: Mon Dec 07, 2009 6:04 am
Location: Scotland

Re: Deluge looses or ignores port assignment

Post by Cas »

I think using a single port is the issue, you are best to use a range of ports, say 10 or so. Plus, as mentioned in faq, you are best to use the ports numbers in the range of 49152 to 65535.
Lazybones
Leecher
Leecher
Posts: 62
Joined: Sat Dec 31, 2011 11:00 pm

Re: Deluge looses or ignores port assignment

Post by Lazybones »

Cas wrote:I think using a single port is the issue, you are best to use a range of ports, say 10 or so. Plus, as mentioned in faq, you are best to use the ports numbers in the range of 49152 to 65535.
More than a single inbound port seems odd for a torrent client, also if I read the libtorrent API correctly it only binds to one inbound port out of the range anyway. I might open it up to two ports to reduce the chance of binding failure.

Random outgoing ports is standard, I can live with that, however it makes QoS a little less clean..
Cas
Top Bloke
Top Bloke
Posts: 3681
Joined: Mon Dec 07, 2009 6:04 am
Location: Scotland

Re: Deluge looses or ignores port assignment

Post by Cas »

Lazybones wrote: More than a single inbound port seems odd for a torrent client, also if I read the libtorrent API correctly it only binds to one inbound port out of the range anyway. I might open it up to two ports to reduce the chance of binding failure.
It only uses one port at a time but if you restart Deluge and your pc/router is still holding that port connection open it cannot use it until its freed. The libtorrent api does mention this point:
listen-port wrote:If all ports in the specified range fails to be opened for listening, libtorrent will try to use port 0 (which tells the operating system to pick a port that's free).
Post Reply