simple-monerod-docker
simple-monerod-docker copied to clipboard
Monerod Container starting but not running
After a new install of monerod and running docker compose up -d monerod
I get this Container monerod Started
But after checking the status docker exec monerod /usr/local/bin/monerod status
I keep having the same message:
Error response from daemon: Container 3d883896f79fad842eeb27c18b30536c1f0e94ea87b7d169a46b820cdceae5e7 is restarting, wait until the container is running
I tried reboot, I left it sleep for a night, but still same result.
I run the container on Ubuntu 24.04 on a RPi5.
From docker logs
, this seems to be the problem :
I Initializing core...
I Loading blockchain from folder /home/monero/.bitmonero/lmdb ...
F Existing lmdb database is incompatible with this version.
F Please delete the existing database and resync.
I Stopping cryptonote protocol...
I Cryptonote protocol stopped successfully
E Exception in main! Failed to initialize core
Hey @ubuntophe,
maybe the db got corrupted while syncing your node.
Can you just stop and then remove the monerod container with the bitmonero docker volume? Then recreating monerod should resync it from the start.
You could do this like this:
docker stop monerod
docker container rm monerod -v
docker volume rm bitmonero
docker compose up -d
Run those commands in the folder, where your docker-compose.yml file is.
Thank you for your reply.
docker volume rm bitmonero
gives Error response from daemon: get bitmonero: no such volume
problems remains.
sudo find -iname .bitmonero
gives
./var/lib/docker/overlay2/ace5b5fffe47426074ff27db23c5f89cf05c1a6c19f875ecfaffc3501cc280db/diff/home/monero/.bitmonero
./var/lib/docker/overlay2/43aa9947220f6116ce6b3eb4142b16d0e4f86776b487e4e75d3a4a0835234e89/diff/home/monero/.bitmonero
./var/lib/docker/volumes/p2pool_monero-wallet-rpc-data/_data/.bitmonero
./var/lib/docker/volumes/p2pool_bitmonero/_data/.bitmonero
find: ‘./run/user/120/doc’: Permission denied
find: ‘./run/user/1002/doc’: Permission denied
I rewrote the entire docker-compose.yml file and it seems to work.
@ubuntophe can you please share your new docker-compose.yml file? I want to find out, what the problem was.
Oh sorry @sethforprivacy and @ubuntophe, I am just realizing, that this is not my repo of monero suite, but it's Seth's repo 😅
Would also love to figure out what happened!
I would also assume DB corruption somehow, though that's quite rare.
I've just come to terms that once in a while I have to rebuild everyhting.
This is typically what the logs outputs, just before the container just stops.
2024-06-01 10:33:57.088 I Monero 'Fluorine Fermi' (v0.18.3.3-release)
2024-06-01 10:33:57.088 I Initializing cryptonote protocol...
2024-06-01 10:33:57.088 I Cryptonote protocol initialized OK
2024-06-01 10:33:57.089 I Initializing core...
2024-06-01 10:33:57.089 I Loading blockchain from folder /home/monero/.bitmonero/lmdb ...
2024-06-01 10:33:57.143 I Loading checkpoints
2024-06-01 10:33:57.143 I Core initialized OK
2024-06-01 10:33:57.143 I Initializing p2p server...
2024-06-01 10:33:57.151 I p2p server initialized OK
2024-06-01 10:33:57.151 I Initializing core RPC server...
2024-06-01 10:33:57.152 I Binding on 0.0.0.0 (IPv4):18081
2024-06-01 10:33:57.162 I core RPC server initialized OK on port: 18081
2024-06-01 10:33:57.163 I Initializing restricted RPC server...
2024-06-01 10:33:57.163 I Binding on 0.0.0.0 (IPv4):18089
2024-06-01 10:33:57.435 I restricted RPC server initialized OK on port: 18089
2024-06-01 10:33:57.435 I Starting core RPC server...
2024-06-01 10:33:57.435 I core RPC server started ok
2024-06-01 10:33:57.435 I Starting restricted RPC server...
2024-06-01 10:33:57.435 I restricted RPC server started ok
2024-06-01 10:33:57.435 I Public RPC port 18089 will be advertised to other peers over P2P
2024-06-01 10:33:57.435 I Starting p2p net loop...
2024-06-01 10:33:58.436 I
2024-06-01 10:33:58.436 I **********************************************************************
2024-06-01 10:33:58.436 I The daemon will start synchronizing with the network. This may take a long time to complete.
2024-06-01 10:33:58.436 I
2024-06-01 10:33:58.436 I You can set the level of process detailization through "set_log <level|categories>" command,
2024-06-01 10:33:58.436 I where <level> is between 0 (no details) and 4 (very verbose), or custom category based levels (eg, *:WARNING).
2024-06-01 10:33:58.436 I
2024-06-01 10:33:58.436 I Use the "help" command to see the list of available commands.
2024-06-01 10:33:58.436 I Use "help <command>" to see a command's documentation.
2024-06-01 10:33:58.436 I **********************************************************************
2024-06-01 10:33:58.607 I [46.32.46.171:18080 OUT] Sync data returned a new top block candidate: 3158256 -> 3161566 [Your node is 3310 blocks (4.6 days) behind]
2024-06-01 10:33:58.607 I SYNCHRONIZATION started
Running it on an unraid host, stripped of specific vars, the launch command is.
docker run
-d
--name='monerod'
--net='bridge'
-e TZ="Europe/Berlin"
-p '18080:18080/tcp'
-p '18081:18081/tcp'
-p '18083:18083/tcp'
-p '18089:18089/tcp'
-v '/mnt/ssd/intel_ssd/monero/':'/home/monero':'rw'
--user 99:100 'sethsimmons/simple-monerod:latest'
--rpc-restricted-bind-ip=0.0.0.0
--rpc-restricted-bind-port=18089
--public-node
--no-igd
--enable-dns-blocklist
--zmq-pub=tcp://0.0.0.0:18083
--in-peers=32
--out-peers=64
--rpc-bind-ip=0.0.0.0
--confirm-external-bind
Deleting the /mnt/ssd/intel_ssd/monero/
directory will rebuild everything, and it will keep working for a few more months.
I've hooked it up a p2pool miner, along with exposing it on clearned/tor for use with Cakewallet, which works flawlessly.
Edit
Did some more digging this time around, and found that the process monerod
actually dumps one extra line that doesn't show up in the log of the container: Bus error
.
A quick google reveals this is due to a corrupted DB, most likely due to an unclean shutdown.
To find this, i started the container with the following command
docker run \
-it --rm \
--name='monerod2' \
--net='bridge' \
-e TZ="Europe/Berlin" \
-p '18080:18080/tcp' \
-p '18081:18081/tcp' \
-p '18083:18083/tcp' \
-p '18089:18089/tcp' \
-v '/mnt/ssd/intel_ssd/monero/':'/home/monero':'rw' \
--entrypoint /bin/ash --user 99:100 'sethsimmons/simple-monerod:latest'
Then ran HOME=/home/monero monerod
in the terminal inside the container.
So I got the same error. It apparently stopped working yesterday for no reason. I dont wanna delete the volume and sync everything again since it took my Pi 5 more than a week to reach 90%.