bitcoind daemon + reindex does not daemonize #13405

issue linux-mining opened this issue on June 6, 2018
  1. linux-mining commented at 6:12 AM on June 6, 2018: none

    <!-- This issue tracker is only for technical issues related to Bitcoin Core. General bitcoin questions and/or support requests are best directed to the Bitcoin StackExchange at https://bitcoin.stackexchange.com. For reporting security issues, please read instructions at https://bitcoincore.org/en/contact/. If the node is "stuck" during sync or giving "block checksum mismatch" errors, please ensure your hardware is stable by running memtest and observe CPU temperature with a load-test tool such as linpack before creating an issue! -->

    <!-- Describe the issue --> -daemon flag is ignored

    <!--- What behavior did you expect? -->

    Expected bitcoind to background itself

    <!--- What was the actual behavior (provide screenshots if the issue is GUI-related)? -->

    runs in the foreground. If you disconnect from session it dies.

    <!--- How reliably can you reproduce the issue, what are the steps to do so? -->

    Everytime

    <!-- What version of Bitcoin Core are you using, where did you get it (website, self-compiled, etc)? -->

    From website, latest version 0.16

    <!-- What type of machine are you observing the error on (OS/CPU and disk type)? -->

    <!-- Any extra information that might be useful in the debugging process. -->

    <!--- This is normally the contents of a `debug.log` or `config.log` file. Raw text or a link to a pastebin type site are preferred. -->

  2. achow101 commented at 6:17 AM on June 6, 2018: member

    What OS are you using? What is the full command you are using? Can you post the contents of your bitcoin.conf? Can you post the contents of the debug.log file?

  3. linux-mining commented at 6:21 AM on June 6, 2018: none

    OS is CentOS 7 (1804 minimal). Full command is ./bitcoind -daemon -server -reindex. Never used the bitcoin.conf file, so whatever is default. The debug log just shows the progress of the reindexing. (Not on the computer anymore sorry)

  4. linux-mining commented at 1:34 PM on June 6, 2018: none

    Confirmed this morning even after indexing was finished, still failed to background itself. The -daemon flag works on all other options I've tried so far.

    Not sure if this is intentional?

  5. laanwj commented at 2:10 PM on June 6, 2018: member

    Cannot reproduce this here (Ubuntu 16.04):

    $ src/bitcoind -reindex -daemon -datadir=/store/tmp/testbtc.reindex
    Bitcoin server starting
    $
    

    Tried with both 0.16 and master branch.

    (btw, -server is unnecessary with bitcoind)

  6. laanwj added the label Questions and Help on Jun 6, 2018
  7. linux-mining commented at 3:31 PM on June 6, 2018: none

    I've reproduced now on two separate machines. (Fedora 28 and CentOS 7) Same behavior.

    Why is -server not necessary? I am able to run rpc without it? Sorry I'm not in front of my machine now to confirm.

  8. sipa commented at 3:37 PM on June 6, 2018: member

    -server is for enabling RPC when running the GUI (bitcoin-qt). When you run bitcoind, the RPC server is always enabled (otherwise it wouldn't serve any function).

  9. linux-mining commented at 3:43 PM on June 6, 2018: none

    Ah yes, that makes perfect sense.

    Perhaps leaving that flag off with fix it?

  10. sipa commented at 3:59 PM on June 6, 2018: member

    No, -server should be completely unrelated to your issue.

  11. MarcoFalke commented at 4:02 PM on June 6, 2018: member

    Could not reproduce on fresh fredora 28:

    $ lsb_release -d && ./bitcoin-0.16.0/bin/bitcoind -daemon -reindex -server 
    Description:	Fedora release 28 (Twenty Eight)
    Bitcoin server starting
    $ 
    
  12. MarcoFalke commented at 4:02 PM on June 6, 2018: member

    Please add exact steps to reproduce on a fresh fedora 28

  13. linux-mining commented at 5:15 PM on June 6, 2018: none

    ./bitcoind -daemon -txindex -server ./bitcoin-cli stop ./bitcoind -daemon -server Asks me to run with -reindex ./bitcoind -daemon -reindex -server

    Does not background at this point, even when reindex is done.

  14. MarcoFalke commented at 8:43 PM on June 6, 2018: member

    Still can't reproduce

  15. MarcoFalke commented at 8:44 PM on June 6, 2018: member

    Please check your debug.log for possible causes; Alternatively you can upload it here.

    You can find the debug.log in your data dir.

  16. linux-mining commented at 9:38 PM on June 6, 2018: none

    I'm not on the machine now. I tailed the debug file, it just had the progress of the re-indexing, then the standard downloading messages to catch the block chain up.

    I'm curious, you downloaded the entire blockchain with -txindex then -reindexed that fast? I have a four core + ssd and it took a long time

    That is the only way I can get this to reproduce

  17. kristapsk commented at 10:08 PM on June 6, 2018: contributor

    Asks me to run with -reindex ./bitcoind -reindex -server

    You don't have -daemon flag here.

    With "bitcoind -daemon -reindex" I also can't reproduce this under Gentoo Linux.

  18. linux-mining commented at 10:18 PM on June 6, 2018: none

    Simply running -daemon -reindex works here as well.

    This only appears after downloading the blockchain with -txindex -daemon. Then relaunching without -txindex. You will get a warning message to use -reindex. At this point it does not background. On the next launch after its done it indeed backgrounds as usual.

    I don't know how people are testing this so fast. I have a symmetrical gigabit pipe and it took a few hours to reproduce. I don't really care to try again. I'm just going to close under the assumption I made the mistake.

  19. linux-mining closed this on Jun 6, 2018

  20. MarcoFalke locked this on Sep 8, 2021

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-26 06:15 UTC

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