Bitcoin Forum
May 14, 2024, 12:48:47 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Bitcoin RPC loadwallet Error - Wallet file verification failed  (Read 175 times)
nliveanalytics (OP)
Newbie
*
Offline Offline

Activity: 4
Merit: 0


View Profile
September 07, 2022, 12:41:54 PM
 #1

Hi!

I am using my own bitcoin node server. I get the following error while making load wallet with RPC.


Request body:

{"jsonrpc": "1.0", "id": "curltest", "method": "loadwallet", "params": ["/home/bitcoin/.bitcoin/<mywalletname>/backup.dat"]}


Response body:

{
    "result": null,
    "error": {
        "code": -4,
        "message": "Wallet file verification failed. Invalid -wallet path '/home/bitcoin/.bitcoin/<mywalletname>/backup.dat'. -wallet path should point to a directory where wallet.dat and database/log.HuhHuhHuh? files can be stored, a location where such a directory could be created, or (for backwards compatibility) the name of an existing data file in -walletdir (\"/home/bitcoin/.bitcoin\")"
    },
    "id": "curltest"
}

how can i bypass this error
1715690927
Hero Member
*
Offline Offline

Posts: 1715690927

View Profile Personal Message (Offline)

Ignore
1715690927
Reply with quote  #2

1715690927
Report to moderator
1715690927
Hero Member
*
Offline Offline

Posts: 1715690927

View Profile Personal Message (Offline)

Ignore
1715690927
Reply with quote  #2

1715690927
Report to moderator
1715690927
Hero Member
*
Offline Offline

Posts: 1715690927

View Profile Personal Message (Offline)

Ignore
1715690927
Reply with quote  #2

1715690927
Report to moderator
"There should not be any signed int. If you've found a signed int somewhere, please tell me (within the next 25 years please) and I'll change it to unsigned int." -- Satoshi
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715690927
Hero Member
*
Offline Offline

Posts: 1715690927

View Profile Personal Message (Offline)

Ignore
1715690927
Reply with quote  #2

1715690927
Report to moderator
1715690927
Hero Member
*
Offline Offline

Posts: 1715690927

View Profile Personal Message (Offline)

Ignore
1715690927
Reply with quote  #2

1715690927
Report to moderator
NeuroticFish
Legendary
*
Offline Offline

Activity: 3668
Merit: 6396


Looking for campaign manager? Contact icopress!


View Profile
September 07, 2022, 01:18:27 PM
 #2

how can i bypass this error

I didn't use this, but according to the error message you may have to have either

Code:
{"jsonrpc": "1.0", "id": "curltest", "method": "loadwallet", "params": ["/home/bitcoin/.bitcoin/<mywalletname>"]}

or

Code:
{"jsonrpc": "1.0", "id": "curltest", "method": "loadwallet", "params": ["backup.dat"]}


but certainly not the full path.
Of course, this may mean some adaptations in filenames or paths.


All the examples on the net seem to be loading wallet.dat without a path. Is it a problem for you to put into the datadir the wallet(s) you're planning to load?

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
nc50lc
Legendary
*
Offline Offline

Activity: 2408
Merit: 5604


Self-proclaimed Genius


View Profile
September 07, 2022, 01:22:37 PM
Merited by NeuroticFish (1), ABCbits (1)
 #3

how can i bypass this error
Either put 'backup.dat' inside .bitcoin/wallets dir or
Create a 'backup' folder inside .bitcoin/wallets dir, paste your 'backup.dat' file there and rename it into 'wallet.dat'.

Then load it using loadwallet backup.dat for the former or loadwallet backup for the latter.

█▀▀▀











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











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

Activity: 4
Merit: 0


View Profile
September 07, 2022, 01:53:25 PM
 #4

how can i bypass this error

but certainly not the full path.
Of course, this may mean some adaptations in filenames or paths.


All the examples on the net seem to be loading wallet.dat without a path. Is it a problem for you to put into the datadir the wallet(s) you're planning to load?

I get file validation error when directory name and folder path are correct

If I mistype the directory name I get another error because, Wallet file verification failed.

Response body: Wallet file verification failed. Failed to load database path '/lastwallet/hey.dat'. Path does not exist.
NeuroticFish
Legendary
*
Offline Offline

Activity: 3668
Merit: 6396


Looking for campaign manager? Contact icopress!


View Profile
September 07, 2022, 02:00:59 PM
 #5

Response body: Wallet file verification failed. Failed to load database path '/lastwallet/hey.dat'. Path does not exist.

The parameter has to be either a folder, either a filename (not a file path!). You've still put a path there, of course it's not working.
Maybe nc50lc's answer makes it clearer?

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
nliveanalytics (OP)
Newbie
*
Offline Offline

Activity: 4
Merit: 0


View Profile
September 07, 2022, 02:46:03 PM
 #6

Response body: Wallet file verification failed. Failed to load database path '/lastwallet/hey.dat'. Path does not exist.

The parameter has to be either a folder, either a filename (not a file path!). You've still put a path there, of course it's not working.
Maybe nc50lc's answer makes it clearer?

Sorry, same error.

I try with all kinds of link structures / I get an error whether I put it or not. I tried all link structures.
jackg
Copper Member
Legendary
*
Offline Offline

Activity: 2856
Merit: 3071


https://bit.ly/387FXHi lightning theory


View Profile
September 07, 2022, 03:04:10 PM
 #7

Can you check the permissions on the wallet file and post the here (ls -l in the parent directory where the wallet file is and then show us the first 10 characters that should look something like -rwxrw----) just in case it's that, you could also try doing that with the parent folder if you made it yourself to check bitcoin core has the rights to see files inside the folder.
nliveanalytics (OP)
Newbie
*
Offline Offline

Activity: 4
Merit: 0


View Profile
September 07, 2022, 04:00:36 PM
 #8

Can you check the permissions on the wallet file and post the here (ls -l in the parent directory where the wallet file is and then show us the first 10 characters that should look something like -rwxrw----) just in case it's that, you could also try doing that with the parent folder if you made it yourself to check bitcoin core has the rights to see files inside the folder.
Of course I'm sending right away

Wallet file ls -l:

total 1876
drwx------ 2 systemd-coredump systemd-coredump   4096 Sep  7 16:23 database
-rw------- 1 systemd-coredump systemd-coredump      0 Sep  7 14:55 db.log
-rw------- 1 systemd-coredump systemd-coredump 958464 Sep  7 15:50 hey.dat
-rw------- 1 systemd-coredump systemd-coredump 958464 Sep  7 17:56 wallet.dat


Parent bitcoin file ls -l:

drwx------ 2 systemd-coredump systemd-coredump     4096 Sep  7 14:07 ariswallet
-rw------- 1 systemd-coredump systemd-coredump       31 Sep  7 10:54 banlist.json
-rw------- 1 systemd-coredump systemd-coredump        2 Sep  7 13:33 bitcoind.pid
drwx------ 3 systemd-coredump systemd-coredump   184320 Sep  7 17:58 blocks
drwx------ 2 systemd-coredump systemd-coredump    90112 Sep  7 17:57 chainstate
-rw------- 1 systemd-coredump systemd-coredump 62182892 Sep  7 17:58 debug.log
-rw------- 1 systemd-coredump systemd-coredump   247985 Sep  7 13:32 fee_estimates.dat
drwx------ 3 systemd-coredump systemd-coredump     4096 Sep  7 15:50 lastwallet
-rw------- 1 systemd-coredump systemd-coredump       18 Sep  7 13:32 mempool.dat
drwx--x--x 2 systemd-coredump systemd-coredump     4096 Sep  7 13:33 nudewallet
-rw------- 1 systemd-coredump systemd-coredump   821890 Sep  7 17:48 peers.dat
-rw------- 1 systemd-coredump systemd-coredump       47 Sep  7 14:55 settings.json
drwx--x--x 2 systemd-coredump systemd-coredump     4096 Sep  7 13:33 testwallet
jackg
Copper Member
Legendary
*
Offline Offline

Activity: 2856
Merit: 3071


https://bit.ly/387FXHi lightning theory


View Profile
September 07, 2022, 08:36:18 PM
 #9

(I'm assuming testwallet is the first wallet you used and one that works with the rpc command, is it or does that still not work)?

drwx------ ariswallet
drwx------ lastwallet
drwx--x--x nudewallet
drwx--x--x testwallet

Why are these different, is there a reason for that?

Can you sudo chmod 711 them (according to a search engine that should be RWX--X--X you might want to confirm before doing it?

See if there's a difference between the subfiles of both of those directories too.

achow101
Moderator
Legendary
*
Offline Offline

Activity: 3388
Merit: 6641


Just writing some code


View Profile WWW
September 08, 2022, 01:08:38 AM
 #10

loadwallet takes the name of a wallet, which is the name of the directory within the wallets/ directory that contains the wallet.dat file.

You can use the restorewallet RPC to restore a wallet from a backup. This takes the name to give the restored wallet, and the path to the backup of a wallet.dat file. It will create the necessary directory structure, copy the backup to the correct location, and name everything correctly. The restored wallet will already be loaded, and can be loaded or unloaded in the future using the name that you gave it when doing the restore.

Note that this RPC is currently only available in version 23.0.

nc50lc
Legendary
*
Offline Offline

Activity: 2408
Merit: 5604


Self-proclaimed Genius


View Profile
September 08, 2022, 07:14:28 AM
 #11

Maybe nc50lc's answer makes it clearer?
Sorry, same error.

I try with all kinds of link structures / I get an error whether I put it or not. I tried all link structures.
Have you copied it to the correct directory that I've pointed-out in my reply?
Namely: .bitcoin/wallets ; either paste 'backup.dat' inside or create a 'backup' folder there, paste 'backup.dat' file inside it and rename it into 'wallet.dat'.

Because if you did, there shouldn't be any error when you used the said commands.

█▀▀▀











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











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
NotATether
Legendary
*
Online Online

Activity: 1596
Merit: 6744


bitcoincleanup.com / bitmixlist.org


View Profile WWW
September 08, 2022, 10:27:24 PM
 #12

I get file validation error when directory name and folder path are correct

If I mistype the directory name I get another error because, Wallet file verification failed.

Response body: Wallet file verification failed. Failed to load database path '/lastwallet/hey.dat'. Path does not exist.

Last time I checked, the wallet file needs to have a very specific name (wallet.dat), it's the folder name that indicates the name of your wallet, and as such, only the folder name should be included in a loadwallet call, without any path.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
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!