-
Notifications
You must be signed in to change notification settings - Fork 1.7k
--config flag with custom path doesn't work on new release. #9791
Comments
@vietthang207 can you chown the data files and ensure they're owned by the user who's running the container and not the root user. Parity now runs as a non-root user in the container. |
I've added an issue regarding the uid used for parity which causes issues for host mounted volumes.
Just some suggestions as I've spent many hours debugging this, this past weekend. |
There was a breaking change that accidentally made it's way into the docker
setup that is a known issue atm (see #9689 for details) which means parity
is now running as the `parity` user in docker instead of root. You can fix
this by chown-ing the directories parity uses or mounting the volumes that
you are using with something like
```
volumes:
parity_data:
driver_opts:
o: uid=1000,gid=1000
```
…On Mon, 22 Oct 2018, 09:50 vietthang207, ***@***.***> wrote:
*Before filing a new issue, please provide the following information.*
- *Parity Ethereum version*: 2.0.7
- *Operating system*: Linux
- *Installation*: docker
- *Fully synchronized*: yes
- *Network*: ethereum & ropsten ...
- *Restarted*: yes
*Your issue description goes here below. Try to include actual vs.
expected behavior and steps to reproduce the issue.*
I've encounter this error from version 2.0.7 and above:
Oct 22 06:58:23 ip-172-31-43-223 docker[8992]: There was an error reading
your config file at: /root/.local/share/io.parity.ethereum/config.toml
Oct 22 06:58:23 ip-172-31-43-223 docker[8992]: Config doesn't match any
presets [dev, mining, non-standard-ports, insecure, dev-insecure]
My parity config is put at /var/lib/parity-ethereum/config.toml
I ran parity using a systemd service:
[Unit]
Description=Parity Ethereum Node
After=docker.service
Requires=docker.service
[Service]
Restart=on-failure
ExecStart=/usr/bin/docker run --name parity-ethereum \
--publish 8545:8545 \
--publish 30303:30303 \
--publish 30303:30303/udp \
--volume /var/lib/parity-ethereum/:/root/.local/share/io.parity.ethereum/ \
parity/parity:v2.0.7 \
--config /root/.local/share/io.parity.ethereum/config.toml \
--base-path /root/.local/share/io.parity.ethereum/
ExecStop=/usr/bin/docker stop -t 10 parity-ethereum
ExecStopPost=/usr/bin/docker rm -f parity-ethereum
[Install]
WantedBy=default.target
Which is basically equivalent to this command:
docker run --name parity-ethereum
--publish 8545:8545
--publish 30303:30303
--publish 30303:30303/udp
--volume /var/lib/parity-ethereum/:/root/.local/share/io.parity.ethereum/
parity/parity:v2.0.7
--config /root/.local/share/io.parity.ethereum/config.toml
--base-path /root/.local/share/io.parity.ethereum/
I've tried docker tags stable, v2.0.7, v2.0.8, they all shows the same
error. I've also tried v2.1.2 and 2.1.3 (which I believe are beta versions).
When I switch to v2.0.6, parity works fine and being able to synchronize
without error. I think some how --config flag assume that I use a preset
despite the fact that it is a custom config path.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#9791>, or mute the
thread
<https://github.com/notifications/unsubscribe-auth/ApCeIQyHL3Q0vnGcaGddFdXXjDoa6Jbqks5unXjSgaJpZM4Xy9Ci>
.
--
This communication and any attachments are confidential.
|
@ddorgan @joshua-mir @amaurer I don't think this is the root cause of this problem as the permission of the directories are 0755, and of config.toml is 0644, so I'm sure that everyone can read them. Update: Also I've ran docker as root. |
@vietthang, you are mounting the docker volume as root (inside the docker container), while the parity executable (inside the container) is running as user parity/uid 1000. It wouldn't matter what permissions these files have outside of the container. |
@vietthang207 did correcting the permissions help with this issue? |
@ddorgan @joshua-mir Thank you, I didn't notice that the destination path is /root. I changed it to /home/parity/io.parity.ethereum and it works fine on 2.0.7 and 2.0.8. |
@vietthang207 ok great, closing the issue. |
I'm having the same issue on 2.1.3 using: docker run -ti --name ethereum-node --restart=always -v ~/.local/share/io.parity.ethereum/docker/:/home/parity/.local/share/io.parity.ethereum/ -p 8545:8545 -p 8546:8546 -p 30303:30303 -p 30303:30303/udp parity/parity:v2.1.3 --ui-interface all --jsonrpc-interface all --pruning fast --base-path /home/parity/.local/share/io.parity.ethereum/ |
Before filing a new issue, please provide the following information.
Your issue description goes here below. Try to include actual vs. expected behavior and steps to reproduce the issue.
I've encounter this error from version 2.0.7 and above:
Oct 22 06:58:23 ip-172-31-43-223 docker[8992]: There was an error reading your config file at: /root/.local/share/io.parity.ethereum/config.toml
Oct 22 06:58:23 ip-172-31-43-223 docker[8992]: Config doesn't match any presets [dev, mining, non-standard-ports, insecure, dev-insecure]
My parity config is put at /var/lib/parity-ethereum/config.toml
I ran parity using a systemd service:
Which is basically equivalent to this command:
docker run --name parity-ethereum
--publish 8545:8545
--publish 30303:30303
--publish 30303:30303/udp
--volume /var/lib/parity-ethereum/:/root/.local/share/io.parity.ethereum/
parity/parity:v2.0.7
--config /root/.local/share/io.parity.ethereum/config.toml
--base-path /root/.local/share/io.parity.ethereum/
I've tried docker tags stable, v2.0.7, v2.0.8, they all shows the same error. I've also tried v2.1.2 and 2.1.3 (which I believe are beta versions).
When I switch to v2.0.6, parity works fine and being able to synchronize without error. I think some how --config flag assume that I use a preset despite the fact that it is a custom config path.
The text was updated successfully, but these errors were encountered: