0.17 doesn't seem to use ~/.bitcoin/testnet3 anymore #14557

issue zciendor opened this issue on October 23, 2018
  1. zciendor commented at 7:34 PM on October 23, 2018: none

    <!-- Describe the issue -->

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

    Up to 0.16 it was sufficient to only specify the -testnet command line option causing bitcoind to write data to the ~/.bitcoind/testnet3 directory by default and not messing with the mainnet directory ~/.bitcoin. However, with 0.17 and -testnet seems to use the old mainnet directory ~/.bitcoin.

    Not sure if this intended or a bug. Do you have to explicitely specify a different datadir for TESTNET now, if you want to run TESTNET and MAINNET on the same machine?

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

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

    $ /usr/local/bin/bitcoind -conf=/etc/bitcoin/test_bitcoin.conf -testnet
    Bitcoin Core version v0.17.0 (release build)
    InitParameterInteraction: parameter interaction: -proxy set -> setting -discover=0
    InitParameterInteraction: parameter interaction: -whitelistforcerelay=1 -> setting -whitelistrelay=1
     
    ************************
    EXCEPTION: N5boost10filesystem16filesystem_errorE       
    boost::filesystem::create_directory: Permission denied: "/mnt/data/bitcoind/.bitcoin/blocks"       
    bitcoin in AppInit()       
    
    
    
    ************************
    EXCEPTION: N5boost10filesystem16filesystem_errorE       
    boost::filesystem::create_directory: Permission denied: "/mnt/data/bitcoind/.bitcoin/blocks"       
    bitcoin in AppInit()       
    
    Shutdown: In progress...
    Shutdown: done
    

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

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

    ARM-32 (Armbian)

    <!-- 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. MarcoFalke commented at 7:39 PM on October 23, 2018: member

    For completeness, would you mind sharing the /etc/bitcoin/test_bitcoin.conf?

  3. zciendor commented at 8:09 PM on October 23, 2018: none

    cat /etc/bitcoin/test_bitcoin.conf

    # Generated with the help of https://jlopp.github.io/bitcoin-core-config-generator/
    
    # This config should be placed in following path:
    # /etc/bitcoin/test_bitcoin.conf
    
    # [core]
    # Specify a non-default location to store blockchain and other data.
    #datadir=/mnt/data/test_bitcoind/.bitcoin/
    # Set database cache size in megabytes; machines sync faster with a larger cache. Recommend setting as high as possible based upon machine's available RAM.
    #dbcache=300
    # Keep at most <n> unconnectable transactions in memory.
    maxorphantx=10
    # Keep the transaction memory pool below <n> megabytes.
    maxmempool=50
    # Set the number of script verification threads. (1 to CPU_CORES, 0 = automatic, less than 0 = leave that many cores free).
    # Note: zHIVErbox limits the number of cores used by bitcoind to the 3 BIG cores via /etc/cron.d/make_dapp_processes_faster
    #par=-4
    # Maintain a full transaction index, used by the getrawtransaction rpc call.
    txindex=1
    
    # [debug]
    debug=tor
    testnet=1
    
    # [network]
    # see https://github.com/bitcoin/bitcoin/blob/master/doc/tor.md
    # Accept incoming connections from peers.
    listen=1
    # Tor control <ip:port> to use if onion listening enabled.
    torcontrol=127.0.0.1:9052
    # connect to peers via Tor.
    onlynet=onion 
    # SOCKS5 proxy <ip:port> for 'onlynet=onion' configuration.
    onion=127.0.0.1:9053
    # Connect to other IPv4 and IPv6 peers through <ip:port> SOCKS5 proxy.
    proxy=127.0.0.1:9053
    # Specify your own public IP address. Only needed for non-ephemeral hidden service
    #externalip=.onion
    # Allow at most N inbound connections from peers.
    maxconnections=48
    # Tries to keep outbound traffic under the given target (in MiB per 24h), 0 = no limit.
    maxuploadtarget=5000
    # Disable UPnP. This was the result of a vulnerability in previous versions of Bitcoin Core and it is suspected that additional vulnerabilities may remain. However, disabling this means that you will certainly need to manually allow incoming connections if you want them.
    upnp=0
    # Add a node IP address to connect to and attempt to keep the connection open. This option can be set multiple times.
    # Since zHIVErbox comes with Cjdns, you can add a few Cjdns adresses of trusted friends here if you like
    # However, this won't work with the 'onlynet=onion' option
    #addnode=fc00::
    #addnode=fc00::
    
    # [relay]
    # Fee rates (in BTC/kB) smaller than this are considered zero fee for relaying, mining and transaction creation.
    minrelaytxfee=0.0001
    
    # [rpc]
    # Location of the RPC auth cookie
    # rpccookiefile=/run/test_bitcoind/
    # Accept command line and JSON-RPC commands.
    # server=1
    # Accept public REST requests.
    # rest=1
    # Username for JSON-RPC connections
    # rpcuser=
    # Password for JSON-RPC connections
    # rpcpassword=
    # Allow JSON-RPC connections from specified source. Valid for <ip> are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24). This option can be specified multiple times.
    # rpcallowip=127.0.0.1
    
  4. zciendor commented at 8:14 PM on October 23, 2018: none

    The strange thing is that no matter which path I specify (even non-existant) via the -conf argument, I get the same error:

    $ /usr/local/bin/bitcoind -conf=/this/is/a/nonexistant/file -testnet

    Bitcoin Core version v0.17.0 (release build)
    InitParameterInteraction: parameter interaction: -whitelistforcerelay=1 -> setting -whitelistrelay=1
    
    
    ************************
    EXCEPTION: N5boost10filesystem16filesystem_errorE       
    boost::filesystem::create_directory: Permission denied: "/mnt/data/bitcoind/.bitcoin/blocks"       
    bitcoin in AppInit()       
    
    
    
    ************************
    EXCEPTION: N5boost10filesystem16filesystem_errorE       
    boost::filesystem::create_directory: Permission denied: "/mnt/data/bitcoind/.bitcoin/blocks"       
    bitcoin in AppInit()       
    
    Shutdown: In progress...
    Shutdown: done
    
  5. MarcoFalke commented at 11:19 AM on October 24, 2018: member

    What datadir and conf file is used according to the debug output of bitcoind?

  6. zciendor commented at 1:58 PM on October 24, 2018: none

    What datadir and conf file is used according to the debug output of bitcoind?

    The datadir is not specified explicitely anywhere. So it must be the default one within the user's home directory who runs the daemon:

    test_bitcoind:x:115:999::/mnt/data/bitcoind:/bin/false
    

    And the conf file is exactly the one pasted above.

    What is special is, that the user test_bitcoind doesn't have write permissions to the /mnt/data/bitcoind/.bitcoin directory, but it has for the /mnt/data/bitcoind/.bitcoin/testnet3 subdirectory, which was sufficient until 0.16 when the -testnet argument was given.

    So the question is, is ~/.bitcoin/testnet3 no longer the default datadir with 0.17 when the -testnet argument ist given?

  7. MarcoFalke added this to the milestone 0.17.1 on Oct 24, 2018
  8. MarcoFalke added the label Utils/log/libs on Oct 24, 2018
  9. MarcoFalke added the label Block storage on Oct 24, 2018
  10. promag commented at 10:49 PM on October 24, 2018: member

    The strange thing is that no matter which path I specify (even non-existant) via the -conf argument, I get the same error:

    $ /usr/local/bin/bitcoind -conf=/this/is/a/nonexistant/file -testnet

    I don't get the error with current master (613fc95), instead I get the warning:

    Warning: The specified config file /this/is/a/nonexistant/file does not exist
    
  11. zciendor commented at 3:09 PM on October 25, 2018: none
  12. MarcoFalke removed this from the milestone 0.17.1 on Dec 3, 2018
  13. MarcoFalke added this to the milestone 0.17.2 on Dec 3, 2018
  14. MarcoFalke commented at 6:18 PM on December 3, 2018: member

    Moving to 0.17.2

  15. MarcoFalke commented at 9:49 PM on December 22, 2018: member

    Is this fixed by #14409? @zciendor

  16. benthecarman commented at 11:42 PM on January 14, 2019: contributor

    My setup is running up-to-date with master and it uses ~/.bitcoin/testnet3 for my testnet data

  17. MarcoFalke commented at 4:03 PM on January 16, 2019: member

    Is this still an issue on current master?

  18. zciendor commented at 4:23 PM on February 9, 2019: none

    Is this fixed by #14409? @zciendor

    I can confirm this is fixed with release 0.17.1

  19. MarcoFalke closed this on Feb 9, 2019

  20. DrahtBot locked this on Dec 16, 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-28 03:15 UTC

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