Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] farmer-only connect to incorrect full node host #16164

Closed
wiryonolau opened this issue Aug 25, 2023 · 3 comments · Fixed by #16387
Closed

[Bug] farmer-only connect to incorrect full node host #16164

wiryonolau opened this issue Aug 25, 2023 · 3 comments · Fixed by #16387
Assignees
Labels
bug Something isn't working

Comments

@wiryonolau
Copy link

wiryonolau commented Aug 25, 2023

What happened?

Hi on 2.0.0 when calling chia farm summary, it connect to incorrect host.

My setup is

harvester machine ---> farmer-only vps (docker) ----> full_node vps (docker)

Using config from https://github.com/Chia-Network/chia-blockchain/blob/main/chia/util/initial-config.yaml

I set the farmer.full_node_peer to full_node vps ip, the rest of host is to 127.0.0.1 ("localhost" doesn't work inside docker), but somehow it still call 127.0.0.1 instead of full_node vps ip.

Also while Farmer produce correct log, but in pool it's not detecting the space ( reduce to 0 )

Log according to wiki , currently the last one does not appear in the log

[time stamp] farmer farmer_server   : DEBUG   -> new_signage_point_harvester to peer [harvester IP address] [peer id - 64 char hexadecimal]
[time stamp] farmer farmer_server   : DEBUG   <- farming_info from peer [peer id - 64 char hexadecimal] [harvester IP address]
[time stamp] farmer farmer_server   : DEBUG   <- new_proof_of_space from peer [peer id - 64 char hexadecimal] [harvester IP address]

been using this setup since 1.6

All chia version already bump to 2.0.0
node is full synced

Network: mainnet    Port: 8444   RPC Port: 8555
Node ID: XXX
Genesis Challenge: XXX
Current Blockchain Status: Full Node Synced

Peak: Hash: 12bf79ecf46def4e451601362e8bd0ae1f1fa568c10396c3ae3deafeb96572c7
      Time: Fri Aug 25 2023 16:53:08 UTC                  Height:    4137661

Estimated network space: 27.576 EiB
Current difficulty: 2544
Current VDF sub_slot_iters: XXX

  Height: |   Hash:
  4137661 | 12bf79ecf46def4e451601362e8bd0ae1f1fa568c10396c3ae3deafeb96572c7
  4137660 | a77c82b0f3a4f0ff38c84b3fe5d2e362a2b5dbbcde908967f7d2b6c5e6bae912
  4137659 | 11c9d54474e4fbb3027095b66b106c731bb5d558acd1771ded0a50afc4745c39
  4137658 | 45fd001416af7bf435d0e6c6d7b27bdde35c7f639c5051fb76659129112c77d5
  4137657 | 02a09cc61390923efd6e7c04676949aa5b4f04fe8e2437096f91df78c1b9a769
  4137656 | 87275fda25331adec1013b56a49b0f85de22e128b4db2f6cdbfbf355219cb39d
  4137655 | 153c07b6064bbc4f3d2e3ae105528b98d6b1e500592b74695cd00f90bd912f08
  4137654 | 0bbbb60804f7545df58379d3cbef8862a9f82c7ef9cf90650f634df9e4a08e73
  4137653 | be53927fb9b97c54643860fdb065097ce83d83525aadade2e4769cbe75a4ed19
  4137652 | 3f629552e56732018d9ec7a0aa0f2614dd4460963ed42f60c2189d1be98e788b

plot are normal k32 plot, no compression. Any tweak require for harvester ?

Version

2.0.0

What platform are you using?

Linux

What ui mode are you using?

CLI

Relevant log output

Error: Connection error: ClientConnectorError: Cannot connect to host 127.0.0.1:8555 ssl:<ssl.SSLContext object at 0x7f6a078b8340> [Connect call failed ('127.0.0.1', 8555)]
Check if full node rpc is running at 8555
This is normal if full node is still starting up
@wiryonolau wiryonolau added the bug Something isn't working label Aug 25, 2023
@wiryonolau wiryonolau changed the title [Bug] farmer connect to incorrect full node host [Bug] farmer-only connect to incorrect full node host Aug 26, 2023
@BrandtH22
Copy link
Contributor

When updating to 2.0.0 did you have a new config created for each device and also run the chia init [directory] command on each harvester?

More info: https://github.com/Chia-Network/chia-blockchain/wiki/Farming-on-many-machines#setup-steps

@wiryonolau
Copy link
Author

When updating to 2.0.0 did you have a new config created for each device and also run the chia init [directory] command on each harvester?

More info: https://github.com/Chia-Network/chia-blockchain/wiki/Farming-on-many-machines#setup-steps

I stop the service remove all the previous config and use the config-init.yml from the source code for farmer-only and full node service.
Then I update the value I use from previous config ( log related and farmer.full_node_peer ) and restart.

From the error it's looks like the farmer not connecting to the correct full node.
I didn't update the harvester config, it looks the same for harvester.

I will need to test on specific pc, is there a public full node available for testing ?

@emlowe
Copy link
Contributor

emlowe commented Aug 30, 2023

This is basically a duplicate of #9615

The behavior is slightly worse now, but the basic issue is the same. Closing as duplicate.

@emlowe emlowe closed this as completed Aug 30, 2023
xearl4 added a commit to xchdata/chia-blockchain that referenced this issue Sep 21, 2023
Before 2.0, even if no local full node was present, `chia farm summary`
would still show useful information:

	$ chia farm summary
	Farming status: Not available
	Local Harvester
	   1 plots of size: 101.320 GiB on-disk, 101.400 GiBe (effective)
	Plot count for all harvesters: 1
	Total size of plots: 101.320 GiB, 101.400 GiBe (effective)
	Estimated network space: Unknown
	Expected time to win: Unknown
	For details on farmed rewards and fees you should run 'chia start wallet' and 'chia wallet show'

However, since 2.0, that is no longer the case. `chia farm summary`
simply aborts with an exception:

	$ chia farm summary
	Error: Connection error: ClientConnectorError: Cannot connect to host localhost:8555 ssl:<ssl.SSLContext object at 0x7fe0edd533c0> [Connect call failed ('127.0.0.1', 8555)]
	Check if full node rpc is running at 8555
	This is normal if full node is still starting up

This fixes this particular regression which is rather annoying for
farmers farming to a remote node.

Fixes Chia-Network#16164. Related to issue Chia-Network#9615, but that issue is wider in scope.
xearl4 added a commit to xchdata/chia-blockchain that referenced this issue Sep 21, 2023
Before 2.0, even if no local full node was present, `chia farm summary`
would still show useful information:

	$ chia farm summary
	Farming status: Not available
	Local Harvester
	   1 plots of size: 101.320 GiB on-disk, 101.400 GiBe (effective)
	Plot count for all harvesters: 1
	Total size of plots: 101.320 GiB, 101.400 GiBe (effective)
	Estimated network space: Unknown
	Expected time to win: Unknown
	For details on farmed rewards and fees you should run 'chia start wallet' and 'chia wallet show'

However, since 2.0, that is no longer the case. `chia farm summary`
simply aborts with an exception:

	$ chia farm summary
	Error: Connection error: ClientConnectorError: Cannot connect to host localhost:8555 ssl:<ssl.SSLContext object at 0x7fe0edd533c0> [Connect call failed ('127.0.0.1', 8555)]
	Check if full node rpc is running at 8555
	This is normal if full node is still starting up

This fixes this particular regression which is rather annoying for
farmers farming to a remote node.

Fixes Chia-Network#16164. Related to issue Chia-Network#9615, but that issue is wider in scope.
xearl4 added a commit to xchdata/chia-blockchain that referenced this issue Sep 22, 2023
Before 2.0, even if no local full node was present, `chia farm summary`
would still show useful information:

	$ chia farm summary
	Farming status: Not available
	Local Harvester
	   1 plots of size: 101.320 GiB on-disk, 101.400 GiBe (effective)
	Plot count for all harvesters: 1
	Total size of plots: 101.320 GiB, 101.400 GiBe (effective)
	Estimated network space: Unknown
	Expected time to win: Unknown
	For details on farmed rewards and fees you should run 'chia start wallet' and 'chia wallet show'

However, since 2.0, that is no longer the case. `chia farm summary`
simply aborts with an exception:

	$ chia farm summary
	Error: Connection error: ClientConnectorError: Cannot connect to host localhost:8555 ssl:<ssl.SSLContext object at 0x7fe0edd533c0> [Connect call failed ('127.0.0.1', 8555)]
	Check if full node rpc is running at 8555
	This is normal if full node is still starting up

This fixes this particular regression which is rather annoying for
farmers farming to a remote node.

Fixes Chia-Network#16164. Related to issue Chia-Network#9615, but that issue is wider in scope.
xearl4 added a commit to xchdata/chia-blockchain that referenced this issue Sep 22, 2023
Before 2.0, even if no local full node was present, `chia farm summary`
would still show useful information:

	$ chia farm summary
	Farming status: Not available
	Local Harvester
	   1 plots of size: 101.320 GiB on-disk, 101.400 GiBe (effective)
	Plot count for all harvesters: 1
	Total size of plots: 101.320 GiB, 101.400 GiBe (effective)
	Estimated network space: Unknown
	Expected time to win: Unknown
	For details on farmed rewards and fees you should run 'chia start wallet' and 'chia wallet show'

However, since 2.0, that is no longer the case. `chia farm summary`
simply aborts with an exception:

	$ chia farm summary
	Error: Connection error: ClientConnectorError: Cannot connect to host localhost:8555 ssl:<ssl.SSLContext object at 0x7fe0edd533c0> [Connect call failed ('127.0.0.1', 8555)]
	Check if full node rpc is running at 8555
	This is normal if full node is still starting up

This fixes this particular regression which is rather annoying for
farmers farming to a remote node.

Fixes Chia-Network#16164. Related to issue Chia-Network#9615, but that issue is wider in scope.
xearl4 added a commit to xchdata/chia-blockchain that referenced this issue Sep 22, 2023
Before 2.0, even if no local full node was present, `chia farm summary`
would still show useful information:

	$ chia farm summary
	Farming status: Not available
	Local Harvester
	   1 plots of size: 101.320 GiB on-disk, 101.400 GiBe (effective)
	Plot count for all harvesters: 1
	Total size of plots: 101.320 GiB, 101.400 GiBe (effective)
	Estimated network space: Unknown
	Expected time to win: Unknown
	For details on farmed rewards and fees you should run 'chia start wallet' and 'chia wallet show'

However, since 2.0, that is no longer the case. `chia farm summary`
simply aborts with an exception:

	$ chia farm summary
	Error: Connection error: ClientConnectorError: Cannot connect to host localhost:8555 ssl:<ssl.SSLContext object at 0x7fe0edd533c0> [Connect call failed ('127.0.0.1', 8555)]
	Check if full node rpc is running at 8555
	This is normal if full node is still starting up

This fixes this particular regression which is rather annoying for
farmers farming to a remote node.

Fixes Chia-Network#16164. Related to issue Chia-Network#9615, but that issue is wider in scope.
xearl4 added a commit to xchdata/chia-blockchain that referenced this issue Sep 23, 2023
Before 2.0, even if no local full node was present, `chia farm summary`
would still show useful information:

	$ chia farm summary
	Farming status: Not available
	Local Harvester
	   1 plots of size: 101.320 GiB on-disk, 101.400 GiBe (effective)
	Plot count for all harvesters: 1
	Total size of plots: 101.320 GiB, 101.400 GiBe (effective)
	Estimated network space: Unknown
	Expected time to win: Unknown
	For details on farmed rewards and fees you should run 'chia start wallet' and 'chia wallet show'

However, since 2.0, that is no longer the case. `chia farm summary`
simply aborts with an exception:

	$ chia farm summary
	Error: Connection error: ClientConnectorError: Cannot connect to host localhost:8555 ssl:<ssl.SSLContext object at 0x7fe0edd533c0> [Connect call failed ('127.0.0.1', 8555)]
	Check if full node rpc is running at 8555
	This is normal if full node is still starting up

This fixes this particular regression which is rather annoying for
farmers farming to a remote node.

Fixes Chia-Network#16164. Related to issue Chia-Network#9615, but that issue is wider in scope.
wallentx pushed a commit that referenced this issue Sep 25, 2023
…16387)

* Fix `chia farm summary` aborting early if no local full node present

Before 2.0, even if no local full node was present, `chia farm summary`
would still show useful information:

	$ chia farm summary
	Farming status: Not available
	Local Harvester
	   1 plots of size: 101.320 GiB on-disk, 101.400 GiBe (effective)
	Plot count for all harvesters: 1
	Total size of plots: 101.320 GiB, 101.400 GiBe (effective)
	Estimated network space: Unknown
	Expected time to win: Unknown
	For details on farmed rewards and fees you should run 'chia start wallet' and 'chia wallet show'

However, since 2.0, that is no longer the case. `chia farm summary`
simply aborts with an exception:

	$ chia farm summary
	Error: Connection error: ClientConnectorError: Cannot connect to host localhost:8555 ssl:<ssl.SSLContext object at 0x7fe0edd533c0> [Connect call failed ('127.0.0.1', 8555)]
	Check if full node rpc is running at 8555
	This is normal if full node is still starting up

This fixes this particular regression which is rather annoying for
farmers farming to a remote node.

Fixes #16164. Related to issue #9615, but that issue is wider in scope.

* Improve exception reporting for `chia farm summary`

With this change, only the exceptions when failing to connect to a local
full node and/or wallet are suppressed, as these cases are already
properly handled by adjusted command output. Any other exception is
printed to stderr.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants