Author

Topic: How to switch in regtest Mode (Read 112 times)

legendary
Activity: 3500
Merit: 6320
Crypto Swap Exchange
September 14, 2022, 02:57:45 PM
#6
Output:
Quote
EXCEPTION: NSt10filesystem7__cxx1116filesystem_errorE      
filesystem error: cannot create directories: Permission denied [/mnt/hdd/bitcoin/regtest/wallets]      
bitcoin in AppInit()      
Like someone mentioned in your other thread, there's a permission issue.
Try to add -datadir= to your command to create Regtest's data directory somewhere else where you have the permission to write.

Take note that the specified directory should be existing prior on using the command,
also, the specified datadir= is the "bitcoin" datadir so instead there, a "regtest" folder will automatically be created inside it where the regtest files will be created.

The OP mentioned that it's a raspiblitz setup, IIRC it runs bitcoind as it's own user so you will have to make sure that that user can write to that directory, not the user you SSH in as.
I like the pre-done nodes like this a lot, but you are living in their world to a certain point so things that might be simple on a device you did yourself might require a little more tweaking on one of these.

-Dave

legendary
Activity: 2394
Merit: 5531
Self-proclaimed Genius
September 14, 2022, 04:03:21 AM
#5
Output:
Quote
EXCEPTION: NSt10filesystem7__cxx1116filesystem_errorE      
filesystem error: cannot create directories: Permission denied [/mnt/hdd/bitcoin/regtest/wallets]      
bitcoin in AppInit()      
Like someone mentioned in your other thread, there's a permission issue.
Try to add -datadir= to your command to create Regtest's data directory somewhere else where you have the permission to write.

Take note that the specified directory should be existing prior on using the command,
also, the specified datadir= is the "bitcoin" datadir so instead there, a "regtest" folder will automatically be created inside it where the regtest files will be created.
newbie
Activity: 14
Merit: 3
September 14, 2022, 03:50:25 AM
#4
Do you have
Code:
daemon=1
regtest=1

in your bitcoin.conf file?

Also, since you are running raspiblitz I am not sure if there are any other changes needed. There should be none, but I don't know if there are any other custom config files that it added. I don't see any on my node but I have not tried regtest on it so I can't be 100% sure.

-Dave

Yes, indeed they have a bitcoin.conf file and I added the infos you mentioned but then:
Code:
bitcoind -regtest -daemon

Output:
Quote
EXCEPTION: NSt10filesystem7__cxx1116filesystem_errorE       
filesystem error: cannot create directories: Permission denied [/mnt/hdd/bitcoin/regtest/wallets]       
bitcoin in AppInit()       
legendary
Activity: 3304
Merit: 3037
BTC price road to $80k
September 13, 2022, 07:35:56 PM
#3
If you still get errors from the above configuration there is a guide here on the forum on how to enable and use regtest.

You can check this link How to use regtest - the definitive guide

You can also follow this guide "How to Bitcoin regtest"
legendary
Activity: 3500
Merit: 6320
Crypto Swap Exchange
September 13, 2022, 03:10:40 PM
#2
Do you have
Code:
daemon=1
regtest=1

in your bitcoin.conf file?

Also, since you are running raspiblitz I am not sure if there are any other changes needed. There should be none, but I don't know if there are any other custom config files that it added. I don't see any on my node but I have not tried regtest on it so I can't be 100% sure.

-Dave
newbie
Activity: 14
Merit: 3
September 13, 2022, 01:44:11 PM
#1
Hello,

I am setting up a Bitcoin/Lightning node via raspiblitz on my Raspberry pi. I get access to it via my ssh connection on the mac terminal. How do I switch now in the regtest mode? If I am trying:
Code:
bitcoin-cli -regtest getnewaddress

I get the:
Output:
Quote
error: timeout on transient error: Could not connect to the server 127.0.0.1:18443

Make sure the bitcoind server is running and that you are connecting to the correct RPC port.


Jump to: