Tezos Asked by Tobi on August 20, 2021
I’m trying to set up a tezos in docker. I followed this how to from the official tezos documentation.
Because I want to learn how tezos works (especially baking/staking) I will use babylonnet first.
Docker hosts OS is Ubuntu 18.04 with latest HWE enabled.
docker -v
Docker version 19.03.6, build 369ce74a3c
docker-compose -v
docker-compose version 1.22.0, build f46880fe
I downloaded the start script like described in the how to.
After a
./bablyonnet start
the complete docker stack started. I had to wait some hours till chain was in sync. Then i could do some test transactions and so on like described in the how to. Just fine till this point.
Later the day I rebooted the docker host. And worked on a another project. But I had some strange DNS erros during the day. Later I found that my docker host made 227k dns request for host named node. This is caused because not all of the tezos docker conatiners were started after reboot. Especially the babylonnet_node_1 failed to start. Thats why docker tried to request the dns server.
This is how the tezos docker stack looks after ./babylonnet start
docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
66d8eadb81c3 tezos/tezos:babylonnet "/usr/local/bin/entr…" 3 minutes ago Up 3 minutes babylonnet_accuser-005-PsBabyM1_1
977eccd4ca01 tezos/tezos:babylonnet "/usr/local/bin/entr…" 3 minutes ago Up 3 minutes babylonnet_baker-005-PsBabyM1-test_1
798be668561f tezos/tezos:babylonnet "/usr/local/bin/entr…" 3 minutes ago Up 3 minutes babylonnet_baker-005-PsBabyM1_1
a41907e97a38 tezos/tezos:babylonnet "/usr/local/bin/entr…" 3 minutes ago Up 3 minutes babylonnet_endorser-005-PsBabyM1-test_1
d569a1709f20 tezos/tezos:babylonnet "/usr/local/bin/entr…" 3 minutes ago Up 3 minutes babylonnet_accuser-005-PsBabyM1-test_1
95bede3df7f6 tezos/tezos:babylonnet "/usr/local/bin/entr…" 3 minutes ago Up 3 minutes babylonnet_endorser-005-PsBabyM1_1
920656b54811 tezos/tezos:babylonnet "/usr/local/bin/entr…" 3 minutes ago Restarting (1) 3 seconds ago babylonnet_upgrader_1
4fb95ada1d9a tezos/tezos:babylonnet "/usr/local/bin/entr…" 3 minutes ago Up 3 minutes 8732/tcp, 0.0.0.0:19732->19732/tcp babylonnet_node_1
After reboot some of the containers are missing.
docker ps
IMAGE COMMAND CREATED STATUS PORTS NAMES
977eccd4ca01 tezos/tezos:babylonnet "/usr/local/bin/entr…" 7 minutes ago Up 1 second babylonnet_baker-005-PsBabyM1-test_1
a41907e97a38 tezos/tezos:babylonnet "/usr/local/bin/entr…" 7 minutes ago Up 8 seconds babylonnet_endorser-005-PsBabyM1-test_1
d569a1709f20 tezos/tezos:babylonnet "/usr/local/bin/entr…" 7 minutes ago Up 7 seconds babylonnet_accuser-005-PsBabyM1-test_1
920656b54811 tezos/tezos:babylonnet "/usr/local/bin/entr…" 7 minutes ago Restarting (1) 12 seconds ago babylonnet_upgrader_1
docker-compose.yml created by babylonnet.sh
~/.tezos-babylonnet$ cat docker-compose.yml
version: "2"
volumes:
node_data:
client_data:
services:
node:
image: tezos/tezos:babylonnet
hostname: node
command: tezos-node --net-addr :19732
ports:
- "19732:19732"
expose:
- "8732"
volumes:
- node_data:/var/run/tezos/node
- client_data:/var/run/tezos/client
restart: on-failure
upgrader:
image: tezos/tezos:babylonnet
hostname: node
command: tezos-upgrade-storage
volumes:
- node_data:/var/run/tezos/node
- client_data:/var/run/tezos/client
restart: on-failure
baker-005-PsBabyM1:
image: tezos/tezos:babylonnet
hostname: baker-005-PsBabyM1
environment:
- PROTOCOL=005-PsBabyM1
command: tezos-baker --max-priority 128
links:
- node
volumes:
- node_data:/var/run/tezos/node:ro
- client_data:/var/run/tezos/client
restart: on-failure
endorser-005-PsBabyM1:
image: tezos/tezos:babylonnet
hostname: endorser-005-PsBabyM1
environment:
- PROTOCOL=005-PsBabyM1
command: tezos-endorser
links:
- node
volumes:
- client_data:/var/run/tezos/client
restart: on-failure
accuser-005-PsBabyM1:
image: tezos/tezos:babylonnet
hostname: accuser-005-PsBabyM1
environment:
- PROTOCOL=005-PsBabyM1
command: tezos-accuser
links:
- node
volumes:
- client_data:/var/run/tezos/client
restart: on-failure
baker-005-PsBabyM1-test:
image: tezos/tezos:babylonnet
hostname: baker-005-PsBabyM1-test
environment:
- PROTOCOL=005-PsBabyM1
command: tezos-baker-test --max-priority 128
links:
- node
volumes:
- node_data:/var/run/tezos/node:ro
- client_data:/var/run/tezos/client
restart: on-failure
endorser-005-PsBabyM1-test:
image: tezos/tezos:babylonnet
hostname: endorser-005-PsBabyM1-test
environment:
- PROTOCOL=005-PsBabyM1
command: tezos-endorser-test
links:
- node
volumes:
- client_data:/var/run/tezos/client
restart: on-failure
accuser-005-PsBabyM1-test:
image: tezos/tezos:babylonnet
hostname: accuser-005-PsBabyM1-test
environment:
- PROTOCOL=005-PsBabyM1
command: tezos-accuser-test
links:
- node
volumes:
- client_data:/var/run/tezos/client
restart: on-failure
If I do a ./babylonnet stop and start again the docker stack will start properly.
I don’t see an error in docker-compose file. What can I do to get this working? Maybe I’m using the wrong docker version?
Also container babylonnet_upgrader_1 stays in status “Restarting” all the time. It seems that the entrypoint has a wrong parameter.
docker logs -f babylonnet_upgrader_1
Current public chain: 2019-09-27T07:43:32Z.
Local chain data: 2019-09-27T07:43:32Z.
tezos-node: unknown command `upgrade'.
Usage: tezos-node COMMAND ...
Try `tezos-node --help' for more information.
Maybe this issue should be discussed in an extra question.
The script you found in the official documentation hides many details that might make it difficult to debug. I personally don't advice to use that script in production.
There are two more ways to setup tezos with docker that are in development.
The first one is teztool
1 : this is still in beta, and it's going to replace the sh script you tried to use.
The second is provisioning a VM via ansible using this playbook associated to this role. Again this is in development, but feedback will be highly appreciated.
I hope this helps.
Answered by pietro abate on August 20, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP