Debug guide (how to know if my subnet is running?)
Subnet Nodes
Check chainstate with curl, you can change
localhost:8545
to your subnet node's RPC PORTCall current block api
curl --location 'http://localhost:8545' \
--header 'Content-Type: application/json' \
--data '{"jsonrpc":"2.0","method":"XDPoS_getV2BlockByNumber","params":["latest"],"id":1}'Check current peers
curl --location 'http://localhost:8545' \
--header 'Content-Type: application/json' \
--data '{"jsonrpc":"2.0","method":"admin_peers","params":[],"id":1}'Check chainstate inside docker
Exec into the subnet container
docker exec -it <container_name> bash
Attach to the API process
XDC attach /work/xdcchain/XDC.ipc
Call current block api
XDPoS.getV2Block()
Check current peers
admin.peers
Check logs, assuming log level 4 (default 2), you want to look for logs with blockNum, and blockNum should increase with time.
docker logs -f <container_name>
Subnet Services
Bootnode
Check logs, you should see messages from all subnet nodes
docker logs -f <container_name>
Relayer
Check logs, you should see blocks being periodically submitted
docker logs -f <container_name>
Stats-server
Check logs, in
<deployment folder>/stats-service/logs/debug
, you should see block data and history data being received.Frontend
Check logs or check errors through developer console in web browser.
Common Issues
Subnet node does not boot with error log
Fatal: Error starting protocol stack: listen unix /work/xdcchain/XDC.ipc: bind: invalid argument
This is due to the volume mount path being too long. The mounth path is your current directory (also can check with
pwd
command). Please move thegenerated
folder to a shorter path and try again.Docker image startup fails with
SIGKILL
orError code: 137
found in logs. (Issue found in Frontend image)This error occurs because Docker ran Out Of Memory (OOM). You can increase the memory limit in Docker settings