Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PORT Issue! #2694

Closed
DeathStalker77 opened this issue Oct 19, 2023 · 30 comments
Closed

PORT Issue! #2694

DeathStalker77 opened this issue Oct 19, 2023 · 30 comments
Labels
Milestone

Comments

@DeathStalker77
Copy link

DeathStalker77 commented Oct 19, 2023

Nicotine+ version: 3.3.0.dev5 Python 3.11.6 GTK 4.12.3 (Build from OCT-09-2023
Operating System/Distribution: Win10x Ent 22H2 19045.3570 Windows Feature Experience Pack 1000.19052.1000.0

Describe the bug

Unable to open port in any way - default is 1024 - With OR without firewall it makes no difference - no matter WHAT port I set it to, it is CLOSED. When I set it to the Port that my Port Forwarding uses, it says - Cannot listen on port ####. Ensure no other application uses it, or choose a different port. Error: [WinError 10013] An attempt was made to access a socket in a way forbidden by its access permissions

However, the LOG does NOT show this - it indicates NO issue with the default port -
2023-10-19 15:13:30 Listening on port: 1024
2023-10-19 15:13:30 Connecting to server.slsknet.org:2416
2023-10-19 15:13:30 Connected to server server.slsknet.org:2416, logging in…
2023-10-19 15:13:30 1886 privileged users

Any yes, I AM bound to the correct adapter - when I change that, it will not even connect to the server!

I even renamed the config file and started from scratch - it is STILL showing the default 1024 as CLOSED

***Also your INSTALLER remains active - it never completes and shuts down (msiexec.exe)

At this point, I feel my ENTIRE N+ install & config is 100% jakked and I see no way of fixing or restoring it.

Expected behavior

ANY port select that is open - whether it is Application-Specific in the Firewall (such as Comodo), or Router, should work - as should a RANGE of ports

Steps to reproduce the bug

Simply set the port for ANY port - whether it is the Port Forwarded Port or not (oddly, in the orig SLSK, I have to set my Port to 1 port LOWER than what is set for Port Forwarding and open in my firewall). I tried that with N+ as well, but it didn't work

Additional context

Screenshots, logs, stacktraces or relevant information.

@slook slook added question and removed bug labels Oct 19, 2023
@slook
Copy link
Member

slook commented Oct 19, 2023

default is 1024

You are not allowed to use that port, unless you are Administrator. Your OS vendor blocks normal users from having it. Choose another one with a higher number.

The application shouldn't be run with elevated administrative privileges anyway, because it might be a security risk.

At this point, I feel my ENTIRE N+ install & config is 100% jakked and I see no way of fixing or restoring it.

Bugs are to be expected sometimes in the unstable builds, but there are not any currently known ones which cause the entire %APPDATA% config to be ruined beyond repair.

If you are the first tester to discover some edge case problem perhaps with migrating from the previous version or suchlike, then in that case you need to find specific evidence that we can investigate and patch it so that the stable users won't be affected.

Nicotine+ version: 3.3.0.dev5 Python 3.11.6 GTK 4.12.3 (Build from OCT-09-2023

Please make sure you update to the latest build (it is dev6 now) before each time you send a bug report, because there are fixes being committed on most days (and occasionally regressions as well, that is why the testers are appreciated!), link:

https://github.com/nicotine-plus/nicotine-plus/blob/master/doc/TESTING.md#windows

@slook slook added bug and removed question labels Oct 19, 2023
@slook
Copy link
Member

slook commented Oct 19, 2023

[WinError 10013]
However, the LOG does NOT show this - it indicates NO issue with the default port -
2023-10-19 15:13:30 Listening on port: 1024

Bug label re-added, the log should reflect the OS error.

I even renamed the config file and started from scratch - it is STILL showing the default 1024

"portrange": (2234, 2234),

It shouldn't be defaulting to 1024, further testing is required to verify the issue.

@DeathStalker77
Copy link
Author

Ok, I will change the port - I think you also need to either identify that it CANNOT use the same Port as any other application, or simply make it work so that it does - as it is, it is not clear. I will update to the latest build, change the port, and re-try.

@DeathStalker77
Copy link
Author

DeathStalker77 commented Oct 19, 2023

No, I still get the PORT CLOSED message no matter WHAT port I choose - even if I put a RANGE of open ports in my firewall (Comodo) - and yes, I also checked Win10 Firewall and proper permissions, including EDGE, are there.

Also, I notice in the CONFIG file for the port that TWO ports are listed - ex, (25555, 25555) - even though you can only enter 1 port in the UI. That seems odd.

@slook
Copy link
Member

slook commented Oct 20, 2023

Until recently, it was possible to specify a range, but N+ doesn't really need it so it was only used for fallback.

Hence, the config value is a list of values (start, end) for the purposes of legacy compatibility, otherwise older versions would crash if you had run 3.3.0+ and then rolled back.

@DeathStalker77
Copy link
Author

Ok, but that still doesn't help address the problem I have of it not recognizing ANY port as being open, no matter what the settings are.

@slook
Copy link
Member

slook commented Oct 20, 2023

If everything is configured as it is supposed to be, then all you can do is keep rebooting and restarting stuff until it works. Some routers can be sticky.

If the port is OPEN with Nicotine+ 3.2.9 then there could be a bug.

@DeathStalker77
Copy link
Author

It is NOT my router - EVERYTHING else works 100% perfect. ONLY N+ has an issue - even orig SLSK works fine.

I will try rolling back to 3.29.

@DeathStalker77
Copy link
Author

Ok, rolling back to a CLEAN install of 3.29 now allows me to set the CORRECT port (that is forwarded) as OPEN. It would seem there is an issue with your other versions allowing any other program to use the same port - thus the error message above.

Please regression test that scenario and let me know. Thanks!

@slook
Copy link
Member

slook commented Oct 20, 2023

What happens when you roll forward to 3.3.0.dev6 again?

@DeathStalker77
Copy link
Author

Tried that - CLOSED again.

@slook
Copy link
Member

slook commented Oct 20, 2023

Okay now there seems to be a bug confirmed @mathiascode will need to decide what extra Miscellaneous debug logging is needed to find the cause.

@DeathStalker77
Copy link
Author

Happy to be able to help! As I say, I can test functionality & usability (+design/UX), and I "understand" coding (& logic) - and can read most - but I cannot write code.

@mathiascode
Copy link
Member

When installing (and after installing) 3.3.0.dev6, can you verify that you don't have an old Nicotine+ process running on the system? There should be a check that prevents multiple running instances of Nicotine+, but I'm not sure if it works properly if e.g. the program hangs.

@DeathStalker77
Copy link
Author

I will check! I DO believe that the msiexec.exe issue was resolved with dev6 - it was present from 3.29 through the last dev5 builds. I am 99.9% certain that I had N+ CLOSED before I ran the dev6 installation.

@mathiascode
Copy link
Member

Thanks! Please check the task manager, in case there's a Nicotine+.exe process where the window closed, but the process didn't exit for some reason.

If that's not the case, and you still have issues with ports, we can continue debugging.

@DeathStalker77
Copy link
Author

DeathStalker77 commented Oct 20, 2023

I will do so. I think I have all my setting effectively backed up from the 1st upgrade to dev5, so even though they are "technically" working now (though I cannot use it until the JSON issue is resolved), I can do an upgrade to dev6 without issue and let you know. :-)

One other issue - I noticed that with N+, the gdbus.exe needs to be running. Not sure what that is or its purpose. (I understand it is supposed to be part of the GNU Privacy Guard, but would like to understand its requirement better. Thanks!

@DeathStalker77
Copy link
Author

NEGATIVE!!! I can confirm 100% that the **msiexec.exe ** remains running after the upgrade to dev6!

@mathiascode
Copy link
Member

NEGATIVE!!! I can confirm 100% that the **msiexec.exe ** remains running after the upgrade to dev6!

I can confirm that msiexec.exe keeps running for some time, though it seems to exit eventually. I'll look into why that's the case.

gdbus.exe is provided by GTK. It's currently used for detecting if a Nicotine+ instance is already running, and bringing it to the foreground if you try to launch a new instance from the start menu.

I can't reproduce the port issue on my Windows machine, at least not yet.

@DeathStalker77
Copy link
Author

I'm using a VPN with port forwarding, and Comodo as my firewall - with the appropriate port opened.

@slook
Copy link
Member

slook commented Oct 29, 2023

Any progress on this?

@hboetes
Copy link
Member

hboetes commented Nov 7, 2023

Have you configured the network interface to be used? Select the VPN interface.

@DeathStalker77
Copy link
Author

I have provided @mathiascode with additional info on Port Sharing in another post. I have to have 2 programs that use Port Forwarding running at the same time and my VPN only supports 1 open port. YES, it IS possible to have 2 programs access the same port. (And NO, I will NOT simply not use a VPN, so don't even bother to mention that!)

@mathiascode
Copy link
Member

YES, it IS possible to have 2 programs access the same port.

I already told you why this is a bad idea.

@DeathStalker77
Copy link
Author

YES, it IS possible to have 2 programs access the same port.

I already told you why this is a bad idea.

You responded, but it was not clear to me WHY you feel it is a "bad" idea.

@slook
Copy link
Member

slook commented Dec 18, 2023

Are the issues around zombie background processess resolved now?

Sharing a port with other programs is not required functionality.

If an open port can be established that is not used by another program, then this bug can be closed?

@DeathStalker77
Copy link
Author

Not to me they are not. It is technically feasible for more than one program to use the same port - since MOST people who do P2P use a VPN and MOST VPNs allow only ONE port open for Port Forwarding, this IS an issue for anyone wanting to run N+ with any other P2P program.

Just because you haven't gotten caught "speeding" yet, does not mean you never will - or, just because you've survived a few rounds of "Russian Roulette" does not mean you always will.

@slook
Copy link
Member

slook commented Dec 18, 2023

Alright, regardless of if sharing a port between programs would be desirable for future implementation or not, the fact is that is not intended functionality.

As it stands, the program is only expected to work on a port that is not used by another program.

Is it working as expected, currently?

@DeathStalker77
Copy link
Author

Point taken! Yes, it is working as expected, so we could add this as an ENHANCEMENT issue :-)

@slook
Copy link
Member

slook commented Dec 18, 2023

Alright then, I'll close this Bug issue as resolved for now.

@slook slook closed this as completed Dec 18, 2023
@mathiascode mathiascode added this to the 3.3.0 milestone Jan 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

4 participants