besu icon indicating copy to clipboard operation
besu copied to clipboard

Misleading error message when Besu cannot create parent directories

Open MadelineMurray opened this issue 5 years ago • 3 comments

When starting Besu will create a directory if the parent directories already exist but will not create parent directories. This is standard behavior that we do not want to change but a better error message would be helpful.

If parent directories are specified that do not exist, startup fails with the following error:

Cannot store generated private key.

This error message should indicate the actual issue: Cannot create multiple directories for $path

Probability: Remote Severity: Marginal

MadelineMurray avatar Mar 22 '20 21:03 MadelineMurray

Since raising this, it appears Besu does create multiple directories in some cases which is not the behaviour we want. ie, the following creates the three directories and the database inside dir3 besu --network=dev --data-path=dir1/dir2/dir3

MadelineMurray avatar Mar 22 '20 21:03 MadelineMurray

This also happens in other circumstances, notably when running in docker.

It's the "Correct Way To Do It" that besu doesn't use the root user within the docker image, but if the mounted datadir is non-writeable by the besu inside-docker user, then this error happens aswell.

holiman avatar Sep 11 '20 13:09 holiman

This also happens in other circumstances, notably when running in docker.

It's the "Correct Way To Do It" that besu doesn't use the root user within the docker image, but if the mounted datadir is non-writeable by the besu inside-docker user, then this error happens aswell.

This should now be fixed by https://github.com/hyperledger/besu/pull/7575 which sets permissions for data path inside docker image . Should this be issue be closed now ?

pullurib avatar Oct 04 '24 05:10 pullurib