centos7下,运行np-prompt,卡顿后后,ctrl + z 退出后,再此运行np-prompt,报错
helailiang opened this issue · 1 comments
$ np-prompt
Maxpeers set to 5
Traceback (most recent call last):
File "/home/neo/myproject/venv/lib/python3.7/site-packages/neo/Storage/Implementation/LevelDB/LevelDBImpl.py", line 44, in init
lru_cache_size=10 * 1024 * 1024)
File "plyvel/_plyvel.pyx", line 247, in plyvel._plyvel.DB.init
File "plyvel/_plyvel.pyx", line 88, in plyvel._plyvel.raise_for_status
plyvel._plyvel.IOError: b'IO error: lock /home/neo/.neopython/Chains/SC234/LOCK: Resource temporarily unavailable'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/neo/myproject/venv/bin/np-prompt", line 11, in
sys.exit(main())
File "/home/neo/myproject/venv/lib/python3.7/site-packages/neo/bin/prompt.py", line 356, in main
blockchain = Blockchain(DBFactory.getBlockchainDB(settings.chain_leveldb_path))
File "/home/neo/myproject/venv/lib/python3.7/site-packages/neo/Storage/Implementation/DBFactory.py", line 47, in getBlockchainDB
_blockchain_db_instance = BlockchainDB(path)
File "/home/neo/myproject/venv/lib/python3.7/site-packages/neo/Storage/Implementation/LevelDB/LevelDBImpl.py", line 47, in init
raise Exception("leveldb exception [ %s ]" % e)
Exception: leveldb exception [ b'IO error: lock /home/neo/.neopython/Chains/SC234/LOCK: Resource temporarily unavailable' ]
Type exit
to exit np-prompt
. Hard killing it will, as you experienced, often not properly close the database (and can cause data loss). To solve your issue, delete the LOCK
file.