I can't move .chia folder to another disk: Cannot connect to host 127.0.0.1:8444

If my DB isn’t in C:\ this happend

Ok, I’ll try this:

database_path: db/blockchain_v1_CHALLENGE.sqlite
peer_db_path: D:/.chia/mainnet/db/peer_table_node.sqlite

Connected! but blockchain database still in the C: drive.

I see in the config file that:

database_path: db/blockchain_v1_CHALLENGE.sqlite

But then the file it’s named:

blockchain_v1_mainnet.sqlite

Perhaps the problem it’s on CHALLENGE?

Thanks to all for your help.

The peer db is kind of irrelevant, and actually I don’t know how chia behaves if it is messed up. Maybe it ignores it. However, the important thing is whether you see those two related shm/wal files on d: drive. If they are there, it implies that your change is working and you can try to do the same thing to the blockchain file.

By the way, the chia UI is just garbage, as it doesn’t really provide any useful feedback in case of errors. You really need to start looking at log files.

No worry about that CHALLENGE thing. It is just a template that chia uses internally, so don’t modify / touch it.

I have changed it to test but nothing, every time I move the blockchain database to any other place than its original, the GUI can not connect.

And what the logs say?
Did you see those *shm / *wal for peer db on your d: drive?

Yes, files are there. Before to open GUI:

before

After:

after

Errors:

2022-02-22T19:20:06.290 farmer farmer : INFO Reconnecting to peer {‘host’: ‘127.0.0.1’, ‘port’: 8444}
2022-02-22T19:20:08.314 farmer farmer_server : INFO Cannot connect to host 127.0.0.1:8444 ssl:<ssl.SSLContext object at 0x000001EFF6C02740> [El equipo remoto rechazó la conexión de red]

Then we know that your change to blockchain peers db worked!, and config.yaml didn’t have errors with respect to that line. It would be helpful, if you also did the same screenshots, but from your c: drive. This would confirm that peers db is not touched on the c: drive, but it would also let us know, whether the db on c: drive is being opened or not.

After that change, did you change the blockchain line as well? and restart chia?

Also, post your relevant config.yaml section (that shows both blockchain and blockchain peers lines).

My config file now:

database_path: D:/.chia/mainnet/db/blockchain_v1_mainnet.sqlite
peer_db_path: D:/.chia/mainnet/db/peer_table_node.sqlite

Any file it’s created on C:

Captura

Latest errors are the same:

2022-02-22T20:05:47.528 farmer farmer_server : INFO Cannot connect to host 127.0.0.1:8444 ssl:<ssl.SSLContext object at 0x000001890AEBF0C0> [El equipo remoto rechazó la conexión de red]
2022-02-22T20:05:50.532 farmer farmer : INFO Reconnecting to peer {‘host’: ‘127.0.0.1’, ‘port’: 8444}
2022-02-22T20:05:52.583 farmer farmer_server : INFO Cannot connect to host 127.0.0.1:8444 ssl:<ssl.SSLContext object at 0x000001890AEBF140> [El equipo remoto rechazó la conexión de red]
2022-02-22T20:05:55.589 farmer farmer : INFO Reconnecting to peer {‘host’: ‘127.0.0.1’, ‘port’: 8444}
2022-02-22T20:05:57.643 farmer farmer_server : INFO Cannot connect to host 127.0.0.1:8444 ssl:<ssl.SSLContext object at 0x000001890AEBF1C0> [El equipo remoto rechazó la conexión de red]
2022-02-22T20:06:00.647 farmer farmer : INFO Reconnecting to peer {‘host’: ‘127.0.0.1’, ‘port’: 8444}
2022-02-22T20:06:02.703 farmer farmer_server : INFO Cannot connect to host 127.0.0.1:8444 ssl:<ssl.SSLContext object at 0x000001890AEBFEC0> [El equipo remoto rechazó la conexión de red]
2022-02-22T20:06:05.711 farmer farmer : INFO Reconnecting to peer {‘host’: ‘127.0.0.1’, ‘port’: 8444}

If your config specifies that your files are on d: drive, but those *shm / *wal files are created on c: drive, that would imply that chia is using a different config file.

As you have also created a junction pointing to d: drive. Maybe chia is using config.yaml from d: drive, although that config most likely have relative paths, as such should point to d; drive?

Try to rename those two config.yaml files and restart chia. Once you get it started, stop it, and check where the new config.yaml was created. This will be the file that needs modification.

Ok, config file deleted.

Chia GUI start, then I close it. I change values to the secondary disk. Now, any symlink it’s active:

database_path: D:/.chia/db/blockchain_v1_CHALLENGE.sqlite
peer_db_path: D:/.chia/db/peer_table_node.sqlite

Start GUI again and the files are created BUT it can’t connect: Not connected

You mean those *wal / *shm for both peers and blockchain db on d: drive?

Assuming that this is the case, we know that changes are being picked up and recognized.

You will need to do the same changes to wallet files:

wallet:
  database_path: D:/.chia/wallet/db/blockchain_wallet_v1_CHALLENGE_KEY.sqlite
  wallet_peers_path: D:/.chia/wallet/db/wallet_peers.sqlite

Make sure that there are no duplicates of those lines in the wallet block, as the last one (I think) will be used.

  1. shut down chia
  2. remove/rename debug.log
  3. open two explorers
    3.1. first over c:.…\mainnet\wallet\db folder
    3.2.second over d:.…\wallet\db folder
  4. start chia
  5. which folder the new *wal / *shm files for wallet dbs are created?
1 Like

It’s running now but I don’t know why. blockchain database it’s on d: and wallet it’s on c:

I’m going to let it sync and see if that’s the end of that. Thank you all for your help! I hope chia improves his installation process, at less it could ask where to install, simply like that.

2 Likes

Did you move the entire .chia folder or just the database?

I run my db from a different drive and it works fine after I changed the path in the config file.
But, the rest of the .chia folder is still in the same place on C drive though
All I did was:

  • Close Chia
  • move db file to new location
  • change the path in the config file (full node: database_path: R:/chia_db/blockchain_v1_CHALLENGE.sqlite)
  • start chia again

Perhaps the problem it’s on CHALLENGE?

Mine has this as well, while the filename of the database has “mainnet”

1 Like

“CHALLENGE” is just a template for the code to be replaced with what is behind “selected_network: mainnet” entry in the full_node section. So, don’t touch it, as it will screw everything up.

It is bad design, but it is what it is.

CLARIFICATION
As blockchain db is only one per installation, the replacement is just for that value specified above.

However, for wallet db the replacement is “wallet: selected_network” + “_” + “FINGERPRINT” The reason is that one installation may have many wallets.

I finally found a solution for my problem.

In some mysterious way, the configuration file is linked to the location of the blockchain database. It doesn’t matter if I change the folder in it and save the changes, they don’t apply.

But, if I delete the config file, start the GUI to create it again, stop it and change the path to the destination I want, then it magically works!

Maybe there is some rational explanation? anyway, thank you all again for the help, I’ll leave it here in case it helps someone else in the future.

1 Like