Error when starting Nodeos using snapshot.
I get snapshot in own chain.
curl http://127.0.0.1:8888/v1/producer/create_snapshot | json_pp
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 220 100 220 0 0 526 0 --:--:-- --:--:-- --:--:-- 525
{
"head_block_id" : "000000e80db33c60505f9a7e012313290a054c38ac376e515ab136d9c858bc6e",
"snapshot_name" : "/Users/xiehanqing/eoscode/eos/snapshots/snapshot-000000e80db33c60505f9a7e012313290a054c38ac376e515ab136d9c858bc6e.bin"
}
Then I delete blocks.log, blocks.index and reversible.
I start nodeos with --snapshot <path to snapshot> command line option ,but fail
error 2018-11-02T10:42:30.915 thread-0 main.cpp:130 main ] 3240000 snapshot_exception: Snapshot exception Binary snapshot has unexpected magic number!
This is start command I usd
//SNAPSHOTDIR is path of snapshot file
./nodeos -e -p eosio --data-dir $DATADIR --config-dir $DATADIR --snapshot $SNAPSHOTDIR
@wanderingbort Looking forward to your reply.Thanks
Why is snapshot generation ok, but it will give you an error when parsing? Is it the reason to start the command? Or is there a configuration problem? I added four plugins to the configuration file.
plugin = eosio::chain_api_plugin
plugin = eosio::producer_api_plugin
plugin = eosio::history_api_plugin
plugin = eosio::net_api_plugin
Magic_number is a const variable that writes to the beginning of the snapshot file. Validation also takes the magic_number value from the beginning of the snapshot file. Why is magic_number Error reported?
What's the file size of /Users/xiehanqing/eoscode/eos/snapshots/snapshot-000000e80db33c60505f9a7e012313290a054c38ac376e515ab136d9c858bc6e.bin?
Across your case with me also, are you solved it?
Across your case with me also, are you solved it?
same issue here.
"What's the file size of .... "
$ ls -rtlh
total 1,2G
-rw-rw-r-- 1 jj jj 1,2G Jan 10 08:01 snapshot-022f5eccefab3016116f5d069c9849630946133c17a465b8020e7f27ac794b34.bin
Update:
- removed the "magic" number checkings
void istream_snapshot_reader::validate() const {
try {
// validate totem
auto expected_totem = ostream_snapshot_writer::magic_number;
decltype(expected_totem) actual_totem;
snapshot.read((char*)&actual_totem, sizeof(actual_totem));
// EOS_ASSERT(actual_totem == expected_totem, snapshot_exception,
// "Binary snapshot has unexpected magic number!");
- .. and got now the following error..
info 2019-01-12T21:09:24.505 thread-0 chain_plugin.cpp:333 plugin_initialize ] initializing chain plugin warn 2019-01-12T21:09:24.506 thread-0 chain_plugin.cpp:700 plugin_initialize ] 3240000 snapshot_exception: Snapshot exception Binary snapshot validation threw IO exception (basic_ios::clear: iostream error) {"what":"basic_ios::clear: iostream error"} thread-0 snapshot.cpp:224 validate Failed to initialize
I am currently having this same issue, do we have a fix for this?
I am having the same issue. How do one should handle backups?
Facing the same issue when restoring from snapshot, please help
Facing the same issue when restoring from snapshot, please help
Managed to get it working, node seems to be syncing up now
What I did: Removed data and state folder from /.local/share/eosio/nodeos/data$ folder
download/copy your snapshot into /.local/share/eosio/nodeos/data/snapshots/
./nodeos --delete-all-blocks --snapshot /.local/share/eosio/nodeos/data/snapshots/<snapshotname.bin>
node will freeze for a few minutes after starting up with error saying it needs to resync. just leave it
node should start syncing normally after that. do a curl to your node api to check if chain id is correct and whether head_block_num is recent. if it is then you should be good.
Misleading messages fixed in #6713 and will be in the next release.
Facing the same issue when restoring from snapshot, please help
Managed to get it working, node seems to be syncing up now
What I did: Removed data and state folder from /.local/share/eosio/nodeos/data$ folder
download/copy your snapshot into /.local/share/eosio/nodeos/data/snapshots/
./nodeos --delete-all-blocks --snapshot /.local/share/eosio/nodeos/data/snapshots/<snapshotname.bin>
node will freeze for a few minutes after starting up with error saying it needs to resync. just leave it
node should start syncing normally after that. do a curl to your node api to check if chain id is correct and whether head_block_num is recent. if it is then you should be good.
It works for me.