This is what my conf file looks like:



Whenever I run this from the command line I get the following error:

Binding RPC on address ::1 port 5040 failed.

Binding RPC on address port 5040 failed.

I checked for port 5040 using the netstat -a and it was listening, what's the problem?

  • Are you sure nothing else is using port 5040 already? Mar 21, 2019 at 23:42
  • Please post the results of running sudo lsof -i | grep 5040 Mar 21, 2019 at 23:49
  • My OS is Windows 10, not linux
    – frogman578
    Mar 22, 2019 at 7:10

2 Answers 2


Windows 10

Run netstat -ab >file.txt then notepad file.txt and search on 5040. I suspect you will find CDPSvc immediately underneath - on my machine this "Connected Devices Platform Service" is already using your port.

If that's so, search on 5041, then 5042 and continue up until search can't find it. That port is free: change your rpcport to match it.

  • Nothing happens when I run that command
    – frogman578
    Mar 24, 2019 at 19:10
  • There are two commands. Mar 24, 2019 at 22:46
  • I don't quite understand, could you elaborate more?
    – frogman578
    Mar 25, 2019 at 18:36
  • 1
    1/4: Open up an Admin Command Prompt Mar 25, 2019 at 22:13
  • 2/4: Type netstat -ab >file.txt into the Command Prompt, then press return. This is the first command and you do not expect something to happen: the >file.txt element tells Windows to save the ordinary output into a file in the current directory called file.txt. You're doing this because the ordinary output will overflow the Command Prompt buffer and you'll lose the initial output. Mar 25, 2019 at 22:14

looks like 5040 already used, try to use default port or another port

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.