question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] - Chia not syncing or updating files

See original GitHub issue

Chia is not syncing or updating files after moving mainnet folder to another drive and creating symbolic link or junction back to c:\users\x.chia

To Reproduce

Steps to reproduce the behavior:

I was running out of space on my C: drive, so I moved both my .chia and .flax folders to another drive and created symbolic links for each back to the original folders.

After doing this, Flax still works fine. I updated Chia to the latest version and when I ran it, it was just stuck on “Connecting” and the log showed a lot of “Cannot connect to host 127.0.0.1:8444 ssl:<ssl.SSLContext object at 0x0000023AF6FA8CC0> [The remote computer refused the network connection]” errors.

I shutdown Chia and renamed the wallet folder to wallet.bak, deleted the Symbolic Link and created a Junction instead, edited the config. yaml to set “enable_upnp: false” (I thought I’d already done that, as I created a manual port forward on my router ages ago). After this it didn’t get stuck on “Connecting” but on the Full Node screen it was only showing the two 127.0.0.1 connections and the screen was just flickering at the bottom for some time. Currently it shows about 12 Full Nodes with Heights in the 856,7xxx range but my Peak Height isn’t changing from 856,515.

The errors I’m seeing now are:

“full_node full_node_server : INFO Cannot connect to host 157.61.158.68:8444 ssl:<ssl.SSLContext object at 0x000001F5938351C0> [The semaphore timeout period has expired]”

and

“wallet chia.wallet.wallet_node : ERROR Loop exception in sync Was not able to add blocks 0-32. Traceback (most recent call last):”

I’ve pasted an extract from the log at the end of this post.

It’s currently 07:32 and looking at the files, the wallet -shm and -wal files last updated at 07:08 and the .sqlite file at 07:01. With the blockchain files the -shm file last updated at 07:08, the -wal file at 07:31 and the .sqlite file at 06:10 and the times are about the same for the peer_table files. 07:08 was when I restarted Chia.

I wondered if the files might be somehow keyed to the original folder such that Chia can’t access them if they’re moved but that wouldn’t explain why it’s unable to update the new files that it created in the new wallet folder after I renamed the original one to wallet.bak.

I’ve just shutdown and restarted Chia and again the log is showing loads of: “2021-09-14T07:44:21.646 wallet wallet : INFO Reconnecting to peer {‘host’: ‘127.0.0.1’, ‘port’: 8444} 2021-09-14T07:44:23.655 wallet wallet_server : INFO Cannot connect to host 127.0.0.1:8444 ssl:<ssl.SSLContext object at 0x000002A2FA1DE3C0> [The remote computer refused the network connection] 2021-09-14T07:44:24.471 farmer farmer : INFO Reconnecting to peer {‘host’: ‘127.0.0.1’, ‘port’: 8444} 2021-09-14T07:44:26.482 farmer farmer_server : INFO Cannot connect to host 127.0.0.1:8444 ssl:<ssl.SSLContext object at 0x000001E50EF67340> [The remote computer refused the network connection] 2021-09-14T07:44:26.656 wallet wallet : INFO Reconnecting to peer {‘host’: ‘127.0.0.1’, ‘port’: 8444}”

and the Full Node screen is just full of spinning circles.

Expected behavior Blockchain, blockchain_wallet and wallet_peers files should update

Screenshots

Desktop

  • OS: Windows 10
  • OS Version/Flavor:
  • CPU: i5 4670k

Additional context

2021-09-14T07:23:09.293 wallet chia.wallet.wallet_node    : INFO     Loop end in sync job
2021-09-14T07:23:09.294 wallet chia.wallet.wallet_node    : INFO     Loop start in sync job
2021-09-14T07:23:09.422 wallet wallet                     : INFO     Reconnecting to peer {'host': '127.0.0.1', 'port': 8444}
2021-09-14T07:23:09.429 wallet wallet_server              : INFO     Connected with full_node {'host': '127.0.0.1', 'port': 8444}
2021-09-14T07:23:11.328 wallet chia.full_node.weight_proof: INFO     validating 2230 sub epochs
2021-09-14T07:23:11.329 wallet chia.wallet.wallet_node    : INFO     Validated, fork point is 0
2021-09-14T07:23:11.330 wallet chia.wallet.wallet_node    : INFO     self.sync_event.set()
2021-09-14T07:23:11.345 wallet chia.wallet.wallet_node    : INFO     Have collected 1 potential peaks
2021-09-14T07:23:11.346 wallet chia.wallet.wallet_node    : INFO     Requesting blocks 0-32
2021-09-14T07:23:57.060 full_node full_node_server        : INFO     Cannot connect to host 157.61.158.68:8444 ssl:<ssl.SSLContext object at 0x000001F5938351C0> [The semaphore timeout period has expired]
2021-09-14T07:24:11.351 full_node full_node_server        : INFO     Connection closed: 127.0.0.1, node id: ea790e8086f728f3d768f02af5e9961754834e3665b085fe702fe794523c1310
2021-09-14T07:24:11.357 full_node chia.full_node.full_node: INFO     peer disconnected {'host': '127.0.0.1', 'port': 8449}
2021-09-14T07:24:11.351 wallet wallet_server              : INFO     Connection closed: 127.0.0.1, node id: db0a744a52a2de26567ad5fca0cdc89e5974dd2c750b2426e9e9d4928d05e788
2021-09-14T07:24:12.357 wallet chia.wallet.wallet_node    : ERROR    Error while trying to fetch from peer:Peer returned no response Traceback (most recent call last):
  File "chia\wallet\wallet_node.py", line 555, in batch_sync_to_peak
  File "chia\wallet\wallet_node.py", line 687, in fetch_blocks_and_validate
ValueError: Peer returned no response

2021-09-14T07:24:12.358 wallet chia.wallet.wallet_node    : ERROR    Loop exception in sync Was not able to add blocks 0-32. Traceback (most recent call last):
  File "chia\wallet\wallet_node.py", line 608, in sync_job
  File "chia\wallet\wallet_node.py", line 668, in _sync
  File "chia\wallet\wallet_node.py", line 565, in batch_sync_to_peak
RuntimeError: Was not able to add blocks 0-32

2021-09-14T07:24:12.358 wallet chia.wallet.wallet_node    : INFO     Loop end in sync job
2021-09-14T07:24:12.359 wallet chia.wallet.wallet_node    : INFO     Loop start in sync job
2021-09-14T07:24:12.427 wallet wallet                     : INFO     Reconnecting to peer {'host': '127.0.0.1', 'port': 8444}
2021-09-14T07:24:12.434 wallet wallet_server              : INFO     Connected with full_node {'host': '127.0.0.1', 'port': 8444}
2021-09-14T07:24:14.443 wallet chia.full_node.weight_proof: INFO     validating 2230 sub epochs
2021-09-14T07:24:14.445 wallet chia.wallet.wallet_node    : INFO     Validated, fork point is 0
2021-09-14T07:24:14.446 wallet chia.wallet.wallet_node    : INFO     self.sync_event.set()
2021-09-14T07:24:14.460 wallet chia.wallet.wallet_node    : INFO     Have collected 1 potential peaks
2021-09-14T07:24:14.461 wallet chia.wallet.wallet_node    : INFO     Requesting blocks 0-32
2021-09-14T07:25:00.747 harvester chia.harvester.harvester: INFO     refresh_batch: loaded_plots 0, loaded_size 0.00 TiB, removed_plots 0, processed_plots 0, remaining_plots 0, duration: 0.19 seconds
2021-09-14T07:25:14.465 full_node full_node_server        : INFO     Connection closed: 127.0.0.1, node id: ea790e8086f728f3d768f02af5e9961754834e3665b085fe702fe794523c1310
2021-09-14T07:25:14.467 full_node chia.full_node.full_node: INFO     peer disconnected {'host': '127.0.0.1', 'port': 8449}
2021-09-14T07:25:14.465 wallet wallet_server              : INFO     Connection closed: 127.0.0.1, node id: db0a744a52a2de26567ad5fca0cdc89e5974dd2c750b2426e9e9d4928d05e788
2021-09-14T07:25:15.468 wallet chia.wallet.wallet_node    : ERROR    Error while trying to fetch from peer:Peer returned no response Traceback (most recent call last):
  File "chia\wallet\wallet_node.py", line 555, in batch_sync_to_peak
  File "chia\wallet\wallet_node.py", line 687, in fetch_blocks_and_validate
ValueError: Peer returned no response

2021-09-14T07:25:15.469 wallet chia.wallet.wallet_node    : ERROR    Loop exception in sync Was not able to add blocks 0-32. Traceback (most recent call last):
  File "chia\wallet\wallet_node.py", line 608, in sync_job
  File "chia\wallet\wallet_node.py", line 668, in _sync
  File "chia\wallet\wallet_node.py", line 565, in batch_sync_to_peak
RuntimeError: Was not able to add blocks 0-32

2021-09-14T07:25:15.470 wallet chia.wallet.wallet_node    : INFO     Loop end in sync job
2021-09-14T07:25:15.470 wallet chia.wallet.wallet_node    : INFO     Loop start in sync job
2021-09-14T07:25:15.472 wallet wallet                     : INFO     Reconnecting to peer {'host': '127.0.0.1', 'port': 8444}
2021-09-14T07:25:15.480 wallet wallet_server              : INFO     Connected with full_node {'host': '127.0.0.1', 'port': 8444}
2021-09-14T07:25:17.362 wallet chia.full_node.weight_proof: INFO     validating 2230 sub epochs
2021-09-14T07:25:17.363 wallet chia.wallet.wallet_node    : INFO     Validated, fork point is 0
2021-09-14T07:25:17.364 wallet chia.wallet.wallet_node    : INFO     self.sync_event.set()
2021-09-14T07:25:17.379 wallet chia.wallet.wallet_node    : INFO     Have collected 1 potential peaks
2021-09-14T07:25:17.380 wallet chia.wallet.wallet_node    : INFO     Requesting blocks 0-32
2021-09-14T07:25:50.010 full_node full_node_server        : INFO     Connection closed: 18.141.213.41, node id: fd6fec809bc4c3dfef02412ca96fc1c5cac007179ffe937ecc60cf34b07eda0f
2021-09-14T07:25:50.011 full_node chia.full_node.full_node: INFO     peer disconnected {'host': '18.141.213.41', 'port': 8444}
2021-09-14T07:26:17.380 full_node full_node_server        : INFO     Connection closed: 127.0.0.1, node id: ea790e8086f728f3d768f02af5e9961754834e3665b085fe702fe794523c1310
2021-09-14T07:26:17.382 full_node chia.full_node.full_node: INFO     peer disconnected {'host': '127.0.0.1', 'port': 8449}
2021-09-14T07:26:17.380 wallet wallet_server              : INFO     Connection closed: 127.0.0.1, node id: db0a744a52a2de26567ad5fca0cdc89e5974dd2c750b2426e9e9d4928d05e788
2021-09-14T07:26:18.383 wallet chia.wallet.wallet_node    : ERROR    Error while trying to fetch from peer:Peer returned no response Traceback (most recent call last):
  File "chia\wallet\wallet_node.py", line 555, in batch_sync_to_peak
  File "chia\wallet\wallet_node.py", line 687, in fetch_blocks_and_validate
ValueError: Peer returned no response

2021-09-14T07:26:18.384 wallet chia.wallet.wallet_node    : ERROR    Loop exception in sync Was not able to add blocks 0-32. Traceback (most recent call last):
  File "chia\wallet\wallet_node.py", line 608, in sync_job
  File "chia\wallet\wallet_node.py", line 668, in _sync
  File "chia\wallet\wallet_node.py", line 565, in batch_sync_to_peak
RuntimeError: Was not able to add blocks 0-32

2021-09-14T07:26:18.385 wallet chia.wallet.wallet_node    : INFO     Loop end in sync job
2021-09-14T07:26:18.386 wallet chia.wallet.wallet_node    : INFO     Loop start in sync job
2021-09-14T07:26:18.482 wallet wallet                     : INFO     Reconnecting to peer {'host': '127.0.0.1', 'port': 8444}
2021-09-14T07:26:18.490 wallet wallet_server              : INFO     Connected with full_node {'host': '127.0.0.1', 'port': 8444}
2021-09-14T07:26:20.527 wallet chia.full_node.weight_proof: INFO     validating 2230 sub epochs
2021-09-14T07:26:20.529 wallet chia.wallet.wallet_node    : INFO     Validated, fork point is 0
2021-09-14T07:26:20.530 wallet chia.wallet.wallet_node    : INFO     self.sync_event.set()
2021-09-14T07:26:20.546 wallet chia.wallet.wallet_node    : INFO     Have collected 1 potential peaks
2021-09-14T07:26:20.547 wallet chia.wallet.wallet_node    : INFO     Requesting blocks 0-32

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
emlowecommented, Sep 16, 2021

You can set CHIA_ROOT environment variable to set the directory anywhere you want. You can also edit config.yaml and change the location of the DB files. Closing issue at this time.

0reactions
dovemancommented, Oct 21, 2021

Running from the CLI with start farmer no-wallet and the localhost error only appears a few times at the start. It then throws up some other errors and takes a while but eventually it starts farming.

https://pastebin.com/UnkJ7aeY

Read more comments on GitHub >

github_iconTop Results From Across the Web

Is Not Synced means that syncing is stopped? - Chia Forum
my understanding from my experiences. not synced means ur .db files are… not syncing… frozen. stuck. not growing larger. not synced can happen ......
Read more >
Chia Not Syncing How To Fix - YouTube
If you have been trying to mine chia coin you will know at some point about the sync issues that they have with...
Read more >
Chia Coin 'Not Synced' Issues and How to Fix Them - YouTube
In this video, I'll highlight a few common issues when it comes to ' not synced ' issue in Chia Network GUI. This...
Read more >
Wallet not syncing. Troubleshoot? : r/chia - Reddit
Ever since updating to 1.2.4, my wallet has no longer been syncing despite my node syncing fine. I've checked in both the GUI...
Read more >
Syncing Problems on Windows - The Chia Farmer
Windows Firewall – Make sure that the chia client is allowed through the firewall. A no brainer, but doesn't hurt to check. ·...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found