Closed delthas closed 8 years ago
I think I found the problem. Going to add a test case to verify.
Can you test this change when you have a moment to spare? Steps are as follows...
Please let me know the results.
I tested the change on my machine. It worked, the program found one mapper, and I checked on my router that the port forwarding was working. However there are still tons of exceptions (maybe that's normal?) so here are the (new) logs in case you want to take a look at them: mynewlogs I also run the same program on a friend's computer (not on the same local network). I'm not sure whether his router has Upnp IGD enabled or not, but the program hasn't been able to find any port mapper and has thrown a bunch of exceptions too, so here's the logs: friendlogs
The exceptions you see in your log are expected. Java throws them when it tries to access a restricted/bad IP address. I need to figure out a way to prevent this from showing errors in the log.
As for your friend's log, the only device responding to the UPnP probing is a Samsung TV...
<friendlyName>[TV]Samsung LED55</friendlyName>
<manufacturer>Samsung Electronics</manufacturer>
<manufacturerURL>http://www.samsung.com/sec</manufacturerURL>
<modelDescription>Samsung TV NS</modelDescription>
Looking at the TV's UPnP service descriptions, it doesn't have port forwarding functionality.
What type of router is your friend using? does it support port forwarding via any of the 3 protocols? does port forwarding need to be enabled on his router?
Okay, well in fact I wasn't sure whether his router had UPnP enabled, so I just wanted to make sure all the exceptions were "normal". Someone probably completely disabled UPnP on my friend's router, so that's why it's not showing in the mappers list I guess. Thanks. Commit 3c865aa did fix the issue then.
Thank you for the bug report and helping out with debugging/verification. I'll deploy an update to maven central this weekend.
I'll close this ticket once the deploy is complete.
I've just performed a deploy. If all goes well, 2.0.1 should appear on central soon.
Closing ticket.
I've tried to run the example you give in the project readme but no mappers are returned by PortMapperFactory.discover. In fact a bunch of exceptions are raised during PortMapperFactory.discover.
Here's the program I ran:
My computer local IP address is 192.168.0.11, and my router local IP address is 192.168.0.254. I'm running Windows 10 (64 bits). Here are the logs: log