bitcoin fails to find/read .conf when using -datadir argument #241

issue nanotube opened this issue on May 18, 2011
  1. nanotube commented at 11:25 PM on May 18, 2011: none

    When i try to run bitcoin with -testnet and -datadir=someotherdir things get stored as expected, in someotherdir/testnet but if i try to run it with -server (or run bitcoind), it complains that it can't find rpcpassword, even though it is present in someotherdir/testnet.

    Warning: To use the "-server" option, you must set rpcpassword=<password> in the configuration file: someotherdir/testnet/bitcoin.conf If the file does not exist, create it with owner-readable-only file permissions.

    the file is of course quite present, and has correct permissions.

    i have tried copying the .conf file into stock ~/.bitcoin/testnet location, i have tried making a symlink from there to the whole dir - nothing helps. the only way to make it stop complaining is to stop using the -datadir argument, and let it store things in the default location.

    This is a bug, and should be fixed. :)

    Note, I have thus far only tried it with -testnet, I do not know if this behavior is only present when using -testnet or not. This needs testing.

  2. gavinandresen commented at 12:28 AM on May 19, 2011: contributor

    I know it's weird, but -testnet reads bitcoin.conf from the datadir, NOT datadir/testnet.

  3. nanotube commented at 2:45 AM on May 19, 2011: none

    gavinandresen: well... shouldn't this be fixed, so it stops being weird? :)

  4. sgimenez referenced this in commit 10dab87615 on Jul 7, 2011
  5. sgimenez referenced this in commit 57bffdc3d5 on Jul 9, 2011
  6. sgimenez referenced this in commit f43f0d6bff on Jul 9, 2011
  7. gavinandresen commented at 5:02 PM on August 9, 2011: contributor

    Won't fix-- it is what it is.

    (for the record, Satoshi re-wrote my initial implementation to put the .conf file on top of the testnet/ folder, so I agree with y'all. But changing it again now isn't, in my opinion, worth all the confusion the change would cause).

  8. gavinandresen closed this on Aug 9, 2011

  9. dexX7 referenced this in commit 63ca90f4bf on Dec 14, 2014
  10. sipa referenced this in commit a591d98c32 on Apr 22, 2015
  11. TheBlueMatt referenced this in commit 582b2934e6 on Oct 20, 2015
  12. kleetus referenced this in commit 803d69203a on Feb 5, 2016
  13. deadalnix referenced this in commit 846854d9a4 on Jan 15, 2017
  14. deadalnix referenced this in commit f3d3519ce0 on Jan 19, 2017
  15. jnewbery referenced this in commit 8ec07c6661 on Feb 3, 2017
  16. destenson referenced this in commit 3f1165ee90 on Nov 18, 2017
  17. attilaaf referenced this in commit 7c0e5d84ae on Jan 13, 2020
  18. cryptapus referenced this in commit ec79e1a1d0 on May 3, 2021
  19. DrahtBot 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-13 21:16 UTC

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