1

I have Tezos docker containers running using Docker Compose:

version: "3.4"

services:
  tezos:
    image: "${TEZOS_DOCKER_IMAGE}"
    restart: always
    ports:
      - "${RPCPORT:-8732}:${RPCPORT:-8732}"
      - "${PEERPORT:-9732}:9732"
    command:
      [
        "tezos-node",
        "--network=${NETWORK}",
        "--history-mode=${HISTORY_MODE}",
        "--max-download-speed=20485760",
        "--net-addr=[::]:${PEERPORT:-9732}",
        "--rpc-addr 0.0.0.0:${RPCPORT}",
        "--allow-all-rpc 0.0.0.0:${RPCPORT}",
        "--metadata-size-limit=unlimited"
      ]
    volumes:
      - "${VOLUME:-tezos-data}:/var/run/tezos/node"
      - "/opt/snapshots/tezos:/opt/snapshots/tezos"

volumes:
  tezos-data:

However, after upgrading an archive node from v13 to v14, using these settings...

COMPOSE_PROJECT_NAME=mainnet-archive
VISIBILITY=private
NETWORK=mainnet
TEZOS_DOCKER_IMAGE=tezos/tezos:v14.0
TEZOS_UPGRADER_DOCKER_IMAGE=tezos/tezos-bare:v14.0
HISTORY_MODE=archive
RPCPORT=8737
PEERPORT=9737

..I get this error:

Current public chain: 2018-06-30T16:07:32Z.
Local chain data: 2018-06-30T16:07:32Z.
Updating the node configuration...
Aug 31 15:35:29.825 - node.main: FULL access to RPC enabled; this is very risky.
Aug 31 15:35:29.825 - node.main:   (addresses = [::]:8732, 0.0.0.0:8737)
tezos-node: Error:
              The data directory version is too old.
              Found '0.8', expected '1.0'.
              It needs to be upgraded with `tezos-node upgrade storage`.

After looking at the docs, I am trying to use tezos-node upgrade storage to upgrade the storage. When I modify my Compose file to the following using the information at https://gitlab.com/tezos/tezos/-/blob/master/scripts/docker/entrypoint.sh and deploy it..

version: "3.4"

services:
  tezos:
    image: "${TEZOS_DOCKER_IMAGE}"
    restart: always
    ports:
      - "${RPCPORT:-8732}:${RPCPORT:-8732}"
      - "${PEERPORT:-9732}:9732"
    command: tezos-upgrade-storage
    volumes:
      - "${VOLUME:-tezos-data}:/var/run/tezos/node"
      - "/opt/snapshots/tezos:/opt/snapshots/tezos"

volumes:
  tezos-data:

..I see the following error:

Current public chain: 2018-06-30T16:07:32Z.
Local chain data: 2018-06-30T16:07:32Z.
tezos-node: Error:
              Unix error in open: Permission denied

Can someone tell me why I am getting this error and how to fix it?

1 Answer 1

4

The error is due to the permissions of the node files in the docker volume.

To fix the problem, mount your volume and enter the container:

docker run -it --entrypoint=/bin/sh -v <volume>:/var/run/tezos/node tezos/tezos:v14.0

Then change the permissions, and delete the lock file:

cd /var/run/tezos/node/
sudo chown -R tezos.tezos .
rm data/lock

You can then upgrade the storage with your docker-compose file or with the following command:

docker run -v <volume>:/var/run/tezos/node tezos/tezos:v14.0 tezos-upgrade-storage

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.