View previous topic :: View next topic |
Author |
Message |
striner
Joined: 20 Mar 2011 Posts: 7
|
Posted: Mon Mar 21, 2011 6:33 pm Post subject: AddPortMapping failed with code 501 (Action Failed) |
|
|
Hi all,
as stated in the title, when I run MiniUPnP in Nicotine+, it gives me an error 501. Since this is my first post on this forum, I am not allowed to post any links, so please see my full story below |
|
Back to top |
|
|
striner
Joined: 20 Mar 2011 Posts: 7
|
Posted: Mon Mar 21, 2011 6:34 pm Post subject: |
|
|
Hi all,
I have been using Windows Soulseek for a while, and it always worked perfect with UPnP. I made a dual-boot with Ubuntu 10.10 and installed Nicotine+. I installed MiniUPnP as stated in the options menu.
From the beginning on, it gave me this error:
Code: |
19:10:26 Figuring out UPnP...
19:10:30 UPnPc binary failed, could not parse output: upnpc : miniupnpc library test client. (c) 2006-2011 Thomas Bernard
Go to http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
for more information.
List of UPNP devices found on the network :
desc: http://192.168.1.254:80/upnp/IGD.xml
st: urn:schemas-upnp-org:device:InternetGatewayDevice:1
Found valid IGD : http://192.168.1.254:80/upnp/control/igd/wanpppcInternet
Local LAN ip address : 192.168.1.91
ExternalIPAddress = 86.92.43.48
AddPortMapping(2234, 2234, 192.168.1.91) failed with code 501 (Action Failed)
GetSpecificPortMappingEntry() failed with code 714 (NoSuchEntryInArray)
19:10:30 Failed to automate port forwarding, sorry.
|
I installed Python and Pythonmodules, but it still gives me this error. I Googled for a bit, but the only related thing I found was a Nicotine+ ticket http://www.nicotine-plus.org/ticket/593
I did what they said on that website, I typed "upnpc -r 9999 9999" and it said:
Code: |
upnpc : miniupnpc library test client. (c) 2006-2011 Thomas Bernard
Go to http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
for more information.
List of UPNP devices found on the network :
desc: http://192.168.1.254:80/upnp/IGD.xml
st: urn:schemas-upnp-org:device:InternetGatewayDevice:1
Found valid IGD : http://192.168.1.254:80/upnp/control/igd/wanpppcInternet
Local LAN ip address : 192.168.1.91
invalid protocol
|
So then I tried the next statement "upnpc -r 9999 tcp" and it gave me this:
Code: |
upnpc : miniupnpc library test client. (c) 2006-2011 Thomas Bernard
Go to http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
for more information.
List of UPNP devices found on the network :
desc: http://192.168.1.254:80/upnp/IGD.xml
st: urn:schemas-upnp-org:device:InternetGatewayDevice:1
Found valid IGD : http://192.168.1.254:80/upnp/control/igd/wanpppcInternet
Local LAN ip address : 192.168.1.91
ExternalIPAddress = 86.92.43.48
AddPortMapping(9999, 9999, 192.168.1.91) failed with code 501 (Action Failed)
GetSpecificPortMappingEntry() failed with code 714 (NoSuchEntryInArray)
|
Can you tell me if I'm doing something wrong and if yes, what it is?
I have enabled UPnP on my router. I use these versions of software:
Python 2.7.1
Nicotine-plus 1.2.16
miniupnpc-1.5.20110314
If there is anything else you need to know, just ask
Many thanks in advance!
Danny |
|
Back to top |
|
|
miniupnp Site Admin
Joined: 14 Apr 2007 Posts: 1589
|
|
Back to top |
|
|
striner
Joined: 20 Mar 2011 Posts: 7
|
Posted: Tue Mar 22, 2011 12:37 pm Post subject: |
|
|
ah yes, sorry, forgot about that one. I have a Thomson780, which is in your compatibility list if I'm correct. At least, that's what it says in big red letters at the top when I type 192.168.1.254
Also, yesterday I found out that when trying to install an HP wireless printer, it failed on me because somehow I have 2 versions of Python installed. I once installed 2.7.1 via a tarball, and HP started looking in Python 2.6 folder, which is apparently also on my system. I'm fairly new to Linux/Ubuntu, but could this maybe be the/a source of this problem? |
|
Back to top |
|
|
miniupnp Site Admin
Joined: 14 Apr 2007 Posts: 1589
|
Posted: Tue Mar 22, 2011 1:20 pm Post subject: |
|
|
I think the problem has nothing to do with python...
1st try to see if the port 9999 is not already used.
./upnpc-static -l
Then could you try to compile miniupnpc in debug mode ?
just Edit the Makefile to have CFLAGS = -O -Wall -g -DDEBUG
uncommented (and comment the "release" CFLAGS line)
and then make clean && make
Miniupnpc with then give a lot of debug output when executing
./upnpc-static -r 9999 tcp _________________ Main miniUPnP author.
https://miniupnp.tuxfamily.org/ |
|
Back to top |
|
|
striner
Joined: 20 Mar 2011 Posts: 7
|
Posted: Tue Mar 22, 2011 6:30 pm Post subject: |
|
|
Hi,
first of all, thanks for your help.
I could not find the "releases" CFLAGS line in the makefile, however I did manage to uncomment the debug line.
Here is the output to "./upnpc-static -l" (a link to my public dropbox folder, a file named "log", no extension)
http://dl.dropbox.com/u/3938005/log1
And here is the output to "./unpnc-static -r 9999 tcp"
http://dl.dropbox.com/u/3938005/log3
hope this is of any help! |
|
Back to top |
|
|
miniupnp Site Admin
Joined: 14 Apr 2007 Posts: 1589
|
Posted: Tue Mar 22, 2011 7:13 pm Post subject: |
|
|
thanks a lot !
I dont see anything wrong...
Maybe we could see better if the log included the SOAP request body.
could you patch minisoap.c with the following and then "make" then "./upnpc-static -r 9999 tcp" ???
(If you dont knwo how to use the patch utility, just edit minisoap.c around line 115 and add the two printf() lines.
Code: | --- minisoap.c 11 Dec 2010 17:56:51 -0000 1.20
+++ minisoap.c 22 Mar 2011 19:10:15 -0000
@@ -112,7 +112,8 @@
printf("SOAP request : POST %s HTTP/%s - Host: %s%s\n",
url, httpversion, host, portstr);
printf("SOAPAction: \"%s\" - Content-Length: %d\n", action, bodysize);
- /*printf("%s", headerbuf);*/
+ printf("Headers :\n%s", headerbuf);
+ printf("Body :\n%s\n", body);
#endif
return httpWrite(fd, body, bodysize, headerbuf, headerssize);
}
|
_________________ Main miniUPnP author.
https://miniupnp.tuxfamily.org/ |
|
Back to top |
|
|
striner
Joined: 20 Mar 2011 Posts: 7
|
Posted: Tue Mar 22, 2011 7:34 pm Post subject: |
|
|
thanks again.
Here is the output from your requested actions
http://dl.dropbox.com/u/3938005/log4
it still fails with 501, but still don't know why. |
|
Back to top |
|
|
miniupnp Site Admin
Joined: 14 Apr 2007 Posts: 1589
|
Posted: Tue Mar 22, 2011 7:42 pm Post subject: |
|
|
thanks.
the AddPortMapping SOAP request looks ok
Headers :
POST /upnp/control/igd/wanpppcInternet HTTP/1.1
Host: 192.168.1.254
User-Agent: Ubuntu/10.10, UPnP/1.0, MiniUPnPc/1.5
Content-Length: 595
Content-Type: text/xml
SOAPAction: "urn:schemas-upnp-org:service:WANPPPConnection:1#AddPortMapping"
Connection: Close
Cache-Control: no-cache
Pragma: no-cache
Body :
<?xml version="1.0"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<s:Body>
<u:AddPortMapping xmlns:u="urn:schemas-upnp-org:service:WANPPPConnection:1">
<NewRemoteHost></NewRemoteHost>
<NewExternalPort>9999</NewExternalPort>
<NewProtocol>TCP</NewProtocol>
<NewInternalPort>9999</NewInternalPort>
<NewInternalClient>192.168.1.91</NewInternalClient>
<NewEnabled>1</NewEnabled>
<NewPortMappingDescription>libminiupnpc</NewPortMappingDescription>
<NewLeaseDuration>0</NewLeaseDuration>
</u:AddPortMapping>
</s:Body>
</s:Envelope> _________________ Main miniUPnP author.
https://miniupnp.tuxfamily.org/ |
|
Back to top |
|
|
striner
Joined: 20 Mar 2011 Posts: 7
|
Posted: Tue Mar 22, 2011 8:21 pm Post subject: |
|
|
thwn why does it still fail with error 501 (action failed)? |
|
Back to top |
|
|
miniupnp Site Admin
Joined: 14 Apr 2007 Posts: 1589
|
Posted: Wed Mar 23, 2011 7:54 am Post subject: |
|
|
striner wrote: | thwn why does it still fail with error 501 (action failed)? |
I dont know. You should capture a SOAP request that is succeding (with another software) so we could compare and find what doesn't like your router.
It should work... _________________ Main miniUPnP author.
https://miniupnp.tuxfamily.org/ |
|
Back to top |
|
|
striner
Joined: 20 Mar 2011 Posts: 7
|
Posted: Wed Mar 23, 2011 8:10 am Post subject: |
|
|
thanks a lot for helping!
I don't know exactly how SOAP works, but I have some people at my school who can help me (I study computer science after all, just not the part about web technology and stuff, more technical stuff like embedded systems).
I've solved it for now by just opening a port on my router and not using UPnP. Too bad UPnP doesn't work now, but thanks again for the help! |
|
Back to top |
|
|
miniupnp Site Admin
Joined: 14 Apr 2007 Posts: 1589
|
Posted: Wed Mar 23, 2011 9:05 am Post subject: |
|
|
If someone understand what is wrong (for this router) in the AddPortmapping Soap request I could see if I can do something.
Here is the "server" string for this thomson router :
SpeedTouch 780 7.4.5.1 UPnP/1.0 (0619JTG0K)
The strange thing is it works with other softwares, but not with miniupnpc. _________________ Main miniUPnP author.
https://miniupnp.tuxfamily.org/ |
|
Back to top |
|
|
|