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

sometimes errors struct.error: 'H' format requires 0 <= number <= 65535 #3

Closed
kawww opened this issue Oct 18, 2021 · 3 comments
Closed

Comments

@kawww
Copy link

kawww commented Oct 18, 2021

3/4 nodes sometimes show these errors, I have to reinstall ectrumx and sync again.

Oct 15 03:55:12 localhost electrumx_server[593]: File "/root/electrumx/electrumx/server/block_processor.py", line 341, in flush
Oct 15 03:55:12 localhost electrumx_server[593]: self.db.flush_dbs(self.flush_data(), flush_utxos,
Oct 15 03:55:12 localhost electrumx_server[593]: File "/root/electrumx/electrumx/server/db.py", line 229, in flush_dbs
Oct 15 03:55:12 localhost electrumx_server[593]: self.flush_history()
Oct 15 03:55:12 localhost electrumx_server[593]: File "/root/electrumx/electrumx/server/db.py", line 298, in flush_history
Oct 15 03:55:12 localhost electrumx_server[593]: self.history.flush()
Oct 15 03:55:12 localhost electrumx_server[593]: File "/root/electrumx/electrumx/server/history.py", line 133, in flush
Oct 15 03:55:12 localhost electrumx_server[593]: flush_id = pack_be_uint16(self.flush_count)
Oct 15 03:55:12 localhost electrumx_server[593]: struct.error: 'H' format requires 0 <= number <= 65535
Oct 15 03:55:14 localhost systemd[1]: electrumx.kevacoin.service: Succeeded.

@kawww
Copy link
Author

kawww commented Jan 17, 2022

Jan 16 22:45:30 localhost electrumx_server[592]: File "/usr/local/lib/python3.8/dist-packages/aiorpcx/curio.py", line 242, in aexit
Jan 16 22:45:30 localhost electrumx_server[592]: await self.join()
Jan 16 22:45:30 localhost electrumx_server[592]: File "/usr/local/lib/python3.8/dist-packages/aiorpcx/curio.py", line 211, in join
Jan 16 22:45:30 localhost electrumx_server[592]: raise task.exception()
Jan 16 22:45:30 localhost electrumx_server[592]: File "/root/electrumx/electrumx/server/mempool.py", line 241, in _refresh_hashes
Jan 16 22:45:30 localhost electrumx_server[592]: await self._process_mempool(hashes, touched, height)
Jan 16 22:45:30 localhost electrumx_server[592]: File "/root/electrumx/electrumx/server/mempool.py", line 282, in _process_mempool
Jan 16 22:45:30 localhost electrumx_server[592]: nameXs[tx.namekeyout].remove(tx_hash)
Jan 16 22:45:30 localhost electrumx_server[592]: KeyError: b'E\xb4\xadmD\xa3\x00(A*\xfe\x88\x19f3\xc1\x81\xb4r\x10\xc2\x02\x1e\xd0b\xc2\xba\x13\xc5\x05\xa6q'

stopped again

@kawww
Copy link
Author

kawww commented Mar 20, 2022

all the electrumx server stopped at the same time.

● electrumx.kevacoin.service - Kevacoin
Loaded: loaded (/etc/systemd/system/electrumx.kevacoin.service; enabled; vendor preset: enabled)
Active: inactive (dead) since Sat 2022-03-19 05:02:36 UTC; 23h ago
Process: 600 ExecStart=/root/electrumx/electrumx_server (code=exited, status=0/SUCCESS)
Main PID: 600 (code=exited, status=0/SUCCESS)

Mar 19 05:02:34 localhost electrumx_server[600]: File "/usr/local/lib/python3.8/dist-packages/aiorpcx/curio.py", line 242, in aexit
Mar 19 05:02:34 localhost electrumx_server[600]: await self.join()
Mar 19 05:02:34 localhost electrumx_server[600]: File "/usr/local/lib/python3.8/dist-packages/aiorpcx/curio.py", line 211, in join
Mar 19 05:02:34 localhost electrumx_server[600]: raise task.exception()
Mar 19 05:02:34 localhost electrumx_server[600]: File "/root/electrumx/electrumx/server/mempool.py", line 241, in _refresh_hashes
Mar 19 05:02:34 localhost electrumx_server[600]: await self._process_mempool(hashes, touched, height)
Mar 19 05:02:34 localhost electrumx_server[600]: File "/root/electrumx/electrumx/server/mempool.py", line 282, in _process_mempool
Mar 19 05:02:34 localhost electrumx_server[600]: nameXs[tx.namekeyout].remove(tx_hash)
Mar 19 05:02:34 localhost electrumx_server[600]: KeyError: b'\x86|\xef\xce\x8a\xc3\x9e\x86\x9f\x8c\xcee.\xa1\xc6\x7f7\x04\xee\x99vp"B\xaf\xfa\xe8bj\x05\x8c\x94'
Mar 19 05:02:36 localhost systemd[1]: electrumx.kevacoin.service: Succeeded.

good after reboot

@kawww kawww changed the title sometimes errors sometimes errors struct.error: 'H' format requires 0 <= number <= 65535 May 29, 2022
@kawww
Copy link
Author

kawww commented May 29, 2022

This is electrumx problem kyuupichan#185 (comment)

So I think it is better to delete db every month.

#create fixe.sh

vi fixe.sh

#!/bin/bash echo "Fix electrumx 65535!"

systemctl stop electrumx.kevacoin.service

rm -rf /root/kevax

mkdir /root/kevax

systemctl start electrumx.kevacoin.service

#run

chmod -R 777 fixe.sh

#clear db every month/2month

crontab -e

1 1 1 * * bash /root/fixe.sh

1 1 15 * * bash /root/fixe.sh

1 1 1 */2 * bash /root/fixe.sh

1 1 1 1-11/2 * bash /root/fixe.sh

@kawww kawww closed this as completed May 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant