Closed cebook closed 9 months ago
Hi!
This error means that your DB's state is out of sync with the API server's. Typically this is caused by a re-org and should resolve itself with a retry automatically.
If it does not, try rails console
and then in the console running EthscriptionSync.check_for_reorgs
.
Also make sure that rspec
works and this isn't a symptom of another problem.
Let me know if this works! Thanks for reporting!
The problem was solved because I modified the pgsql configuration in config/database.yml and created the database myself. When I restored the configuration and created the database with rails db:create There was no problem. Thank you very much.Tom
Hello,I followed redme instructions and went to: bundle exec clockwork config/clock.rb The program reports the following error,Please analyze it for me. Thank you.
/opt/eths/facet-vm# bundle exec clockwork config/clock.rb I, [2023-12-03T13:01:03.987078 #2155288] INFO -- : Starting clock for 2 events: [ Sync ethscriptions check_for_reorgs ] I, [2023-12-03T13:01:03.988393 #2155288] INFO -- : Triggering 'Sync ethscriptions' E, [2023-12-03T13:01:06.785472 #2155288] ERROR -- : Unexpected error: {"message"=>"Count is off"} (RuntimeError) /opt/eths/facet-vm/app/models/ethscription_sync.rb:110:in
block in import_eth_block_batch' /usr/local/rvm/gems/ruby-3.2.2/gems/activerecord-7.1.2/lib/active_record/connection_adapters/abstract/transaction.rb:535:in
block in within_new_transaction' /usr/local/rvm/gems/ruby-3.2.2/gems/activesupport-7.1.2/lib/active_support/concurrency/null_lock.rb:9:insynchronize' /usr/local/rvm/gems/ruby-3.2.2/gems/activerecord-7.1.2/lib/active_record/connection_adapters/abstract/transaction.rb:532:in
within_new_transaction' /usr/local/rvm/gems/ruby-3.2.2/gems/activerecord-7.1.2/lib/active_record/connection_adapters/abstract/database_statements.rb:344:intransaction' /usr/local/rvm/gems/ruby-3.2.2/gems/activerecord-7.1.2/lib/active_record/transactions.rb:212:in
transaction' /opt/eths/facet-vm/app/models/ethscription_sync.rb:90:inimport_eth_block_batch' /opt/eths/facet-vm/app/models/ethscription_sync.rb:45:in
block in import_eth_blocks_until_done' /opt/eths/facet-vm/app/models/ethscription_sync.rb:44:inloop' /opt/eths/facet-vm/app/models/ethscription_sync.rb:44:in
import_eth_blocks_until_done' /opt/eths/facet-vm/config/clock.rb:25:inblock in <module:Clockwork>' /usr/local/rvm/gems/ruby-3.2.2/gems/clockwork-3.0.2/lib/clockwork/event.rb:61:in
execute' /usr/local/rvm/gems/ruby-3.2.2/gems/clockwork-3.0.2/lib/clockwork/event.rb:48:inrun' /usr/local/rvm/gems/ruby-3.2.2/gems/clockwork-3.0.2/lib/clockwork/manager.rb:136:in
block in tick' /usr/local/rvm/gems/ruby-3.2.2/gems/clockwork-3.0.2/lib/clockwork/manager.rb:134:ineach' /usr/local/rvm/gems/ruby-3.2.2/gems/clockwork-3.0.2/lib/clockwork/manager.rb:134:in
tick' /usr/local/rvm/gems/ruby-3.2.2/gems/clockwork-3.0.2/lib/clockwork/manager.rb:123:inblock (2 levels) in run_tick_loop' /usr/local/rvm/gems/ruby-3.2.2/gems/clockwork-3.0.2/lib/clockwork/manager.rb:121:in
synchronize' /usr/local/rvm/gems/ruby-3.2.2/gems/clockwork-3.0.2/lib/clockwork/manager.rb:121:in `block in run_tick_loop' I, [2023-12-03T13:01:06.786738 #2155288] INFO -- : Finished 'Sync ethscriptions' duration_ms=2798 error=#<RuntimeError: Unexpected error: {"message"=>"Count is off"}> I, [2023-12-03T13:01:06.787694 #2155288] INFO -- : Triggering 'check_for_reorgs' I, [2023-12-03T13:01:07.301119 #2155288] INFO -- : Finished 'check_for_reorgs' duration_ms=513 error=nil I, [2023-12-03T13:01:08.001340 #2155288] INFO -- : Triggering 'Sync ethscriptions' ^CD, [2023-12-03T13:01:10.255619 #2155288] DEBUG -- : Got INT signal I, [2023-12-03T13:01:10.255712 #2155288] INFO -- : Shutting down I, [2023-12-03T13:01:10.258483 #2155288] INFO -- : Finished 'Sync ethscriptions' duration_ms=2257 error=nil