portmapper icon indicating copy to clipboard operation
portmapper copied to clipboard

Not finding any PortMappers

Open minecreatr opened this issue 8 years ago • 6 comments

Hello. I was trying to use this library to setup some port forwarding, but I found out that that PortMapperFactory.discover is not returning any PortMappers. I dont know if that is just something about the network I am on, or a problem with the library, but I wanted to ask just in case.

Here is the log https://gist.github.com/minecreatr/def8b7c6362a4d12740521805acc2371 .

My code is the same as your example, as I just wanted to check if it was working first.

Thank you`

minecreatr avatar May 31 '17 20:05 minecreatr

I'm at work but I can take a look when I get home in a few hours. Can you set logging level to debug and post the full logs? It'll show network traffic.

That error is superfluous. It's just the library trying to run some Linux commands. Since you're not running Linux, you're seeing errors for those Linux commands. The equivalent Windows commands are being run as well and succeeding, so you aren't seeing errors for those.

offbynull avatar May 31 '17 22:05 offbynull

Hi again,

I understand that you closed my previous ticket, and I'm sorry for being late on this. Since this issue is the same as mine, I'll post my logs here: https://gist.github.com/adam-law/f219ddecf7ca9ffc749463a219d98fb9

I had time to trace through the source, and as far as I can tell, while the correct service descriptor for the router was collected, the accompanying collection of identified services, was empty. While running through its processes, PortMapper was able to open a (random?) port on the router, though no mapper was added to the identification list.

As for your question about the jar drop-in, I got it through maven, & I believe all the dependencies exist within our project already.

Thanks :)

Edit: On 2nd thought, I'm not sure if PM got the correct descriptor, after all. Looking at the log, I see it identify the Roku device, which is being used as a booster in another part of this building. I'm hooked up by ethernet to a Netgear router, so I'm wondering why I'm not seeing it on the logs.

adam-law avatar Jun 01 '17 20:06 adam-law

What's the name of the network interface the Netgear router is attached to. What's the IP of that network interface?

offbynull avatar Jun 06 '17 03:06 offbynull

Just the default. From ipconfig: Ethernet Ethernet Adapter 192.168.0.5

adam-law avatar Jun 07 '17 10:06 adam-law

@offbynull I am experiencing this same issue. UPnP is definitely available (I tested with weupnp), so it find at least one mapper

InzeNL avatar Nov 17 '21 10:11 InzeNL

Hey, I don't have the capacity to keep up with this project anymore. There are too many routers out there / too many configurations to keep up with.

Your best bet is to migrate to miniupnpc. It's a native library but you can make Java bindings to it (if some don't exist already).

On Wed, 17 Nov 2021 at 05:54, Inze Bielderman @.***> wrote:

@offbynull https://github.com/offbynull I am experiencing this same issue. UPnP is definitely available (I tested with weupnp), so it find at least one mapper

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/offbynull/portmapper/issues/35#issuecomment-971460755, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABQPQIXTSG4LFG643LH4I7DUMOCVHANCNFSM4DNQUHDA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

offbynull avatar Nov 17 '21 12:11 offbynull