3

I started monerod on my linux server to sync the (pruned) blockchain and start working with a wallet.

The syncing completed fine.
However trying to restart monerod the next day yielded the following error. How can I resolve it?

$ LANG=C LC_ALL=C  ./monerod --prune-blockchain
2021-05-01 07:56:27.451 I Monero 'Oxygen Orion' (v0.17.2.0-release)
2021-05-01 07:56:27.451 I Initializing cryptonote protocol...
2021-05-01 07:56:27.451 I Cryptonote protocol initialized OK
2021-05-01 07:56:27.451 I Initializing core...
2021-05-01 07:56:27.452 I Loading blockchain from folder /home/deploy/.bitmonero/lmdb ...
2021-05-01 07:56:27.529 I Loading checkpoints
2021-05-01 07:56:27.535 I Core initialized OK
2021-05-01 07:56:27.535 I Initializing p2p server...
2021-05-01 07:56:27.540 F Error starting server: Failed to bind IPv4 (set to required)
2021-05-01 07:56:27.540 I Deinitializing core...
2021-05-01 07:56:27.560 I Stopping cryptonote protocol...
2021-05-01 07:56:27.560 I Cryptonote protocol stopped successfully
2021-05-01 07:56:27.561 E Exception in main! Failed to initialize p2p server.
3
  • 1
    Are you sure you don't already have it running? killall monerod You can only run one daemon server process.
    – jtgrassie
    Commented May 1, 2021 at 8:11
  • ok - without doing anything else, running monerd again now works. probably a stale process as you said.
    – de.
    Commented May 1, 2021 at 8:13
  • Killall did not help me. When I look at the --log-level 4. It shows IPv4 trying to bind to ip 0.0.0.0:18080. Could that be the issue? Thing is I can't change the ip it is trying to bind to unless monerod is active. I just get command not found. (p2p-bind-ip arg) Also what ip should I be using? The ip of another node to sync the blockchain or just the ip of the monerod-ws?
    – Facelook
    Commented Jul 14, 2021 at 17:38

2 Answers 2

5

This error is typically due to trying to start more that one daemon process or a previous process not exiting cleanly. Thus make absolutely sure there is no other monerod process running, such as running killall monerod, then trying to start again should fix the issue (or a reboot).

1
1

Some cases kill all dosen't work so use command ps -e | grep monero

it will display all process running with monero you need to kill all with there PID

like this kill -9 PID

enter image description here

ps -e | grep monero
1021 ?        18:43:35 monerod
sudo kill -9 1021
1
  • killall kills alls processes matching name AND started by the current user. If you started monerod as root or some other user, you could have easily just ran sudo killall monerod.
    – jtgrassie
    Commented Jan 11, 2023 at 3:43

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.