Chia-Network / chia-blockchain

Chia blockchain python implementation (full node, farmer, harvester, timelord, and wallet)
Apache License 2.0
10.82k stars 2.03k forks source link

[BUG]Exception from 'wallet' Unclosed client session & Unclosed connector #7210

Closed changpeng75 closed 3 years ago

changpeng75 commented 3 years ago

Describe the bug when execute "chia plotnft show" system return follow

(venv) [root@localhost chia-blockchain]# chia plotnft show Wallet height: 542246 Sync status: Synced Wallet id 2: Current state: FARMING_TO_POOL Current state from block height: 524314 Launcher ID: xxx Target address (not for plotting): xxx Owner public key: xxx P2 singleton address (pool contract address for plotting): xxx Current pool URL: https://pool.xchpool.org Relative lock height: 100 blocks Exception from 'wallet' Unclosed client session client_session: <aiohttp.client.ClientSession object at 0x7f068788e280> Unclosed connector connections: ['[(<aiohttp.client_proto.ResponseHandler object at 0x7f0686dedbe0>, 11769.101785711)]'] connector: <aiohttp.connector.TCPConnector object at 0x7f068788e640>

node & wallet synced and no error in log file.

To Reproduce

Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior

Screenshots

Desktop

Additional context

changpeng75 commented 3 years ago

what is Unclosed client session & Unclosed connector?

hebe123 commented 3 years ago

Same problem here. It occurred after I've deleted the wallet files (explained in here in step 1) and copied them over from a newer version. Did you do the same?

marklysze commented 3 years ago

I've got the same issue with mine. As mentioned by @hebe123, I deleted the wallet files in my docker setup and copied them over from a newer version.

Node is fully synced, wallet is synced. "chia wallet show" shows the two wallets (1: STANDARD_WALLET, 2: POOLING_WALLET)

dailymoose commented 3 years ago

I'm having the same error. I also created the NFT on another computer (Windows) and copied the DB files over to another computer (Ubuntu).

changpeng75 commented 3 years ago

Use same wallet file on windows 10 can return correct result. Show Current difficulty,Points balance and Payout instructions to me.

marklysze commented 3 years ago

Use same wallet file on windows 10 can return correct result. Show Current difficulty,Points balance and Payout instructions to me.

Are you saying that if you run "chia plotnft show" on Windows it works? Or are you saying you copied the Windows 10 file to Linux and it worked?

kahn2k commented 3 years ago
Screenshot 2021-07-09 at 10 02 59 AM

Having the same issue, and my plots are not reporting partial proofs with the pool. I'm not sure if having 2 pool wallets is the reason for the error

changpeng75 commented 3 years ago

Use same wallet file on windows 10 can return correct result. Show Current difficulty,Points balance and Payout instructions to me.

Are you saying that if you run "chia plotnft show" on Windows it works? Or are you saying you copied the Windows 10 file to Linux and it worked?

Use same wallet file on windows can work correct. Actually,I copy the wallet file from windows to centos 7,so I get xception from 'wallet' .

changpeng75 commented 3 years ago

So I delete the wallet file and syncing it from network.

szarkivach commented 3 years ago

Describe the bug when execute "chia plotnft show" system return follow

(venv) [root@localhost chia-blockchain]# chia plotnft show Wallet height: 542246 Sync status: Synced Wallet id 2: Current state: FARMING_TO_POOL Current state from block height: 524314 Launcher ID: xxx Target address (not for plotting): xxx Owner public key: xxx P2 singleton address (pool contract address for plotting): xxx Current pool URL: https://pool.xchpool.org Relative lock height: 100 blocks Exception from 'wallet' Unclosed client session client_session: <aiohttp.client.ClientSession object at 0x7f068788e280> Unclosed connector connections: ['[(<aiohttp.client_proto.ResponseHandler object at 0x7f0686dedbe0>, 11769.101785711)]'] connector: <aiohttp.connector.TCPConnector object at 0x7f068788e640>

node & wallet synced and no error in log file.

To Reproduce

Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior

Screenshots

Desktop

  • OS: Linux
  • OS Version/Flavor: CentOS7.9
  • CPU: Xeon E5450

Additional context Had same problem. I just totally deleted the wallet files and resynched from scratch and it works

changpeng75 commented 3 years ago

Describe the bug when execute "chia plotnft show" system return follow (venv) [root@localhost chia-blockchain]# chia plotnft show Wallet height: 542246 Sync status: Synced Wallet id 2: Current state: FARMING_TO_POOL Current state from block height: 524314 Launcher ID: xxx Target address (not for plotting): xxx Owner public key: xxx P2 singleton address (pool contract address for plotting): xxx Current pool URL: https://pool.xchpool.org Relative lock height: 100 blocks Exception from 'wallet' Unclosed client session client_session: <aiohttp.client.ClientSession object at 0x7f068788e280> Unclosed connector connections: ['[(<aiohttp.client_proto.ResponseHandler object at 0x7f0686dedbe0>, 11769.101785711)]'] connector: <aiohttp.connector.TCPConnector object at 0x7f068788e640> node & wallet synced and no error in log file. To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior Screenshots Desktop

  • OS: Linux
  • OS Version/Flavor: CentOS7.9
  • CPU: Xeon E5450

Additional context Had same problem. I just totally deleted the wallet files and resynched from scratch and it works

if so,this is a big bug.It's means datafile haven't compatibility.

marklysze commented 3 years ago

@changpeng75, it is strange that the wallet db can't be copied. I tried it on two different installs and I had the same error. Only option it seems is to resync wallet from scratch.

dailymoose commented 3 years ago

@changpeng75, it is strange that the wallet db can't be copied. I tried it on two different installs and I had the same error. Only option it seems is to resync wallet from scratch.

Which is going to take 99999 hours on a Raspberry Pi... I'm currently resyncing from scratch on another Ubuntu machine and will try copying to the RPI once complete. That will tell us whether or not it's a platforms problem or just copying in general.

Edit: Oh, and I did delete my wallet DB files and it refused to sync the wallet from the blockchain database. So it's not just a wallet DB problem, blockchain too...

marklysze commented 3 years ago

@dailymoose I copied both the blockchain and wallet dbs from fully sync'd Windows system to Ubuntu and the blockchain is syncing and continuing the be fully synced. I had to delete the wallet db files to get that starting to sync. So I think the blockchain can work.

(And yes, I tried to set it up on a Synology NAS in a Docker container and syncing a wallet was impossible, need a solid machine for that. I ended up using the Synology NAS Docker ubuntu as a harvester only node.)

changpeng75 commented 3 years ago

@marklysze I syncing on 32xxxx,need more time to completed.Maybe it can work, who knows?

marklysze commented 3 years ago

@changpeng75, I hope it works like others have said. I just started my wallet resync and it's at 30xxx, so you'll probably know before I do. Fingers crossed.

dailymoose commented 3 years ago

@dailymoose I copied both the blockchain and wallet dbs from fully sync'd Windows system to Ubuntu and the blockchain is syncing and continuing the be fully synced. I had to delete the wallet db files to get that starting to sync. So I think the blockchain can work.

(And yes, I tried to set it up on a Synology NAS in a Docker container and syncing a wallet was impossible, need a solid machine for that. I ended up using the Synology NAS Docker ubuntu as a harvester only node.)

When you deleted the wallet db, did the wallet start syncing? My copied blockchain synced fully but the wallet kept saying "Requesting block 0-32" then would time out, retry, timeout, etc. I left it run all night like that and didn't get anywhere. If your wallet worked after deleting, only thing I can think of is maybe my blockchain was corrupt somewhere/somehow. Who knows...

marklysze commented 3 years ago

@dailymoose I copied both the blockchain and wallet dbs from fully sync'd Windows system to Ubuntu and the blockchain is syncing and continuing the be fully synced. I had to delete the wallet db files to get that starting to sync. So I think the blockchain can work. (And yes, I tried to set it up on a Synology NAS in a Docker container and syncing a wallet was impossible, need a solid machine for that. I ended up using the Synology NAS Docker ubuntu as a harvester only node.)

When you deleted the wallet db, did the wallet start syncing? My copied blockchain synced fully but the wallet kept saying "Requesting block 0-32" then would time out, retry, timeout, etc. I left it run all night like that and didn't get anywhere. If your wallet worked after deleting, only thing I can think of is maybe my blockchain was corrupt somewhere/somehow. Who knows...

Yes, it started syncing again, it started from zero and slowly incremented. I stopped all Chia services before deleting the wallet files then started the node and farmer, which started the wallet. It isn't fully synced yet so hopefully it works

kahn2k commented 3 years ago

OK, I've managed to fix the issue by issuing another plotnft to a new pool with a synced wallet. There is no need to delete and resync your old wallet if it has already been synced.

I believe you can do the same by issuing plotnft to self and then back to the old pool should also fix it though I did not try that.

changpeng75 commented 3 years ago

OK, I've managed to fix the issue by issuing another plotnft to a new pool with a synced wallet. There is no need to delete and resync your old wallet if it has already been synced.

I believe you can do the same by issuing plotnft to self and then back to the old pool should also fix it though I did not try that.

Create a new plotnft on the device with incorrect wallet?

kahn2k commented 3 years ago

OK, I've managed to fix the issue by issuing another plotnft to a new pool with a synced wallet. There is no need to delete and resync your old wallet if it has already been synced. I believe you can do the same by issuing plotnft to self and then back to the old pool should also fix it though I did not try that.

Create a new plotnft on the device with incorrect wallet?

Yes. Wait a few minutes and it should fix the wallet error, and you should start farming to pool properly again

changpeng75 commented 3 years ago

OK, I've managed to fix the issue by issuing another plotnft to a new pool with a synced wallet. There is no need to delete and resync your old wallet if it has already been synced. I believe you can do the same by issuing plotnft to self and then back to the old pool should also fix it though I did not try that.

Create a new plotnft on the device with incorrect wallet?

Yes. Wait a few minutes and it should fix the wallet error, and you should start farming to pool properly again

Thanks!I try it.

changpeng75 commented 3 years ago

Same incorrect. If I use -i parameter specify new plotnft wallet I can get correct result. But if I specify old plotnft wallet I get same incorrect "Exception from 'wallet'". And I use chia plotnft join -i 2 -u https://pool.xchpool.org rejoin the pool, I get "Error performing operation on Plot NFT -f xxxxx wallet id: 2: 'NoneType' object is not iterable".

changpeng75 commented 3 years ago

I resync wallet from scratch and I get correct result.

kahn2k commented 3 years ago

What is the -i 2 argument in the command? When I use chia plotnft create -s pool -u https://bar.examplepool.org , it worked.

changpeng75 commented 3 years ago

What is the -i 2 argument in the command? When I use chia plotnft create -s pool -u https://bar.examplepool.org , it worked.

Wallet ID.

kahn2k commented 3 years ago

Maybe that's the reason. Have to plotnft to create a new wallet id. But once it clears the error, you can use the old wallet id.

dailymoose commented 3 years ago

Ok, I finally got mine working... I synced everything from scratch on an Ubuntu server with SSD. That took over 1.5 days... The "chia plotnft show" command was working correctly there after the sync. Copied the wallet/db folders over the the RPI4. The RPI4 started fine and was back in sync with the wallet and blockchain (one issue resolved). However, I was still hitting the same bug as originally reported in this ticket. I then switched from pool A to pool B, waited a half hour, then switched back from pool B to pool A as noted above. The "chia plotnft show" command is now working correctly and am farming to the pool correctly.

No clue what's up but think I ruled out a cross-platform issue... Seems like there's a cache somewhere that needs updated/cleared but not sure where it could be as it's not in the .chia folder.

marklysze commented 3 years ago

@dailymoose, thank you for the update. Perhaps the plot nft is stored somewhere too?

Update: I'm fully synced with db and wallet on a fresh ubuntu and everything looks okay, the Plot NFT was created automatically and put into the config.yaml file.

I'm wondering if the config.yaml file needs to be updated manually if we copy the db files from a computer where the plot nft was already created? Two parts of the config.yaml seem to be updated: "pool_public_keys: !!set" under the "farmer" node now has two keys "pool_list:" under "the "pool" node now has the pool nft listed

I'm not running a second full node to check, but might be useful for someone else to try if they are having the same problem.

Zerrox0 commented 3 years ago

I had the same issue and I can confirm that it happens when the "pool_list" section in your config.yaml is missing your current pool settings.

Just copied the whole "pool_list:" section from my old machine to the new one and it works fine now.

marklysze commented 3 years ago

I had the same issue and I can confirm that it happens when the "pool_list" section in your config.yaml is missing your current pool settings.

Just copied the whole "pool_list:" section from my old machine to the new one and it works fine now.

Thanks for confirming for us, that will save countless hours for others trying the same thing

Simoneu01 commented 3 years ago

I had the same issue and I can confirm that it happens when the "pool_list" section in your config.yaml is missing your current pool settings.

Just copied the whole "pool_list:" section from my old machine to the new one and it works fine now.

Thank you!

kahn2k commented 3 years ago

I had the same issue and I can confirm that it happens when the "pool_list" section in your config.yaml is missing your current pool settings.

Just copied the whole "pool_list:" section from my old machine to the new one and it works fine now.

Works for me too. Thanks!

coquinone commented 3 years ago

I had the same issue and I can confirm that it happens when the "pool_list" section in your config.yaml is missing your current pool settings.

Just copied the whole "pool_list:" section from my old machine to the new one and it works fine now.

Confirm, I had the same issue and this resolved it.

theRTC204 commented 3 years ago

I had the same issue and I can confirm that it happens when the "pool_list" section in your config.yaml is missing your current pool settings.

Just copied the whole "pool_list:" section from my old machine to the new one and it works fine now.

Thank you! This solved the error for me as well!

mqm165 commented 3 years ago

I had the same issue and I can confirm that it happens when the "pool_list" section in your config.yaml is missing your current pool settings.

Just copied the whole "pool_list:" section from my old machine to the new one and it works fine now.

it did work in terms of the wallet being synced normally, but it was weird to note that the worker did not sync in the pool website. the worker was offline, despite being normally synced in the chia plotnft show

note that I'm using flex pool, it shows individual workers

github-actions[bot] commented 3 years ago

This issue has been flagged as stale as there has been no activity on it in 14 days. If this issue is still affecting you and in need of review, please update it to keep it open.

github-actions[bot] commented 3 years ago

This issue was automatically closed because it has been flagged as stale and subsequently passed 7 days with no further activity.

adamvp commented 3 years ago

Have same error

mattselkey commented 3 years ago

I had the same issue and I can confirm that it happens when the "pool_list" section in your config.yaml is missing your current pool settings.

Just copied the whole "pool_list:" section from my old machine to the new one and it works fine now.

this saved me full resync, kudos to you!! this should be in the wiki

metalfacesec commented 3 years ago

I had the same issue and I can confirm that it happens when the "pool_list" section in your config.yaml is missing your current pool settings.

Just copied the whole "pool_list:" section from my old machine to the new one and it works fine now.

This worked for me, thank you so much!

greg-fischer commented 3 years ago

Nice easy fix!!! Just ran into this because I'm installing a new server to run a node/farmer and copied the sqlite db's and while everything looks fine, the plotnft error showed. Really nice not having to run a full sync again! Would take me days!