1

I've restored a recent db-sync snapshot (I am running node 8.1.2). The restore was successful; I can run SQL queries against the default cexplorer database. However, there seems to be an issue when I begin running db-sync to sync the rest of the way.

For context, I am using the Guild Operator's scripts (.dbsync.sh -d); the systemd service deploys successfully, but after several hours the (restored) database still appears not to be syncing, as evidenced when I run:

cexplorer=# select now () - max (time) as behind_by from block ;
       behind_by
------------------------
 5 days 22:44:28.094372
(1 row)

And after several minutes:

cexplorer=# select now () - max (time) as behind_by from block ;
       behind_by
------------------------
 5 days 22:58:38.184134
(1 row)

The behind_by value keeps increasing, so I assume the databse is not syncing.

Here are the log message(s) after running tail -10f $CNODE_HOME/logs/dbsync.json:

{"app":[],"at":"2023-09-13T20:45:54.69Z","data":{"kind":"LogMessage","message":"Handling input offset 22100000"},"env":"<unknown>:00000","host":"","loc":null,"msg":"","ns":["db-sync-node"],"pid":"918006","sev":"Info","thread":"6"}

Any ideas what could be wrong or what the log message means?

5
  • The reason why its not syncing will almost certainly be obvious if you look at the logs of both the node and db-sync. Sep 13 at 21:21
  • I asked cause I'm definitely a noob. I suspect it has something to do with the "Handling input offset" message, but not sure what it means.
    – zhekson
    Sep 13 at 21:30
  • Nothing to do with that message. That is an effect not a cause and it gives zero clue as to the actual cause. Sep 13 at 23:33
  • so then which log files are you referring to?
    – zhekson
    Sep 13 at 23:38
  • The logs for the node and the logs for db-sync. One or the other should have the proper cause. I am not familiar with the Guild operator scripts so I am not sure where the log files are. Probably in $CNODE_HOME Sep 13 at 23:44

1 Answer 1

1

Few checkpoints for you before you even start:

  1. Check status for services: sudo systemctl status cnode sudo systemctl status cnode-dbsync
  2. Since you've used Guild-Ops scripts, you've already got gLiveView installed in $CNODE_HOME/scripts folder. I assume you went through documentation to ensure you've updated variables in env file.
  3. Before looking at dbsync, I'd first recommend you ensure your node is working and in sync - gLiveView gives a nice little overview to check status of your node.
  4. All the logs are in $CNODE_HOME/logs folder, the node (by default) would be node0.json. So if any of the component isnt working, you'd need to check corresponding log file for the cause.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.