AstarNetwork / astar-docs

https://docs.astar.network/
GNU General Public License v3.0
298 stars 94 forks source link

containers zkevm-rpc and zkevm-sync are restarting #650

Open tapas-jana opened 6 months ago

tapas-jana commented 6 months ago

Hi, I am trying to setup Astar zkEVM Mainnet Permissionless RPC Node following the docs https://docs.astar.network/docs/build/zkEVM/zk-node/setup-mainnet-rpc-node/ . The containers created and started but the containers zkevm-rpc, zkevm-sync and zkevm-prover looks not ok , they are restarting. CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 3bcd8f386ed9 staketechnologies/cdk-validium-node:v0.5.13-CDK2 "/bin/sh -c '/app/zk…" 6 hours ago Up About a minute 0.0.0.0:8545->8545/tcp, :::8545->8545/tcp, 8123/tcp, 0.0.0.0:9091->9091/tcp, :::9091->9091/tcp zkevm-rpc e15e50a13d69 staketechnologies/zkevm-prover:v4.0.19 "zkProver -c /usr/sr…" 6 hours ago Up About a minute 0.0.0.0:50061->50061/tcp, :::50061->50061/tcp, 0.0.0.0:50071->50071/tcp, :::50071->50071/tcp zkevm-prover 64b3669008db staketechnologies/cdk-validium-node:v0.5.13-CDK2 "/bin/sh -c '/app/zk…" 6 hours ago Up About a minute 8123/tcp, 0.0.0.0:9092->9091/tcp, :::9092->9091/tcp zkevm-sync 66685835e947 postgres:15 "docker-entrypoint.s…" 6 hours ago Up 6 hours (healthy) 0.0.0.0:5433->5432/tcp, :::5433->5432/tcp zkevm-pool-db 7495fcd120eb postgres:15 "docker-entrypoint.s…" 6 hours ago Up 6 hours (healthy) 0.0.0.0:5432->5432/tcp, :::5432->5432/tcp zkevm-state-db root@astarzkevm:/etc/zkevm#

The logs for zkevm-rpc and zkevm-sync are same as below

{"level":"info","ts":1711124757.5284636,"caller":"cmd/run.go:73","msg":"Running DB migrations host: zkevm-state-db:5432 db:state_db user:state_user","pid":1,"version":"v0.5.13+cdk.2"} {"level":"info","ts":1711124757.5285015,"caller":"cmd/run.go:285","msg":"running migrations for zkevm-state-db","pid":1,"version":"v0.5.13+cdk.2"} {"level":"info","ts":1711124757.528511,"caller":"db/db.go:47","msg":"running migrations up","pid":1,"version":"v0.5.13+cdk.2"} {"level":"fatal","ts":1711125019.0802724,"caller":"cmd/run.go:288","msg":"failed to connect to host=zkevm-state-db user=state_user database=state_db: dial error (timeout: dial tcp 172.25.0.2:5432: connect: connection timed out)\n/src/log/log.go:142 github.com/0xPolygonHermez/zkevm-node/log.appendStackTraceMaybeArgs()\n/src/log/log.go:223 github.com/0xPolygonHermez/zkevm-node/log.Fatal()\n/src/cmd/run.go:288 main.runMigrations()\n/src/cmd/run.go:270 main.runStateMigrations()\n/src/cmd/run.go:74 main.start()\n/go/pkg/mod/github.com/urfave/cli/v2@v2.26.0/command.go:277 github.com/urfave/cli/v2.(Command).Run()\n/go/pkg/mod/github.com/urfave/cli/v2@v2.26.0/command.go:270 github.com/urfave/cli/v2.(Command).Run()\n/go/pkg/mod/github.com/urfave/cli/v2@v2.26.0/app.go:335 github.com/urfave/cli/v2.(App).RunContext()\n/go/pkg/mod/github.com/urfave/cli/v2@v2.26.0/app.go:309 github.com/urfave/cli/v2.(App).Run()\n/src/cmd/main.go:198 main.main()\n/usr/local/go/src/runtime/proc.go:267 runtime.main()\n","pid":1,"version":"v0.5.13+cdk.2","stacktrace":"main.runMigrations\n\t/src/cmd/run.go:288\nmain.runStateMigrations\n\t/src/cmd/run.go:270\nmain.start\n\t/src/cmd/run.go:74\ngithub.com/urfave/cli/v2.(Command).Run\n\t/go/pkg/mod/github.com/urfave/cli/v2@v2.26.0/command.go:277\ngithub.com/urfave/cli/v2.(Command).Run\n\t/go/pkg/mod/github.com/urfave/cli/v2@v2.26.0/command.go:270\ngithub.com/urfave/cli/v2.(App).RunContext\n\t/go/pkg/mod/github.com/urfave/cli/v2@v2.26.0/app.go:335\ngithub.com/urfave/cli/v2.(App).Run\n\t/go/pkg/mod/github.com/urfave/cli/v2@v2.26.0/app.go:309\nmain.main\n\t/src/cmd/main.go:198\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:267"}

where as I am able to connect to all the postgresql db using there corresponding user and password from outside the docker container. Not sure what am I missing, need your help. Thank you Tapas Jana

meganskye commented 4 months ago

hi there, thank you so much for your report. kindly check out the prerequisites for installing a validium node here including Go:

https://docs.astar.network/docs/build/zkEVM/zk-node/setup-local-validium-node

and let us know if it helps, thank you.