nixos/bitcoind: fix rare startup error
Previously, dhcpcd and bitcoind starting up in parallel could lead to the following error in bitcoind: ``` bitcoind: libevent: getaddrinfo: address family for nodename not supported bitcoind: Binding RPC on address 127.0.0.1 port 8332 failed. bitcoind: Unable to bind any endpoint for ``` After the initial failure, the bitcoind service would always restart successfully. This race condition, where both applications were simultaneously manipulating network resources, was only triggered under specific hardware conditions. Fix it by running bitcoind after dhcp has started (by running after `network-online.target`). This bug and the fix only affect the default NixOS scripted networking backend.
This commit is contained in:
parent
3c86c4cea7
commit
828cd4c895
@ -204,7 +204,7 @@ in
|
||||
'';
|
||||
in {
|
||||
description = "Bitcoin daemon";
|
||||
after = [ "network.target" ];
|
||||
after = [ "network-online.target" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
serviceConfig = {
|
||||
User = cfg.user;
|
||||
|
Loading…
Reference in New Issue
Block a user