0

I'm currently having a problem with my node/ baker setup and I don't really know how to solve it. I know that the problem is of network nature, because the logs e.g. of the baker are saying that they can't access the node's RPC interface. I'm using the docker manager script.

Sep  7 22:22:29.108 - 010-PtGRANAD.delegate.baking_forge:   Rpc request failed:
Sep  7 22:22:29.108 - 010-PtGRANAD.delegate.baking_forge:      - meth: GET
Sep  7 22:22:29.108 - 010-PtGRANAD.delegate.baking_forge:      - uri: http://node:8732/chains/NetXdQprcVkpaWU/blocks/BM6Mmedf7QwBb7mu93F2THMGrjRP2krhHcphSzQicFugJUoDGsQ/helpers/baking_rights?level=1674533&delegate=tz1W18rF1o4xMakVyJaLtSNParJFtVcoTbUw&max_priority=128

Other containers also tell me the same story, they cant reach a certain endpoint. I've tried to change the config in the following ways -create special acl rules that specifically allow access to localhost -activate debug logging to see if the logs tell me something about a failed request -changed the listen addresses to localhost / 127.0.0.1, with / without the domain

I've only found success to access the node's RPC interface by using the param --rpc-port in the manager script, but that only gave me access outside of the containers. One thing I was wondering about was, that the containers try to access the node by the DNS name "node" which was not resolvable on the host itself but I couldn't find a way to change this in the config. Every time I wrote a localhost address into the RPC listen key value pair it automatically removed the address on startup and only put the port in like ":8732" but that's probably because localhost is the default assumption.

I'd really appreciate your help.

1 Answer 1

2

The docker implementation with tezos is bad. https://gitlab.com/tezos/tezos/-/issues/548 It does not allow for many configuration parameters to be customized, and hard-codes many parameters too.

For your specific case, this can be solved by using an external mountpoint as the storage for the node like this:

-v /opt/tezos/node_data:/var/run/node/data

Start your node container with the above parameter. Then you can edit manually /opt/tezos/node_data/data/config.json and add whatever parameters you want. Restart the container and it'll pick up the new config.

You need to have this section:

"rpc":
    { "listen-addrs": [ ":8732" ],
      "acl": [ { "address": ":8732", "blacklist": [] } ] },

in order for RPCs to work with docker. Be sure you are also launching the container with port mapping -p 8732:8732 then you can access RPCs from outside the container.

5
  • im currently using the mainnet.sh script so not launching the containers manually. So my only option is to change the script (tedious, doing that anyway currently.. so i can have my ledger attached by plugging in the "devices" property for each container) This is a bad solution because each time i update the script my changes get lost. When i pass the --rpc-port param i can actually fetch data via curl/ wget but the containers still cant establish a connection...
    – Platinium
    Sep 8, 2021 at 15:21
  • to edit the config im currently going into the container storage by using sudo -i and navigating to /var/lib/docker/volumes/mainnet_node_data/_data/data/config.json This feels like a better/ easier way than mapping the directories... Nontheless my config has exactly the configuration you describe above but it still doesnt seem to work. Ive read the gitlab article you linked and came to the conclusion that it might be easier to prepare my own docker compose file instead of taking the noob script? Still i want to figure out how to get my node working again quickly, missing a lot of endments
    – Platinium
    Sep 8, 2021 at 15:22
  • to me this doesnt really feel like a problem with the node container anymore because i can access it outside, maybe my containers are just not permitted to access the hosts localhost port environment? Do you have any other ideas what i could do?
    – Platinium
    Sep 8, 2021 at 15:26
  • 1
    Sorry, I don't know anything about the mainnet script. I would suggest you either switch to the manual method or use the tezos-bare image which just has the binaries, no scripts.
    – utdrmac
    Sep 8, 2021 at 19:21
  • Still ty for your help :). I got it to work by resetting everything so idk where the problem was. And btw heres and error in the documentation, theres no "warn" param for the config, just "warning", just wanted to get that out there. tezos.gitlab.io/user/…
    – Platinium
    Sep 9, 2021 at 8:15

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.