2

I'm experiencing periodical node restart, happening every minute or two. Happens on Ubuntu 20.04LTS, bitcoind version is v0.21.0. I'm running it as a systemd service using the following file:

Description=Bitcoin daemon
After=network.target

[Service]
ExecStart=/opt/bitcoin/bin/bitcoind -conf=/etc/bitcoin/bitcoin.conf -pid=/run/bitcoind/bitcoind.pid
# Creates /run/bitcoind owned by bitcoin
RuntimeDirectory=bitcoind
User=bitcoin
Type=forking
PIDFile=/run/bitcoind/bitcoind.pid
Restart=on-failure
PrivateTmp=true

[Install]
WantedBy=multi-user.target

This used to work just fine with an older version of bitcoind under ubuntu 18.

Now I'm seeing strange Ignoring unknown configuration messages in debug.log which I suppose should not be there, since it's a systemd config. Otherwise, the start seems okay.

2021-02-02T14:57:08Z Ignoring unknown configuration value Unit.Description
2021-02-02T14:57:08Z Ignoring unknown configuration value Unit.After
2021-02-02T14:57:08Z Ignoring unknown configuration value Service.ExecStart
2021-02-02T14:57:08Z Ignoring unknown configuration value Service.RuntimeDirectory
2021-02-02T14:57:08Z Ignoring unknown configuration value Service.User
2021-02-02T14:57:08Z Ignoring unknown configuration value Service.Type
2021-02-02T14:57:08Z Ignoring unknown configuration value Service.PIDFile
2021-02-02T14:57:08Z Ignoring unknown configuration value Service.PrivateTmp
2021-02-02T14:57:08Z Ignoring unknown configuration value Install.WantedBy
2021-02-02T14:57:08Z Bitcoin Core version v0.21.0 (release build)
2021-02-02T14:57:08Z Warning: /etc/bitcoin/bitcoin.conf:4 Section [Unit] is not recognized.
/etc/bitcoin/bitcoin.conf:8 Section [Service] is not recognized.
/etc/bitcoin/bitcoin.conf:18 Section [Install] is not recognized.

2021-02-02T14:57:08Z Assuming ancestors of block 0000000000000000000b9d2ec5a352ecba0592946514a92f14319dc2b367fc72 have valid signatures.
2021-02-02T14:57:08Z Setting nMinimumChainWork=00000000000000000000000000000000000000001533efd8d716a517fe2c5008
2021-02-02T14:57:08Z Using the 'sse4(1way),sse41(4way)' SHA256 implementation
2021-02-02T14:57:08Z Default data directory /home/bitcoin/.bitcoin
2021-02-02T14:57:08Z Using data directory /home/bitcoin/.bitcoin
2021-02-02T14:57:08Z Config file: /etc/bitcoin/bitcoin.conf

runtime logs shows that it's rebooting because of tor

2021-02-02T14:55:24Z UpdateTip: new best=0000000000000000000af6dd2066556e0f2f8931d6167b863e34d504938fcd5a height=663011 version=0x20800000 log2_work=92.542328 tx=599716461 date='2020-12-26T06:05:26Z' progress=0.980973 cache=99.9Mi
2021-02-02T14:55:25Z UpdateTip: new best=0000000000000000000237103259036594af37381c4848612f15aa00f7e5286a height=663012 version=0x20000000 log2_work=92.542344 tx=599719059 date='2020-12-26T06:38:09Z' progress=0.980984 cache=100.8M
2021-02-02T14:55:25Z UpdateTip: new best=00000000000000000002cc21f6c8a8e81c72a57b291dc28aa38c3b80974ad1f4 height=663013 version=0x20c00000 log2_work=92.542360 tx=599721318 date='2020-12-26T07:00:56Z' progress=0.980992 cache=101.6M
2021-02-02T14:55:26Z New outbound peer connected: version: 70015, blocks=668760, peer=12 (full-relay)
2021-02-02T14:55:26Z New outbound peer connected: version: 70015, blocks=668760, peer=13 (full-relay)
2021-02-02T14:55:26Z Leaving block file 2377: CBlockFileInfo(blocks=99, size=133771579, heights=662934...663086, time=2020-12-25...2020-12-26)
2021-02-02T14:55:26Z Pre-allocating up to position 0x1000000 in blk02378.dat
2021-02-02T14:55:28Z Pre-allocating up to position 0x100000 in rev02378.dat
2021-02-02T14:55:28Z UpdateTip: new best=00000000000000000006ca9c0aa8ad1bfc25dccd6ba488b13eb0bd8f44fa683f height=663014 version=0x20c00000 log2_work=92.542376 tx=599723706 date='2020-12-26T07:19:24Z' progress=0.980998 cache=102.5M
2021-02-02T14:55:29Z Pre-allocating up to position 0xd00000 in rev02377.dat
2021-02-02T14:55:29Z UpdateTip: new best=000000000000000000038c07369d96509d3dafb2a8f6462cf2fc8d8ea44f5ce7 height=663015 version=0x20000000 log2_work=92.542392 tx=599725048 date='2020-12-26T07:22:29Z' progress=0.980999 cache=103.7M
2021-02-02T14:55:29Z tor: Thread interrupt
2021-02-02T14:55:29Z Shutdown: In progress...
2021-02-02T14:55:29Z addcon thread exit
2021-02-02T14:55:29Z opencon thread exit
2021-02-02T14:55:29Z torcontrol thread exit
2021-02-02T14:55:29Z net thread exit
2021-02-02T14:55:29Z UpdateTip: new best=00000000000000000007e9f3911eee5ecbe900dba40ac445d5e4e2c37e5a5648 height=663016 version=0x20000000 log2_work=92.542408 tx=599727096 date='2020-12-26T07:23:34Z' progress=0.981000 cache=104.3M
2021-02-02T14:55:29Z msghand thread exit
2021-02-02T14:55:29Z DumpAnchors: Flush 2 outbound block-relay-only peer addresses to anchors.dat started
2021-02-02T14:55:29Z DumpAnchors: Flush 2 outbound block-relay-only peer addresses to anchors.dat completed (0.00s)
2021-02-02T14:55:29Z scheduler thread exit
2021-02-02T14:55:29Z Writing 0 unbroadcast transactions to disk.
2021-02-02T14:55:29Z Dumped mempool: 8e-06s to copy, 0.003384s to dump
2021-02-02T14:55:30Z FlushStateToDisk: write coins cache to disk (795334 coins, 109410kB) started
2021-02-02T14:55:31Z FlushStateToDisk: write coins cache to disk (795334 coins, 109410kB) completed (1.92s)
2021-02-02T14:55:31Z FlushStateToDisk: write coins cache to disk (0 coins, 7219kB) started
2021-02-02T14:55:32Z FlushStateToDisk: write coins cache to disk (0 coins, 7219kB) completed (0.07s)
2021-02-02T14:55:32Z Shutdown: done

happens every minute or two

2021-02-02T14:13:00Z tor: Thread interrupt
2021-02-02T14:14:34Z tor: Thread interrupt
2021-02-02T14:16:09Z tor: Thread interrupt
2021-02-02T14:17:43Z tor: Thread interrupt
2021-02-02T14:19:17Z tor: Thread interrupt
2021-02-02T14:20:52Z tor: Thread interrupt
2021-02-02T14:22:25Z tor: Thread interrupt
2021-02-02T14:23:59Z tor: Thread interrupt
2021-02-02T14:25:34Z tor: Thread interrupt
2021-02-02T14:27:08Z tor: Thread interrupt
2021-02-02T14:28:42Z tor: Thread interrupt
2021-02-02T14:30:16Z tor: Thread interrupt
2021-02-02T14:31:53Z tor: Thread interrupt
2021-02-02T14:33:28Z tor: Thread interrupt
2021-02-02T14:35:02Z tor: Thread interrupt
2021-02-02T14:36:39Z tor: Thread interrupt
2021-02-02T14:38:13Z tor: Thread interrupt
2021-02-02T14:39:47Z tor: Thread interrupt
2021-02-02T14:41:21Z tor: Thread interrupt
2021-02-02T14:42:56Z tor: Thread interrupt
2021-02-02T14:44:29Z tor: Thread interrupt
2021-02-02T14:46:02Z tor: Thread interrupt
2021-02-02T14:47:37Z tor: Thread interrupt
2021-02-02T14:49:11Z tor: Thread interrupt
2021-02-02T14:50:46Z tor: Thread interrupt
2021-02-02T14:52:20Z tor: Thread interrupt
2021-02-02T14:53:55Z tor: Thread interrupt
2021-02-02T14:55:29Z tor: Thread interrupt
2021-02-02T14:57:03Z tor: Thread interrupt
2021-02-02T14:58:38Z tor: Thread interrupt
1
  • Thanks Pavel for coming back to update your question. Could you please put your answer in an answer post instead of the question? Self-answers are encouraged!
    – Murch
    Commented Feb 2, 2021 at 16:00

1 Answer 1

3

After some testing, I figured out that Config file arg: [Install] daemon="1" was not working as expected and that the process does not want to fork. Therefore systemd tried to restart it forever.

I could fix this by moving daemon=1 to the first line in my bitcoin.conf file.

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.