Bitcoin Forum
May 06, 2024, 04:20:15 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: How to switch in regtest Mode  (Read 109 times)
uxBLN01 (OP)
Newbie
*
Offline Offline

Activity: 14
Merit: 3


View Profile
September 13, 2022, 05: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.


1715012415
Hero Member
*
Offline Offline

Posts: 1715012415

View Profile Personal Message (Offline)

Ignore
1715012415
Reply with quote  #2

1715012415
Report to moderator
1715012415
Hero Member
*
Offline Offline

Posts: 1715012415

View Profile Personal Message (Offline)

Ignore
1715012415
Reply with quote  #2

1715012415
Report to moderator
Activity + Trust + Earned Merit == The Most Recognized Users on Bitcointalk
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715012415
Hero Member
*
Offline Offline

Posts: 1715012415

View Profile Personal Message (Offline)

Ignore
1715012415
Reply with quote  #2

1715012415
Report to moderator
1715012415
Hero Member
*
Offline Offline

Posts: 1715012415

View Profile Personal Message (Offline)

Ignore
1715012415
Reply with quote  #2

1715012415
Report to moderator
1715012415
Hero Member
*
Offline Offline

Posts: 1715012415

View Profile Personal Message (Offline)

Ignore
1715012415
Reply with quote  #2

1715012415
Report to moderator
DaveF
Legendary
*
Online Online

Activity: 3472
Merit: 6263


Crypto Swap Exchange


View Profile WWW
September 13, 2022, 07: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

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
BitMaxz
Legendary
*
Offline Offline

Activity: 3248
Merit: 2965


Block halving is coming.


View Profile WWW
September 13, 2022, 11: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"

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
uxBLN01 (OP)
Newbie
*
Offline Offline

Activity: 14
Merit: 3


View Profile
September 14, 2022, 07: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()       
nc50lc
Legendary
*
Offline Offline

Activity: 2408
Merit: 5588


Self-proclaimed Genius


View Profile
September 14, 2022, 08:03:21 AM
Merited by BlackHatCoiner (4)
 #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=<full path to a folder> 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.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
DaveF
Legendary
*
Online Online

Activity: 3472
Merit: 6263


Crypto Swap Exchange


View Profile WWW
September 14, 2022, 06: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=<full path to a folder> 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


█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!