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

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

    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?

     0$ /usr/local/bin/bitcoind -conf=/etc/bitcoin/test_bitcoin.conf -testnet
     1Bitcoin Core version v0.17.0 (release build)
     2InitParameterInteraction: parameter interaction: -proxy set -> setting -discover=0
     3InitParameterInteraction: parameter interaction: -whitelistforcerelay=1 -> setting -whitelistrelay=1
     4 
     5************************
     6EXCEPTION: N5boost10filesystem16filesystem_errorE       
     7boost::filesystem::create_directory: Permission denied: "/mnt/data/bitcoind/.bitcoin/blocks"       
     8bitcoin in AppInit()       
     9
    10
    11
    12************************
    13EXCEPTION: N5boost10filesystem16filesystem_errorE       
    14boost::filesystem::create_directory: Permission denied: "/mnt/data/bitcoind/.bitcoin/blocks"       
    15bitcoin in AppInit()       
    16
    17Shutdown: In progress...
    18Shutdown: done
    

    ARM-32 (Armbian)

  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

     0# Generated with the help of https://jlopp.github.io/bitcoin-core-config-generator/
     1
     2# This config should be placed in following path:
     3# /etc/bitcoin/test_bitcoin.conf
     4
     5# [core]
     6# Specify a non-default location to store blockchain and other data.
     7#datadir=/mnt/data/test_bitcoind/.bitcoin/
     8# 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.
     9#dbcache=300
    10# Keep at most <n> unconnectable transactions in memory.
    11maxorphantx=10
    12# Keep the transaction memory pool below <n> megabytes.
    13maxmempool=50
    14# Set the number of script verification threads. (1 to CPU_CORES, 0 = automatic, less than 0 = leave that many cores free).
    15# Note: zHIVErbox limits the number of cores used by bitcoind to the 3 BIG cores via /etc/cron.d/make_dapp_processes_faster
    16#par=-4
    17# Maintain a full transaction index, used by the getrawtransaction rpc call.
    18txindex=1
    19
    20# [debug]
    21debug=tor
    22testnet=1
    23
    24# [network]
    25# see https://github.com/bitcoin/bitcoin/blob/master/doc/tor.md
    26# Accept incoming connections from peers.
    27listen=1
    28# Tor control <ip:port> to use if onion listening enabled.
    29torcontrol=127.0.0.1:9052
    30# connect to peers via Tor.
    31onlynet=onion 
    32# SOCKS5 proxy <ip:port> for 'onlynet=onion' configuration.
    33onion=127.0.0.1:9053
    34# Connect to other IPv4 and IPv6 peers through <ip:port> SOCKS5 proxy.
    35proxy=127.0.0.1:9053
    36# Specify your own public IP address. Only needed for non-ephemeral hidden service
    37#externalip=.onion
    38# Allow at most N inbound connections from peers.
    39maxconnections=48
    40# Tries to keep outbound traffic under the given target (in MiB per 24h), 0 = no limit.
    41maxuploadtarget=5000
    42# 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.
    43upnp=0
    44# Add a node IP address to connect to and attempt to keep the connection open. This option can be set multiple times.
    45# Since zHIVErbox comes with Cjdns, you can add a few Cjdns adresses of trusted friends here if you like
    46# However, this won't work with the 'onlynet=onion' option
    47#addnode=fc00::
    48#addnode=fc00::
    49
    50# [relay]
    51# Fee rates (in BTC/kB) smaller than this are considered zero fee for relaying, mining and transaction creation.
    52minrelaytxfee=0.0001
    53
    54# [rpc]
    55# Location of the RPC auth cookie
    56# rpccookiefile=/run/test_bitcoind/
    57# Accept command line and JSON-RPC commands.
    58# server=1
    59# Accept public REST requests.
    60# rest=1
    61# Username for JSON-RPC connections
    62# rpcuser=
    63# Password for JSON-RPC connections
    64# rpcpassword=
    65# 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.
    66# 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

     0Bitcoin Core version v0.17.0 (release build)
     1InitParameterInteraction: parameter interaction: -whitelistforcerelay=1 -> setting -whitelistrelay=1
     2
     3
     4************************
     5EXCEPTION: N5boost10filesystem16filesystem_errorE       
     6boost::filesystem::create_directory: Permission denied: "/mnt/data/bitcoind/.bitcoin/blocks"       
     7bitcoin in AppInit()       
     8
     9
    10
    11************************
    12EXCEPTION: N5boost10filesystem16filesystem_errorE       
    13boost::filesystem::create_directory: Permission denied: "/mnt/data/bitcoind/.bitcoin/blocks"       
    14bitcoin in AppInit()       
    15
    16Shutdown: In progress...
    17Shutdown: 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:

    0test_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:

    0Warning: 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: 2024-10-31 03:12 UTC

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