kee-org / keepassrpc

The KeePassRPC plugin that needs to be installed inside KeePass in order for Kee to be able to connect your browser to your passwords
GNU General Public License v2.0
635 stars 35 forks source link

"KeePassRPC could not start listening for connections" since 2020-09-08 Win10 update #113

Closed SunnyMoo closed 1 year ago

SunnyMoo commented 4 years ago

Hi, My computer applied last windows patch this night and now I've an error when starting KeePass. No other changes were made before/after having this error. Last night it worked, today it doesn't work anymore. Please see attached pic. Thanks. Annotation 2020-09-09 234353 Annotation 2020-09-09 234747

Alarith commented 4 years ago

I have exactly the same issue. Any idea on a fix ?

SunnyMoo commented 4 years ago

As a workaround you have to disable all VPN adapters, start KeePass then re-enable your VPN adapters.

Title is not accurate but here's another ticket on the same issue: https://github.com/kee-org/keepassrpc/issues/107

alainw68 commented 3 years ago

I have the same issue.

Change the port (808x) and it's ok.

"C:\Program Files (x86)\KeePass Password Safe 2\KeePass.exe" -KeePassRPCWebSocketPort:8086

https://forum.kee.pm/t/keepassrpc-port/2360

FabianNiehaus commented 3 years ago

As a workaround, you can try running the following command from an elevated (i.e. run as administrator) PowerShell prompt: Get-NetAdapter | Restart-NetAdapter

After the command completed execution, which might take a couple seconds depending on how many network adapters you have, starting KeePass did not raise an error anymore, and KeePassRPC worked properly.

viRikaRe commented 3 years ago

Found this issue: docker/for-win#3171. Seems to be the fault by either WSL or Hyper-V that reserves too many port ranges.

TL;DR

  1. Check if port 12546 is in excluded port range: netsh interface ipv4 show excludedportrange protocol=tcp

  2. If yes, then set the range to default (as admin): netsh int ipv4 set dynamic tcp start=49152 num=16384 netsh int ipv6 set dynamic tcp start=49152 num=16384 and reboot.

  3. If still not resolved, then add a registry value: reg add HKLM\SYSTEM\CurrentControlSet\Services\hns\State /v EnableExcludedPortRange /d 0 /f and reboot.

userdocs commented 3 years ago

I just wanted to add, I get this port conflict one out of ten start-ups. I have these Windows apps/features installed.

Docker for Windows, WSL2 and Hyper-V

I would say there is a port conflict of sorts here with these development apps. I have changed the port to work around the issue but i feel like the issue is unavoidable if you use these dev apps.

dieser-niko commented 3 years ago

Hi, got the same problem, but with the difference that nothing really helped what was written in here. Even tried changing the port and I still got the error with the default error

userdocs commented 3 years ago

You need to do two things.

1: Make sure keepass is started and told to use your custom port

Note: if you have not told keypass to start with the system you just need to create a shortcut with the value below instead.

To change the start-up registry entry the program makes you modify this value

Computer\HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Run

Look for this:

KeePass Password Safe 2

Modify it to this (change 12345 to the port you want to use outside the conflicting range)

"C:\Program Files (x86)\KeePass Password Safe 2\KeePass.exe" -KeePassRPCWebSocketPort:12345

2: Change the port in the kee browser plugin.

help

Then it will work.

Iskra1984 commented 2 years ago

For me it helped using a lower port, i used port 8084.

  1. start KeePass with Full Path to Keepass

    Keepass.exe -KeePassRPCWebSocketPort:8084

  2. Afterwards you have to change the port in the browser plugin as described by userdoc on Feb 16, 2021

It worked for me.

userdocs commented 2 years ago

Funny enough, this issue went away when I updated to Windows 11.

So been using 12546 since then + docker + wsl2 + other stuff turned on except Hyper-V

Hopefully it stays that way or maybe it's specific to Hyper-V

luckyrat commented 1 year ago

If you're still having trouble, please see the Kee community forum, especially the Troubleshooting and KeePassRPC Port documentation. In future, using the community forum will likely result in faster help (I've just added a GitHub issue template to make that clearer for people arriving at this repo from routes that don't already mention that).