subnet-evm
subnet-evm copied to clipboard
Is it possible to run inside a docker container?
Hello,
I am trying to create a local subnet using this tutorial: https://docs.avax.network/subnets/create-a-local-subnet.
I see a large number of errors when running inside a docker container, but not when running the code directly on my machine.
The errors all appear to be the same:
[node1] [06-02|02:25:59.939] WARN health/health.go:101 Failing health check: {"C":{"message":{"consensus":{},"vm":null},"timestamp":"2022-06-02T02:25:59.549122122Z","duration":13939},"P":{"message":{"consensus":{},"vm":{"primary-percentConnected":0.2}},"error":"platform layer is unhealthy reason: connected to 20.000000% of primary network stake; should be connected to at least 80.000000%","timestamp":"2022-06-02T02:25:59.549180581Z","duration":108784,"contiguousFailures":148,"timeOfFirstFailure":"2022-06-02T02:21:05.549196206Z"},"X":{"message":{"consensus":{},"vm":null},"timestamp":"2022-06-02T02:25:59.549154951Z","duration":5329},"bootstrapped":{"message":["X","P","C"],"error":"chains not bootstrapped","timestamp":"2022-06-02T02:25:59.549141235Z","duration":11967,"contiguousFailures":148,"timeOfFirstFailure":"2022-06-02T02:21:05.549075558Z"},"network":{"message":{"connectedPeers":0,"sendFailRate":0,"timeSinceLastMsgReceived":"459482h25m59.549199374s","timeSinceLastMsgSent":"459482h25m59.549199374s"},"error":"network layer is unhealthy reason: not connected to a minimum of 1 peer(s) only 0, no messages from network received in 459482h25m59.549199374s \u003e 1m0s, no messages from network sent in 459482h25m59.549199374s \u003e 1m0s","timestamp":"2022-06-02T02:25:59.549239066Z","duration":69760,"contiguousFailures":149,"timeOfFirstFailure":"2022-06-02T02:21:03.548121268Z"},"router":{"message":{"longestRunningRequest":"0s","outstandingRequests":0},"timestamp":"2022-06-02T02:25:59.549067566Z","duration":35061}}
The process finally fails with:
{"level":"warn","ts":"2022-06-02T02:26:02.622Z","caller":"server/server.go:367","msg":"start failed to complete","error":"context deadline exceeded"}
panic: context deadline exceeded
This occurs when I run ./scripts/run.sh 1.7.11 0x8db97C7cEcE249c2b98bDC0226Cc4C2A57BF52FC
inside of the docker container.
The docker image is based on archlinux, but it works fine on my archlinux machine. I believe I am following exactly the same steps on both.
Any advice on how I can start solving this issue is appreciated. Perhaps I am missing something obvious?
Thanks!
Hello,
I have exactly the same issue here. When i'm cloning this repo locally, on my mac, and run:
> git clone [email protected]:ava-labs/subnet-evm.git
> cd subnet-evm
> ./scripts/run.sh 1.7.13 0x8db97C7cEcE249c2b98bDC0226Cc4C2A57BF52FC
It's working well. But when I'll do it inside a docker container, it's not working.
> docker run -it golang:1.17.9 /bin/bash
root@dfae8833b7d2:/go# git clone https://github.com/ava-labs/subnet-evm.git
root@dfae8833b7d2:/go# cd subnet-evm
root@dfae8833b7d2:/go# ./scripts/run.sh 1.7.13 0x8db97C7cEcE249c2b98bDC0226Cc4C2A57BF52FC
The health check for each node keeps failing:
[node4] [06-13|19:04:39.273] WARN health/health.go:101 Failing health check: {"P":{"message":{"consensus":{},"vm":{"24tZhrm8j8GCJRE9PomW8FaeqbgGS4UAQjJnqqn8pq5NwYSYV1-percentConnected":1,"primary-percentConnected":1}},"timestamp":"2022-06-13T19:04:38.824341+10:00","duration":145061},"bootstrapped":{"message":["P"],"error":"chains not bootstrapped","timestamp":"2022-06-13T19:04:38.824167+10:00","duration":7790,"contiguousFailures":1,"timeOfFirstFailure":"2022-06-13T19:04:38.824167+10:00"},"database":{"timestamp":"2022-06-13T19:04:38.82421+10:00","duration":2192},"diskspace":{"message":{"availableDiskBytes":449292951552},"timestamp":"2022-06-13T19:04:38.824207+10:00","duration":15025},"network":{"message":{"connectedPeers":4,"sendFailRate":0,"timeSinceLastMsgReceived":"824.294ms","timeSinceLastMsgSent":"824.294ms"},"timestamp":"2022-06-13T19:04:38.824301+10:00","duration":72792},"router":{"message":{"longestRunningRequest":"1.968307249s","outstandingRequests":1},"timestamp":"2022-06-13T19:04:38.824231+10:00","duration":28898}}
Hello @Lestt quick tip, there is a scripts/build_image.sh
to handle the creation of docker images. I used that, along with the manual process: https://docs.avax.network/quickstart/create-a-local-test-network#manually to set up my network.
If you aren't aware, they also have a number of CLI tools to abstract this process
Seems this is resolved.