This forum has been archived. All content is frozen. Please use KDE Discuss instead.

UPNP not working

Tags: None
(comma "," separated)
imported4-nvivo
Registered Member
Posts
6
Karma
0

UPNP not working

Sat Sep 03, 2011 12:23 pm
Hi,

I have been having this problem that the UPNP doesn't work for me in ktorrent.
I use Archlinux x64, tried both the official package (4.1.2) as the latest from git repository, but it doesn't seem to make any difference.

I even tried deleting the ~/.kde4/share/apps/ktorrent and ~/.kde4/share/config/ktorrentrc for a clean start, I then enable the UPNP and nothing happens. Neither ktorrent nor the router shows the forwarded ports.

If I use any other torrent client (deluge, transmission or even utorrent through wine), the router shows the ports open through UPNP. Only ktorrent is not working.

The only thing I get from the log file is:

Sat Sep 3 09:13:51 2011: Doing port mappings for POSIX UPnP/1.0 DD-WRT Linux/V24
Sat Sep 3 09:13:51 2011: Forwarding port 6881 (TCP)
Sat Sep 3 09:13:51 2011: UPnP: GetExternalIP failed:

I'm not posting this as a bug because I have been having this problem for about 1 year, recompiling from git every other month, but I can't find anyone else complaining about this problem anywhere, so I find it hard to believe this would be a bug that nobody noticed for more than one year.

Also, ktorrent 4 used to work fine in the same router sometime ago, so I'm not sure what happened.

Is anyone else having this problem or is it just me? Does anyone have any idea on what could be happening?

Thanks.
George
Moderator
Posts
5421
Karma
1

Re: UPNP not working

Sun Sep 04, 2011 9:31 am
Can you take a wireshark trace of the UPnP communication ?
sisquo
Registered Member
Posts
7
Karma
0

Re: UPNP not working

Mon Sep 05, 2011 12:40 am
Have you enabled the UPnP plugin?
imported4-nvivo
Registered Member
Posts
6
Karma
0

Re: UPNP not working

Mon Sep 05, 2011 12:51 am
Hi,

Attached is the wireshark trace.

The trace is for the following actions:

* start up ktorrent (4.2dev, compiled from git on saturday)
* go to the upnp tab
* click "rescan"
* select LAN device and click "forward"

Following the TCP stream, it seems that ktorrent is receiving a 404 not found doing some queries against the router.

I did the same with utorrent, and transmission that are working fine, and I noticed the following difference:

ktorrent does:
POST /control1780FWANIPConnection HTTP/1.1

transmission does:
POST /control?WANIPConnection HTTP/1.1

Would it be an encoding problem creating the query string?
imported4-nvivo
Registered Member
Posts
6
Karma
0

Re: UPNP not working

Mon Sep 05, 2011 12:58 am
BTW, my system locale is en_US.UTF-8, but KDE is setup for pt_BR, if that helps.
George
Moderator
Posts
5421
Karma
1

Re: UPNP not working

Mon Sep 05, 2011 4:46 pm
It seems that ktorrent somehow messes up the path in the HTTP post request.

It should be /control?WANIPConnection and ktorrent makes /control1780FWANIPConnection of it. Not sure yet why.
George
Moderator
Posts
5421
Karma
1

Re: UPNP not working

Mon Sep 05, 2011 5:14 pm
OK found the solution, will commit later today
imported4-nvivo
Registered Member
Posts
6
Karma
0

Re: UPNP not working

Sun Sep 18, 2011 1:22 am
Hi George.

Thanks for looking into this.

Any idea when the code will be fixed in the git repository? Just recompiled from sources today both ktorrent and libktorrent, but still getting the same issue.
George
Moderator
Posts
5421
Karma
1

Re: UPNP not working

Tue Sep 20, 2011 4:09 pm
I have pushed it to the git repository. It was sitting in a local repository which I had not yet pushed to the server.
imported4-nvivo
Registered Member
Posts
6
Karma
0

Re: UPNP not working

Sat Sep 24, 2011 12:48 am
Hi George,

I saw your commit, just compiled from source but the problem persists. Just did the wireshark trace, and this is what I got:

POST /control%3FWANIPConnection HTTP/1.1

Looks like it is still encoding the question mark, but now using HTML encoding.

Is there any other info I can provide to help?
George
Moderator
Posts
5421
Karma
1

Re: UPNP not working

Sat Sep 24, 2011 4:41 pm
Should be fixed now
imported4-nvivo
Registered Member
Posts
6
Karma
0

Re: UPNP not working

Thu Sep 29, 2011 11:29 am
Thanks, it is working now!


Bookmarks



Who is online

Registered users: Bing [Bot], daret, Google [Bot], sandyvee, Sogou [Bot]