Title: Bitcoind immediately getting shutdown signal on systemd Post by: NotATether on March 29, 2022, 03:06:33 PM I have just force restarted my unresponsive server with Bitcoind running on it, and because it wasn't running as a service automatically before, I have created a systemd service for it which I have enabled and activated, but for some reason, something is constantly shutting it down (cleanly), and restarting it in an infinite loop!
Bitcoin Core version: 22.0 OS: Ubuntu 20.04 LTS My bitcoin.conf: Code: rpcuser=#erased My Bitcoind unit file: Code: [Unit] Debug.log entries: Code: 2022-03-29T15:05:21Z Bitcoin Core version v22.0.0 (release build) The about log message occurs in a loop ever 1 second, presumably because systemd is trying to restart it again. There is no obvious error in the logs, but a strange request to shut down as soon as I type systemctl start bitcoind.service. Title: Re: Bitcoind immediately getting shutdown signal on systemd Post by: vv181 on March 29, 2022, 03:17:12 PM Have you tried to increase the restart and limit interval settings?
Or maybe it's likely because you set the Restart=always. Try to change it to other settings like on-failure. EDIT: I'm trying to replicate the config, systemd manpage shows Code: If set to always, the service will be restarted regardless of whether it exited cleanly or not, got terminated abnormally by a signal, or hit a timeout. With the systemd config you used, the bitcoind run successfully but only if I've configured the PIDfile. If it doesn't exists, I could reproduce your issues. I'm not sure where it's wrong, but I believe there is something to do with it. Title: Re: Bitcoind immediately getting shutdown signal on systemd Post by: NotATether on March 31, 2022, 02:17:46 PM Apparently, Bitcoind hates running as root and that's what was causing the shutdown, as with the default systemd unit file settings, it can't even find its home folder. Kind of strange how no error is printed for it though.
I could've ran it as an unprivileged user, which I did as well as c-lightning without problems, but then running BTCPayServer as unprivileged made stupid .NET path not found errors when trying to access the store, making it effectively useless. Time to go hunting for bargain dedi servers - I blew too much money on VPSs (https://bitcointalk.org/index.php?topic=5392248.msg59705981#msg59705981) to continue with those again. Title: Re: Bitcoind immediately getting shutdown signal on systemd Post by: WhyFhy on March 31, 2022, 11:35:53 PM Apparently, Bitcoind hates running as root and that's what was causing the shutdown, as with the default systemd unit file settings, it can't even find its home folder. Kind of strange how no error is printed for it though. I could've ran it as an unprivileged user, which I did as well as c-lightning without problems, but then running BTCPayServer as unprivileged made stupid .NET path not found errors when trying to access the store, making it effectively useless. Time to go hunting for bargain dedi servers - I blew too much money on VPSs (https://bitcointalk.org/index.php?topic=5392248.msg59705981#msg59705981) to continue with those again. Might I interest you in this? Perfect node system for just about all use case scenarios. i5-6440EQ @2.7GHZ Quadcore (505e3) 32gb DDR4L ram wifi+bluetooth (worlwide) sim slot x2 oldschool pci slots 2x sata/power connectors Nic1+Nic2 x4 com ports IRQ3,4,5&7 (RS232,RS422,RS485) GPIO 8 In and out with mapping in bios. 4x 2.0 usb, x4 3.0 usb 1x VGA, 2x DP, 1x HDMI (Intel HD) No passwords, OROM,SGX Fanless the whole unit is a heatsink. Looks like this (https://www.dell.com/en-us/work/shop/cty/embedded-box-pc-5000/spd/embedded-box-pc-5000). Make offers, open to trades? |