2

when i start ganache-cli with command, it gives this error :

❯ ganache-cli
Ganache CLI v6.4.1 (ganache-core: 2.5.3)
Error: listen EADDRINUSE 127.0.0.1:8545
    at Server.setupListenHandle [as _listen2] (net.js:1360:14)
    at listenInCluster (net.js:1401:12)
    at doListen (net.js:1510:7)
    at _combinedTickCallback (internal/process/next_tick.js:142:11)
    at process._tickCallback (internal/process/next_tick.js:181:9)
    at Function.Module.runMain (module.js:696:11)
    at startup (bootstrap_node.js:204:16)
    at bootstrap_node.js:625:3

so i checked which process am i using on port 8545, but it seemed like nothing.

❯ lsof -i :8545

~
❯

also, if i run ganache-cli -p 7545, i works on 127.0.0.1:7545 without any problems.

does anyone have any idea if this is a bug or i did something wrong starting ganache?

3
  • Restart your machine. Commented Mar 21, 2019 at 6:49
  • yes, i did a few times but nothing changed.
    – user76333
    Commented Mar 21, 2019 at 7:42
  • 3
    Oh, actually, I think I know what the problem might be. Did you happen to install Parity at some point? It automatically runs at start-up, and listens to 8545 by default. Look for a Parity process and shut it down, or alternatively, change your system settings to prevent it from running at start-up. Side note: it might also be the case for Geth. Commented Mar 21, 2019 at 7:52

2 Answers 2

1

It solved with @goodvibration 's answer.

0

1.check which process is using port 8545 ?
Ubuntu/mac -> lsof -i :8545
Windows ->netstat -aof | findstr :8545

2.kill the process
Ubuntu ->pkill node(process/COMMAND name form above output)
Windows ->try Task Manager

3.try to run ganache-cli agin

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.