Author

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

legendary
Activity: 3500
Merit: 6320
Crypto Swap Exchange
September 14, 2022, 01: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: 2618
Merit: 6452
Self-proclaimed Genius
September 14, 2022, 03: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, 02: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: 3472
Merit: 3217
Playbet.io - Crypto Casino and Sportsbook
September 13, 2022, 06: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, 02: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, 12: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: