Giter Site home page Giter Site logo

Comments (7)

mathiascode avatar mathiascode commented on June 22, 2024 2

I caught it in the act again, and it looks like a silent failure in UPnP._request_port_mapping(). It's probably a router issue, and checking if the port was redirected through UPnP is not reliable across manufacturers.

What we can do is lower the port mapping interval (PortMapper.RENEWAL_INTERVAL) from the current 4 hours to something like an hour, to limit the time we're offline.

Lowering the interval is probably the best solution. The lease used to be 24 hours in Nicotine+ 3.2.9 instead of 12 hours, which might explain why the issue went unnoticed.

Perhaps we could lower the interval to 2 hours first, and see how it works out?

Regarding the "Finished" issue, I'll look into it at the beginning of next week.

from nicotine-plus.

mathiascode avatar mathiascode commented on June 22, 2024 1

The interval is now 2 hours. If you happen to run into this issue again, e.g. when connecting to the server, please enable "Miscellaneous" debug logging and check if there are any relevant logs.

I also fixed the issue where certain finished downloads were not cleared.

from nicotine-plus.

mathiascode avatar mathiascode commented on June 22, 2024

Thanks for reporting. Just to confirm, this didn't happen in 3.2.9, right?

Could you verify that the listening port is still open when this starts happening (#2223)?

If that's the case, could you enable the "Messages" and "Connections" debug log categories, and send the logs to my email address on my GitHub profile once the issue has started happening. I'll take a closer look.

from nicotine-plus.

stefantalpalaru avatar stefantalpalaru commented on June 22, 2024

this didn't happen in 3.2.9, right?

No, I never noticed that.

Could you verify that the listening port is still open when this starts happening (#2223)?

Good catch! The UPnP port redirection has disappeared. After manually disconnecting and reconnecting to the server, the port redirect appears again.

It has a lease time of 120, which is weird. I think it's the default value, when no lease time is specified, but this piece of code is explicitly using PortMapper.LEASE_DURATION which is 43200:

self._upnp.add_port_mapping(self.LEASE_DURATION)

After a cursory glance at the code, it also seems that port redirection is done only once, after server login. When I implemented this in some other software, I renewed it every hour - not only because of expiring lease times, but because most residential users get dynamic public IPs from their ISPs and the two are usually handled together.

could you enable the "Messages" and "Connections" debug log categories

Sorry, I forgot that right click "log category" selection. This is why I was not seeing any debug messages.

Will do.


Unrelated, but maybe interesting: I see a file with the status "Finished" even though I have it configured to autoclear finished/filtered downloads.

from nicotine-plus.

stefantalpalaru avatar stefantalpalaru commented on June 22, 2024

I now see that there's PortMapper._start_timer() that renews the port mapping every 4 hours. Not soon enough for my router that thinks the port redirection has a lease time of 120 seconds.

from nicotine-plus.

stefantalpalaru avatar stefantalpalaru commented on June 22, 2024

The 120s lease time displayed by upnpc -l might be a red herring: miniupnp/miniupnp#222

from nicotine-plus.

stefantalpalaru avatar stefantalpalaru commented on June 22, 2024

I caught it in the act again, and it looks like a silent failure in UPnP._request_port_mapping(). It's probably a router issue, and checking if the port was redirected through UPnP is not reliable across manufacturers.

What we can do is lower the port mapping interval (PortMapper.RENEWAL_INTERVAL) from the current 4 hours to something like an hour, to limit the time we're offline.

from nicotine-plus.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.