script: Improve robustness of bitcoind.service on startup #20884

pull hebasto wants to merge 3 commits into bitcoin:master from hebasto:210108-systemd changing 2 files +7 −3
  1. hebasto commented at 4:09 PM on January 8, 2021: member

    If network interfaces are not properly up the following happens:

    ...
    2021-01-08T10:17:11Z scheduler thread start
    2021-01-08T10:17:11Z libevent: getaddrinfo: address family for nodename not supported
    2021-01-08T10:17:11Z Binding RPC on address 127.0.0.1 port 8332 failed.
    2021-01-08T10:17:11Z HTTP: creating work queue of depth 16
    2021-01-08T10:17:11Z Using random cookie authentication.
    2021-01-08T10:17:11Z Generated RPC authentication cookie /var/lib/bitcoind/.cookie
    2021-01-08T10:17:11Z HTTP: starting 2 worker threads
    2021-01-08T10:17:11Z init message: Loading banlist...
    2021-01-08T10:17:11Z SetNetworkActive: true
    2021-01-08T10:17:11Z Error: Cannot resolve -externalip address: <EDITED>
    2021-01-08T10:17:11Z Shutdown: In progress...
    2021-01-08T10:17:11Z scheduler thread exit
    2021-01-08T10:17:11Z Shutdown: done
    

    This PR improves robustness on startup in such cases in documented way: https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/

    Also minor doc improvements are added.

  2. script: Improve robustness of bitcoind.service on startup d9392b724c
  3. script: Add Documentation key to bitcoind.service 601778c310
  4. doc: Fix systemd spelling and link to doc/init.md
    See https://www.freedesktop.org/wiki/Software/systemd/
    9d02654677
  5. DrahtBot added the label Docs on Jan 8, 2021
  6. DrahtBot added the label Scripts and tools on Jan 8, 2021
  7. in contrib/init/bitcoind.service:14 in 601778c310 outdated
      10 | @@ -11,6 +11,7 @@
      11 |  
      12 |  [Unit]
      13 |  Description=Bitcoin daemon
      14 | +Documentation=https://github.com/bitcoin/bitcoin/blob/master/doc/init.md
    


    Sjors commented at 5:28 PM on January 8, 2021:

  8. Sjors commented at 5:29 PM on January 8, 2021: member

    ACK 9d02654

    I've been using the same modification for at least a year.

  9. brunoerg approved
  10. practicalswift commented at 5:43 PM on January 9, 2021: contributor

    ACK 9d026546778629472574b26fa73338efc63d02da: patch looks correct

  11. darosior approved
  12. darosior commented at 10:06 PM on January 9, 2021: member

    ACK 9d026546778629472574b26fa73338efc63d02da -- been using the first patch too

  13. in contrib/init/bitcoind.service:14 in 9d02654677
      10 | @@ -11,7 +11,11 @@
      11 |  
      12 |  [Unit]
      13 |  Description=Bitcoin daemon
      14 | -After=network.target
      15 | +Documentation=https://github.com/bitcoin/bitcoin/blob/master/doc/init.md
    


    luke-jr commented at 6:55 PM on January 11, 2021:

    Is there a way to cleanly link to the local file instead of github?


    hebasto commented at 9:07 PM on January 11, 2021:

    idk about such a way. Have you any concerns about a link to the file in the github repo? If so, I could drop this change.

  14. RiccardoMasutti approved
  15. RiccardoMasutti commented at 2:34 PM on January 15, 2021: contributor

    ACK

  16. laanwj merged this on Jan 18, 2021
  17. laanwj closed this on Jan 18, 2021

  18. hebasto deleted the branch on Jan 18, 2021
  19. sidhujag referenced this in commit 1434ae2e04 on Jan 20, 2021
  20. DrahtBot locked this on Aug 16, 2022

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-22 18:14 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me