kaklakariada / portmapper

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

Can't find router #99

Closed abver090 closed 6 months ago

abver090 commented 2 years ago

Error: A JNI error has occurred, please check your installation and try again

Either make a bugfix or please, for the love of god, help me, I have been trying to port forward and can't seem to do that.

abver090 commented 2 years ago

EDIT: The opening issue has been resolved, but now the app can't detect my router.

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:218) at org.chris.portmapper.gui.PortMapperView$ConnectTask.doInBackground(PortMapperView.java:434) at org.chris.portmapper.gui.PortMapperView$ConnectTask.doInBackground(PortMapperView.java:422) at java.desktop/javax.swing.SwingWorker$1.call(SwingWorker.java:304) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.desktop/javax.swing.SwingWorker.run(SwingWorker.java:343) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at java.base/java.lang.Thread.run(Thread.java:833) WARN Could not connect to router: Did not find a router

Any help?

Rikki1408 commented 2 years ago

I have an issue similar to @abver090. To be completely sure I'm doing it right, when I open PortMapper, I click "Connect" in the bottom left corner. After clicking "Connect", I get the following message in the log window:

INFO Using default configuration directory 'C:\Users(User)\AppData\Roaming\UnknownApplicationVendor\PortMapper'. DEBUG Loading settings from file settings.xml DEBUG Got settings [Settings: presets=[Minecraft test], useEntityEncoding=true, logLevel=TRACE, routerFactoryClassName=org.chris.portmapper.router.weupnp.WeUPnPRouterFactory] TRACE Connecting to router... INFO Creating router factory for class org.chris.portmapper.router.weupnp.WeUPnPRouterFactory DEBUG Router factory weupnp lib created INFO Searching for routers... DEBUG System property 'portmapper.locationUrl' not defined: discover routers automatically. DEBUG Searching for gateway devices... 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:218) at org.chris.portmapper.gui.PortMapperView$ConnectTask.doInBackground(PortMapperView.java:434) at org.chris.portmapper.gui.PortMapperView$ConnectTask.doInBackground(PortMapperView.java:422) at java.desktop/javax.swing.SwingWorker$1.call(SwingWorker.java:304) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.desktop/javax.swing.SwingWorker.run(SwingWorker.java:343) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at java.base/java.lang.Thread.run(Thread.java:833) WARN Could not connect to router: Did not find a router

I want to host a Minecraft server to play with some of my friends. I've also tried hosting it on multiple different ports to isolate the possibility that the port was taken.

[22:19:25] [Server thread/INFO]: Loading properties [22:19:25] [Server thread/INFO]: Default game type: SURVIVAL [22:19:25] [Server thread/INFO]: Generating keypair [22:19:25] [Server thread/INFO]: Starting Minecraft server on [My IP] [22:19:25] [Server thread/INFO]: Using default channel type [22:19:26] [Server thread/WARN]: **** FAILED TO BIND TO PORT! [22:19:26] [Server thread/WARN]: The exception was: java.net.BindException: Cannot assign requested address: bind [22:19:26] [Server thread/WARN]: Perhaps a server is already running on that port? [22:19:26] [Server thread/INFO]: Stopping server [22:19:26] [Server thread/INFO]: Saving worlds

Any help would be welcome, thank you.

kaklakariada commented 2 years ago

See https://github.com/kaklakariada/portmapper#router-not-found for troubleshooting when no router is found.

@Rikki1408 the second log suggests that another server is already active on the same port when starting the Minecraft server.

Rikki1408 commented 2 years ago

the second log suggests that another server is already active on the same port when starting the Minecraft server

I know it does, but I have a strong feeling it's because of my ISP. They route the traffic through a central server in the middle of a lake which adds a second layer of protection. I also did try running it on a random port within the allowed range, but it still didn't work.

They do say you need a static IP (which will still traffic it through their server) to have portforwarding options, but I was hoping it could be circumvented with a port forwarding program that uses UPnP since that they include that as an option in our plan and our router allows it.

I'll test some of the other servers and follow the rest of the trouble shooting points once I'm done with my school assignment, hoping it might work.

kaklakariada commented 6 months ago

Closing as stale.