Skip to content
This repository has been archived by the owner on May 24, 2022. It is now read-only.

Error upgrading parity data: CannotCreateConfigPath #75

Closed
jwasinger opened this issue Oct 16, 2018 · 13 comments
Closed

Error upgrading parity data: CannotCreateConfigPath #75

jwasinger opened this issue Oct 16, 2018 · 13 comments
Assignees

Comments

@jwasinger
Copy link
Contributor

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
Copy link
Contributor Author

jwasinger commented Oct 16, 2018

Here's how I got around this:

  • Start up docker-compose up, get error
  • Do a dirty hack to make the mounted volumes writeable from within the client containers chmod a+rwx -R deployment/ data

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
Copy link
Collaborator

ddorgan commented Oct 17, 2018

@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
Copy link

bilonic commented Oct 18, 2018

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

@ddorgan
Copy link
Collaborator

ddorgan commented Oct 18, 2018

@bilonic thanks for that, let me check this.

@ddorgan ddorgan self-assigned this Oct 18, 2018
@branciard
Copy link
Contributor

branciard commented Oct 19, 2018

It is linked to this change in the last release :
"Docker: run parity as normal user"
openethereum/parity-ethereum#9689

When volumes are mount like this

  • ./data/1:/parity/data

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

The solution proposed in openethereum/parity-ethereum#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
Copy link
Collaborator

ddorgan commented Oct 21, 2018

@branciard please checkout the latest master and try again. Merged a pull request: #77 to fix.

@ddorgan
Copy link
Collaborator

ddorgan commented Oct 25, 2018

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

@branciard
Copy link
Contributor

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

@ddorgan
Copy link
Collaborator

ddorgan commented Oct 25, 2018

Great thanks for the reply.

@ddorgan ddorgan closed this as completed Oct 25, 2018
@armanfatahi
Copy link

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
Copy link
Collaborator

ddorgan commented Nov 1, 2018

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

@daithi-coombes
Copy link

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
Copy link

@daithi-coombes thanks, your solution solved the problem

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants