openethereum / parity-deploy

Parity deployment script.
Apache License 2.0
81 stars 52 forks source link

Error upgrading parity data: CannotCreateConfigPath #75

Closed jwasinger closed 6 years ago

jwasinger commented 6 years ago

Here's what I did:

 ./parity-deploy.sh --config aura
docker-compose up

Here's what I see:

Attaching to host1
host1    | Loading config file from /parity/authority.toml
host1    | Error upgrading parity data: CannotCreateConfigPath
host1 exited with code 1

I'm running everything as root user on a VM.

jwasinger commented 6 years ago

Here's how I got around this:

Another detail: I'm running these containers on a Virtualbox Ubuntu:Xenial VM hosted on a windows 10 host.

What environment is parity-deploy known to work in without these volume permission errors? I have a hunch that I will get better results using a VM running on a linux host or running docker directly on the host machine.

ddorgan commented 6 years ago

@jwasinger I normally run them on VM's directly and don't see these issues. Is your user a member of the docker group? e.g. can you run docker run myimage without sudo?

bilonic commented 6 years ago

This error happens on parity v2.0.7 and later. With parity v2.0.6 and lower works fine.

ddorgan commented 6 years ago

@bilonic thanks for that, let me check this.

branciard commented 6 years ago

It is linked to this change in the last release : "Docker: run parity as normal user" https://github.com/paritytech/parity-ethereum/pull/9689

When volumes are mount like this

The folder will be created as root and parity user cannot write/access it.

The solution proposed in https://github.com/paritytech/parity-ethereum/pull/9689 is to create

RUN mkdir -p /home/parity/.local/share/io.parity.ethereum/ in the dockerfile

But in our case we will not be able to use -d /parity/data anymore ...

ddorgan commented 6 years ago

@branciard please checkout the latest master and try again. Merged a pull request: https://github.com/paritytech/parity-deploy/pull/77 to fix.

ddorgan commented 6 years ago

@branciard any update on this...Or will I just close the issue?

branciard commented 6 years ago

Yes perfect @ddorgan. I just test and it is ok with the parity user added to docker-compose and new folders targeted. Thanks !

ddorgan commented 6 years ago

Great thanks for the reply.

armanfatahi commented 6 years ago

This was because of lack of permissions on the volumes. Just notice that the volume might have been created using root user.

host1 | Error upgrading parity data: CannotCreateConfigPath

ddorgan commented 6 years ago

@armanfatahi yip, fixed in the latest master (when creating from scratch) or do a one time chown for existing setups.

daithi-coombes commented 5 years ago

Issue still persists on stable and nightly. I had to change the user to root to get it working

version: "3"

services:
  parity:
    image: parity/parity:nightly
    ports:
      - 8545:8545
      - 8546:8546
      - 30303:30303
      - 30303:30303/udp
    user: root
    volumes:
      - ./io.parity.ethereum:/root/.local/share/io.parity.ethereum
    command: --light --jsonrpc-apis 'web3,eth,pubsub,net,parity,parity_pubsub,traces,rpc,secretstore,shh,shh_pubsub' --jsonrpc-interface 0.0.0.0 --jsonrpc-hosts="all"
skinderis commented 5 years ago

@daithi-coombes thanks, your solution solved the problem