kaklakariada / portmapper

A tool for managing port forwardings via UPnP
GNU General Public License v3.0
685 stars 89 forks source link

Router not found #5

Closed JohnReedLOL closed 4 years ago

JohnReedLOL commented 9 years ago

Ubuntu 14.04, Oracle Java 8, residential WiFi, public IP address (according to Google) "2602:30a:2e0a:9d90:89e8:b342:1c75:d32a", public IP (according to http://checkip.amazonaws.com/) 162.224.169.217, most recent gradle build (today, 22 May 2015):

johnmichaelreed2@JohnReedsGalago:~/Desktop/Portmapper/portmapper-master$ java -jar /home/johnmichaelreed/Desktop/Portmapper/portmapper-master/build/libs/portmapper-master-2.0.0-alpha2.jar -h -add : Add a new port mapping (default: false) -delete : Delete a new port mapping (default: false) -description VAL : Description of the port mapping -externalPort N : External port of the port mapping (default: 0) -gui : Start graphical user interface (default) (default: false) -h (-help) : Print usage help (default: true) -info : Print router info (default: false) -internalPort N : Internal port of the port mapping (default: 0) -ip VAL : Internal IP of the port mapping (default: localhost) -lib VAL : UPnP library to use -list : Print existing port mappings (default: false) -protocol [TCP | UDP] : Protocol of the port mapping -routerIndex N : Router index if more than one is found (zero-based) Example: java -jar PortMapper.jar -add -externalPort 22 -internalPort 22 [-ip ] -description desc johnmichaelreed2@JohnReedsGalago:~/Desktop/Portmapper/portmapper-master$ java -jar /home/johnmichaelreed/Desktop/Portmapper/portmapper-master/build/libs/portmapper-master-2.0.0-alpha2.jar -info 17:15:45.123 [main] INFO org.chris.portmapper.PortMapperCli - Creating router factory for class org.chris.portmapper.router.cling.ClingRouterFactory 17:15:45.130 [main] DEBUG org.chris.portmapper.PortMapperCli - Creating a new instance of the router factory class class org.chris.portmapper.router.cling.ClingRouterFactory 17:15:45.169 [main] INFO org.chris.portmapper.PortMapperCli - Searching for routers... 17:15:45.169 [main] DEBUG o.c.p.r.cling.ClingRouterFactory - System property portmapper.locationUrl not defined: discover routers automatically. 17:15:45.216 [main] INFO org.fourthline.cling.UpnpServiceImpl - >>> Starting UPnP service... 17:15:45.216 [main] INFO org.fourthline.cling.UpnpServiceImpl - Using configuration: org.fourthline.cling.DefaultUpnpServiceConfiguration 17:15:45.248 [main] INFO o.fourthline.cling.transport.Router - Creating Router: org.fourthline.cling.transport.RouterImpl 17:15:45.257 [main] INFO o.f.c.t.spi.MulticastReceiver - Creating wildcard socket (for receiving multicast datagrams) on port: 1900 17:15:45.261 [main] INFO o.f.c.t.spi.MulticastReceiver - Joining multicast group: /239.255.255.250:1900 on network interface: wlan0 17:15:45.282 [main] INFO o.f.cling.transport.spi.StreamServer - Created server (for receiving TCP streams) on: /192.168.1.79:52810 17:15:45.284 [main] INFO o.f.cling.transport.spi.DatagramIO - Creating bound socket (for datagram input/output) on: /192.168.1.79 17:15:45.293 [main] INFO org.fourthline.cling.UpnpServiceImpl - <<< UPnP service started successfully 17:15:45.294 [main] DEBUG o.c.p.r.cling.ClingRouterFactory - Start searching using upnp service 17:15:45.758 [cling-5] DEBUG o.c.p.r.cling.ClingRegistryListener - Found service of wrong type urn:schemas-upnp-org:device:MediaServer:1, expected urn:schemas-upnp-org:device:InternetGatewayDevice:1. 17:15:45.823 [cling-5] DEBUG o.c.p.r.cling.ClingRegistryListener - Found service of wrong type urn:schemas-cipa-jp:device:DPSPrinter:1, expected urn:schemas-upnp-org:device:InternetGatewayDevice:1. 17:15:50.308 [main] DEBUG o.c.p.r.cling.ClingRouterFactory - Did not find a service after 5 seconds 17:15:50.309 [main] ERROR org.chris.portmapper.PortMapperCli - Found no router 17:15:50.309 [main] ERROR org.chris.portmapper.PortMapperCli - No router found: exit johnmichaelreed2@JohnReedsGalago:~/Desktop/Portmapper/portmapper-master$

JohnReedLOL commented 9 years ago

More router not found:

johnmichaelreed2@JohnReedsGalago:~/Desktop/Portmapper/portmapper-master$ java -jar /home/johnmichaelreed/Desktop/Portmapper/portmapper-master/build/libs/portmapper-master-2.0.0-alpha2.jar -add -externalPort 15000 -internalPort 15000 -ip 192.168.10.1 -protocol UDP 17:30:05.347 [main] INFO org.chris.portmapper.PortMapperCli - Creating router factory for class org.chris.portmapper.router.cling.ClingRouterFactory 17:30:05.354 [main] DEBUG org.chris.portmapper.PortMapperCli - Creating a new instance of the router factory class class org.chris.portmapper.router.cling.ClingRouterFactory 17:30:05.388 [main] INFO org.chris.portmapper.PortMapperCli - Searching for routers... 17:30:05.388 [main] DEBUG o.c.p.r.cling.ClingRouterFactory - System property portmapper.locationUrl not defined: discover routers automatically. 17:30:05.429 [main] INFO org.fourthline.cling.UpnpServiceImpl - >>> Starting UPnP service... 17:30:05.430 [main] INFO org.fourthline.cling.UpnpServiceImpl - Using configuration: org.fourthline.cling.DefaultUpnpServiceConfiguration 17:30:05.452 [main] INFO o.fourthline.cling.transport.Router - Creating Router: org.fourthline.cling.transport.RouterImpl 17:30:05.460 [main] INFO o.f.c.t.spi.MulticastReceiver - Creating wildcard socket (for receiving multicast datagrams) on port: 1900 17:30:05.463 [main] INFO o.f.c.t.spi.MulticastReceiver - Joining multicast group: /239.255.255.250:1900 on network interface: eth2 17:30:05.482 [main] INFO o.f.cling.transport.spi.StreamServer - Created server (for receiving TCP streams) on: /192.168.1.86:57914 17:30:05.485 [main] INFO o.f.cling.transport.spi.DatagramIO - Creating bound socket (for datagram input/output) on: /192.168.1.86 17:30:05.497 [main] INFO org.fourthline.cling.UpnpServiceImpl - <<< UPnP service started successfully 17:30:05.497 [main] DEBUG o.c.p.r.cling.ClingRouterFactory - Start searching using upnp service 17:30:05.865 [cling-17] DEBUG o.c.p.r.cling.ClingRegistryListener - Found service of wrong type urn:schemas-cipa-jp:device:DPSPrinter:1, expected urn:schemas-upnp-org:device:InternetGatewayDevice:1. 17:30:10.511 [main] DEBUG o.c.p.r.cling.ClingRouterFactory - Did not find a service after 5 seconds 17:30:10.512 [main] ERROR org.chris.portmapper.PortMapperCli - Found no router 17:30:10.512 [main] ERROR org.chris.portmapper.PortMapperCli - No router found: exit johnmichaelreed2@JohnReedsGalago:~/Desktop/Portmapper/portmapper-master$

JohnReedLOL commented 9 years ago

And when I change the "Logger Level" under PortMapper Settings to "ALL", the GUI's "Log messages" section prints:

DEBUG Open Settings dialog DEBUG Create settings dialog DEBUG Use entity encoding is true DEBUG Saved settings [Settings: presets=[], useEntityEncoding=true, logLevel=ALL, routerFactoryClassName=org.chris.portmapper.router.cling.ClingRouterFactory] TRACE Connecting to router... INFO Creating router factory for class org.chris.portmapper.router.cling.ClingRouterFactory DEBUG Creating a new instance of the router factory class class org.chris.portmapper.router.cling.ClingRouterFactory DEBUG Router factory created INFO Searching for routers... DEBUG System property portmapper.locationUrl not defined: discover routers automatically. INFO >>> Starting UPnP service... INFO Using configuration: org.fourthline.cling.DefaultUpnpServiceConfiguration INFO Creating Router: org.fourthline.cling.transport.RouterImpl INFO Creating wildcard socket (for receiving multicast datagrams) on port: 1900 INFO Joining multicast group: /239.255.255.250:1900 on network interface: wlan0 INFO Created server (for receiving TCP streams) on: /192.168.1.79:53842 INFO Creating bound socket (for datagram input/output) on: /192.168.1.79 INFO <<< UPnP service started successfully DEBUG Start searching using upnp service DEBUG Found service of wrong type urn:schemas-cipa-jp:device:DPSPrinter:1, expected urn:schemas-upnp-org:device:InternetGatewayDevice:1. DEBUG Did not find a service after 5 seconds WARN Could not connect to router: Did not find a router org.chris.portmapper.router.RouterException: Did not find a router at org.chris.portmapper.PortMapperApp.connectRouter(PortMapperApp.java:207) ~[portmapper-master-2.0.0-alpha2.jar:na] at org.chris.portmapper.gui.PortMapperView$ConnectTask.doInBackground(PortMapperView.java:439) ~[portmapper-master-2.0.0-alpha2.jar:na] at org.chris.portmapper.gui.PortMapperView$ConnectTask.doInBackground(PortMapperView.java:427) ~[portmapper-master-2.0.0-alpha2.jar:na] at javax.swing.SwingWorker$1.call(SwingWorker.java:295) ~[na:1.8.0_45] at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[na:1.8.0_45] at javax.swing.SwingWorker.run(SwingWorker.java:334) ~[na:1.8.0_45] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) ~[na:1.8.0_45] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) ~[na:1.8.0_45] at java.lang.Thread.run(Thread.java:745) ~[na:1.8.0_45] WARN Could not connect to router: Did not find a router

JohnReedLOL commented 9 years ago

Also note that I appeared to still get this error even on a Windows 8 computer connected to the same router and on the Ubuntu computer I tried all three non-dummy libraries and got similar errors on all of them. The thing is, my computer has to support UPnP because I am using Transmission Bittorrent client without errors and Transmission uses UPnP.

FransUrbo commented 8 years ago

Same problem here on OSX, v10.7.5 with latest java:

Turbo-Fredrikssons-MacBook:~ turbo$ java -version
java version "1.8.0_73"
Java(TM) SE Runtime Environment (build 1.8.0_73-b02)
Java HotSpot(TM) 64-Bit Server VM (build 25.73-b02, mixed mode)
Turbo-Fredrikssons-MacBook:~ turbo$ java -jar Downloads/portmapper-2.0.0-alpha3.jar -info
15:16:55.515 [main] INFO  org.chris.portmapper.PortMapperCli - Creating router factory for class org.chris.portmapper.router.cling.ClingRouterFactory
15:16:55.532 [main] DEBUG org.chris.portmapper.PortMapperCli - Creating a new instance of the router factory class class org.chris.portmapper.router.cling.ClingRouterFactory
15:16:55.577 [main] INFO  org.chris.portmapper.PortMapperCli - Searching for routers...
15:16:55.578 [main] DEBUG o.c.p.r.cling.ClingRouterFactory - System property portmapper.locationUrl not defined: discover routers automatically.
15:16:55.625 [main] INFO  org.fourthline.cling.UpnpServiceImpl - >>> Starting UPnP service...
15:16:55.626 [main] INFO  org.fourthline.cling.UpnpServiceImpl - Using configuration: org.fourthline.cling.DefaultUpnpServiceConfiguration
15:16:55.661 [main] INFO  o.fourthline.cling.transport.Router - Creating Router: org.fourthline.cling.transport.RouterImpl
15:16:55.673 [main] INFO  o.f.c.t.spi.MulticastReceiver - Creating wildcard socket (for receiving multicast datagrams) on port: 1900
15:16:55.687 [main] INFO  o.f.c.t.spi.MulticastReceiver - Joining multicast group: /239.255.255.250:1900 on network interface: en1
15:16:55.718 [main] INFO  o.f.cling.transport.spi.StreamServer - Created server (for receiving TCP streams) on: /192.168.0.10:52057
15:16:55.720 [main] INFO  o.f.cling.transport.spi.DatagramIO - Creating bound socket (for datagram input/output) on: /192.168.0.10
15:16:55.732 [main] INFO  org.fourthline.cling.UpnpServiceImpl - <<< UPnP service started successfully
15:16:55.732 [main] DEBUG o.c.p.r.cling.ClingRouterFactory - Start searching using upnp service
15:17:00.760 [main] DEBUG o.c.p.r.cling.ClingRouterFactory - Did not find a service after 5 seconds
15:17:00.761 [main] ERROR org.chris.portmapper.PortMapperCli - Found no router
15:17:00.761 [main] ERROR org.chris.portmapper.PortMapperCli - No router found: exit

I'm on Virgin in the UK (London) with a Arris VMDG505 (Hub 3.0) router.

n0doubt commented 8 years ago

Am also having this problem

kaklakariada commented 7 years ago

@JohnReedLOL Sorry for the delayed answer! You say you are using Transmission without any problem. Does Transmission show that it has enabled port forwarding successfully? BitTorrent also works without ports being forwarded, it just cannot connect to some peers.

ctsstc commented 7 years ago

Mine wasn't working then started oddly hrmm

WARN  unspecified resource Application.vendorId using UnknownApplicationVendor
INFO  Using default configuration directory 'C:\Users\Cody Swartz\AppData\Roaming\UnknownApplicationVendor\PortMapper'.
DEBUG Loading settings from file settings.xml
DEBUG Got settings [Settings: presets=[], useEntityEncoding=true, logLevel=INFO, routerFactoryClassName=org.chris.portmapper.router.cling.ClingRouterFactory]
INFO  Creating router factory for class org.chris.portmapper.router.cling.ClingRouterFactory
INFO  Searching for routers...
INFO  >>> Starting UPnP service...
INFO  Using configuration: org.fourthline.cling.DefaultUpnpServiceConfiguration
INFO  Creating Router: org.fourthline.cling.transport.RouterImpl
INFO  Creating wildcard socket (for receiving multicast datagrams) on port: 1900
INFO  Joining multicast group: /239.255.255.250:1900 on network interface: Realtek PCIe GBE Family Controller
INFO  Creating wildcard socket (for receiving multicast datagrams) on port: 1900
INFO  Joining multicast group: /239.255.255.250:1900 on network interface: TAP-Windows Adapter V9
INFO  Creating wildcard socket (for receiving multicast datagrams) on port: 1900
INFO  Joining multicast group: /239.255.255.250:1900 on network interface: VirtualBox Host-Only Ethernet Adapter #2
INFO  Created server (for receiving TCP streams) on: /192.168.1.100:62788
INFO  Creating bound socket (for datagram input/output) on: /192.168.1.100
INFO  Created server (for receiving TCP streams) on: /10.68.10.6:62791
INFO  Creating bound socket (for datagram input/output) on: /10.68.10.6
INFO  Created server (for receiving TCP streams) on: /192.168.56.1:62794
INFO  Creating bound socket (for datagram input/output) on: /192.168.56.1
INFO  <<< UPnP service started successfully
WARN  Unsupported UDA minor version, ignoring: 1
WARN  Could not connect to router: Did not find a router
org.chris.portmapper.router.RouterException: Did not find a router
    at org.chris.portmapper.PortMapperApp.connectRouter(PortMapperApp.java:220)
    at org.chris.portmapper.gui.PortMapperView$ConnectTask.doInBackground(PortMapperView.java:456)
    at org.chris.portmapper.gui.PortMapperView$ConnectTask.doInBackground(PortMapperView.java:444)
    at javax.swing.SwingWorker$1.call(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at javax.swing.SwingWorker.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
WARN  Could not connect to router: Did not find a router
INFO  Creating router factory for class org.chris.portmapper.router.cling.ClingRouterFactory
INFO  Searching for routers...
INFO  >>> Starting UPnP service...
INFO  Using configuration: org.fourthline.cling.DefaultUpnpServiceConfiguration
INFO  Creating Router: org.fourthline.cling.transport.RouterImpl
INFO  Creating wildcard socket (for receiving multicast datagrams) on port: 1900
INFO  Joining multicast group: /239.255.255.250:1900 on network interface: Realtek PCIe GBE Family Controller
INFO  Creating wildcard socket (for receiving multicast datagrams) on port: 1900
INFO  Joining multicast group: /239.255.255.250:1900 on network interface: TAP-Windows Adapter V9
INFO  Creating wildcard socket (for receiving multicast datagrams) on port: 1900
INFO  Joining multicast group: /239.255.255.250:1900 on network interface: VirtualBox Host-Only Ethernet Adapter #2
INFO  Created server (for receiving TCP streams) on: /192.168.1.100:64514
INFO  Creating bound socket (for datagram input/output) on: /192.168.1.100
INFO  Created server (for receiving TCP streams) on: /10.68.10.6:64517
INFO  Creating bound socket (for datagram input/output) on: /10.68.10.6
INFO  Created server (for receiving TCP streams) on: /192.168.56.1:64520
INFO  Creating bound socket (for datagram input/output) on: /192.168.56.1
INFO  <<< UPnP service started successfully
WARN  Unsupported UDA minor version, ignoring: 1
INFO  Connected to router 'MiniUPnP d 20170203'
INFO  Got error response when fetching port mapping for entry number 10: '(IncomingActionResponseMessage) 500 Internal Server Error'. Stop getting more entries.
INFO  Found 10 mappings
ctsstc commented 7 years ago

I tried clicking PortMapper Settings... simply hit save and tried to connect again and it worked,..,., weird