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 #76

Closed
drandreaskrueger opened this issue Oct 20, 2018 · 24 comments
Closed

Error upgrading parity data: CannotCreateConfigPath #76

drandreaskrueger opened this issue Oct 20, 2018 · 24 comments
Assignees
Labels

Comments

@drandreaskrueger
Copy link

drandreaskrueger commented Oct 20, 2018

git clone https://github.com/paritytech/parity-deploy.git paritytech_parity-deploy
cd paritytech_parity-deploy
./parity-deploy.sh --config dev --name instantseal --geth
docker-compose up

results in

Pulling host1 (parity/parity:stable)...
stable: Pulling from parity/parity
3b37166ec614: Pull complete
504facff238f: Pull complete
ebbcacd28e10: Pull complete
c7fb3351ecad: Pull complete
2e3debadcbf7: Pull complete
7f6af3eb31f4: Pull complete
f3f7881c4019: Pull complete
50d35ce58406: Pull complete
9a3b96a0f918: Pull complete
1fe9fb6fb58c: Pull complete
c83743d94dd0: Pull complete
969cd73ce977: Pull complete
c74e70272632: Pull complete
Digest: sha256:20eccf6b6d28fa0e5f14b6b5dd3b63625e17e8114e098b40dceec2bf5ee154e4
Status: Downloaded newer image for parity/parity:stable
Creating host1 ... done
Attaching to host1
host1    | Loading config file from /parity/authority.toml
host1    | Error upgrading parity data: CannotCreateConfigPath
host1 exited with code 1
@drandreaskrueger
Copy link
Author

this solves it for me

git clone https://github.com/paritytech/parity-deploy.git paritytech_parity-deploy
cd paritytech_parity-deploy
./parity-deploy.sh --config dev --name instantseal --geth

sed -i 's/parity:stable/parity:v1.11.11/g' docker-compose.yml
docker-compose up

@ddorgan
Copy link
Collaborator

ddorgan commented Oct 21, 2018

@drandreaskrueger can you please re-try with the latest master. See: #77

@ddorgan ddorgan self-assigned this Oct 21, 2018
@ddorgan ddorgan added the bug label Oct 21, 2018
@ddorgan
Copy link
Collaborator

ddorgan commented Oct 21, 2018

@drandreaskrueger yes older versions of the docker image ran as root rather than the parity user. The PR merged fixes some permission issues due to this change.

@drandreaskrueger
Copy link
Author

can you please re-try ...

yes - but perhaps not before November.
I am traveling, web3summit & devcon. Greetings from Berlin.

Actually, are you in Berlin? Then we should meet in person!

@ddorgan
Copy link
Collaborator

ddorgan commented Oct 21, 2018

sudo rm -rf data && ./parity-deploy.sh --config aura --nodes 2 && docker-compose up ?? :-)

Yes I will be at the web3 summit, it would be great to speak to you in person.

@drandreaskrueger
Copy link
Author

drandreaskrueger commented Oct 22, 2018

sudo rm -rf data ....

Thanks. I think I had done sudo ./clean.sh and that does rm -rf data ... strange.

Will try again, but probably only after devcon?

would be great to speak to you in person.

yesyesyes.
Already met Afri yesterday. Perhaps he can point me out to you.
Or look at my twitter avatar, to recognize me. Specifically changed it for this purpose tonight ;-)

@ddorgan
Copy link
Collaborator

ddorgan commented Oct 25, 2018

Can I close this one?

@jwasinger
Copy link
Contributor

jwasinger commented Oct 26, 2018

I'm still seeing this issue running ./parity-deploy.sh --config dev

@drandreaskrueger
Copy link
Author

David, we also saw this last Thursday. You had a very quick fix for it though.

@ilhanu
Copy link

ilhanu commented Oct 31, 2018

Is there some sort of a quick-fix for this?

@ddorgan
Copy link
Collaborator

ddorgan commented Oct 31, 2018

@ilhanu sure, basically do a chown -R on the data dir to the user you're running docker as.

In parity-deploy if you create a new data dir (e.g. after a clean.sh) it will now mkdir the data dirs before starting the container the first time. This works around the permissions issue inside the container.

@ddorgan
Copy link
Collaborator

ddorgan commented Nov 1, 2018

Closing issue.

@ddorgan ddorgan closed this as completed Nov 1, 2018
@drandreaskrueger
Copy link
Author

sudo chown $USER:$USER -R data

?

Couldn't you simply make this part of ./clean.sh somehow ?

@drandreaskrueger
Copy link
Author

Happy New Year :-)

@drandreaskrueger
Copy link
Author

drandreaskrueger commented Jan 18, 2019

Reappeared. See here #87 (comment)

Please try to invent a solution which does not need machine specific user interaction, otherwise it is hard to include parity-deploy.sh in other tools.

Thanks.

@drandreaskrueger
Copy link
Author

In parity-deploy if you create a new data dir (e.g. after a clean.sh) it will now mkdir the data dirs before starting the container the first time. This works around the permissions issue inside the container.

Just tried that, but ... nope:

PARITY_VERSION=v2.2.3

sudo rm -rf paritytech_parity-deploy
git clone https://github.com/paritytech/parity-deploy.git paritytech_parity-deploy
cd paritytech_parity-deploy/
git checkout 11b64e11cc9403101aa1e0db0bfbc72997e01a74

sudo ./clean.sh
mkdir data

./parity-deploy.sh -r $PARITY_VERSION --config dev --geth

sed -i 's/parity:stable/parity:'$PARITY_VERSION'/g' docker-compose.yml
docker-compose up

ends with

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

@drandreaskrueger
Copy link
Author

only when I do this, it works:

docker-compose up
sudo chmod -R 777 data
docker-compose up

but that means accepting that it fails once, and I do not know if it causes other problems later.

@drandreaskrueger
Copy link
Author

@ddorgan ?

@ddorgan
Copy link
Collaborator

ddorgan commented Jan 22, 2019

Can you please the branch in here: #94

@drandreaskrueger
Copy link
Author

Can you please the branch in here: #94

you merged that to master now, right?

@drandreaskrueger
Copy link
Author

Tried it out, just now:

PARITY_VERSION=v2.2.3
sudo rm -rf paritytech_parity-deploy
git clone https://github.com/paritytech/parity-deploy.git paritytech_parity-deploy
cd paritytech_parity-deploy
git log | head -n 5 
git checkout 1a6afd17ac75bdf6c9e9fefa1d3af13748dd9cfa
sudo ./clean.sh
./parity-deploy.sh -r $PARITY_VERSION --config dev --geth
sed -i 's/parity:stable/parity:'$PARITY_VERSION'/g' docker-compose.yml
docker-compose up

yes it works. Well done.

So I do not need to manually create

mkdir data

anymore?

@drandreaskrueger
Copy link
Author

and the following includes patches for v1.11.11:

PARITY_VERSION=v1.11.11
sudo rm -rf paritytech_parity-deploy
git clone https://github.com/paritytech/parity-deploy.git paritytech_parity-deploy
cd paritytech_parity-deploy
git log | head -n 5 
git checkout 1a6afd17ac75bdf6c9e9fefa1d3af13748dd9cfa

sudo ./clean.sh
sudo rm $(which parity)
./parity-deploy.sh -r $PARITY_VERSION --config dev --geth

sed -i 's/user:\ parity/user:\ root/g' docker-compose.yml 
sed -i 's/parity:stable/parity:'$PARITY_VERSION'/g' docker-compose.yml
docker-compose up

and ... it also works.

Cool, thanks a lot. Well done.

@drandreaskrueger
Copy link
Author

Now @ddorgan this issue can be closed lol.

@drandreaskrueger
Copy link
Author

drandreaskrueger commented Jan 22, 2019

instantseal

Why not store the above, and these blocks here for future testing purposes, when you improve this great tool:

aura

PARITY_VERSION=v2.2.3
sudo rm -rf paritytech_parity-deploy
git clone https://github.com/paritytech/parity-deploy.git paritytech_parity-deploy
cd paritytech_parity-deploy
git checkout 1a6afd17ac75bdf6c9e9fefa1d3af13748dd9cfa
sudo ./clean.sh
./parity-deploy.sh -r $PARITY_VERSION --config aura --nodes 4 --geth
sed -i 's/parity:stable/parity:'$PARITY_VERSION'/g' docker-compose.yml
docker-compose up
PARITY_VERSION=v1.11.11
sudo rm -rf paritytech_parity-deploy
git clone https://github.com/paritytech/parity-deploy.git paritytech_parity-deploy
cd paritytech_parity-deploy
git checkout 1a6afd17ac75bdf6c9e9fefa1d3af13748dd9cfa
sudo ./clean.sh
sudo rm $(which parity)
./parity-deploy.sh -r $PARITY_VERSION --config aura --nodes 4 --geth
sed -i 's/user:\ parity/user:\ root/g' docker-compose.yml 
sed -i 's/parity:stable/parity:'$PARITY_VERSION'/g' docker-compose.yml
docker-compose up

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

No branches or pull requests

4 participants