Unable to run replica due to main panicked at crypto keystore path

Hello,

I am currently unable to run the replica need to deploy my project.

When running the dfx start command in my terminal it returns this code.

Dec 19 09:50:54.211 INFO Executing “/home/mrpink/.cache/dfinity/versions/0.8.4/replica” “–replica-version” “0.8.0” “–config-file” “/mnt/c/Users/Angel/hello1/.dfx/state/replicated_state/ic.json5”, Application: starter
thread ‘main’ panicked at ‘crypto keystore path /mnt/c/Users/Angel/hello1/.dfx/state/replicated_state/node-100/crypto has permissions 0o40777, allowing reading by others’, crypto/internal/crypto_service_provider/src/secret_key_store/proto_store.rs:250:13
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
thread ‘replica-actor’ panicked at ‘called Result::unwrap() on an Err value: Cannot start the replica: Timeout’, src/dfx/src/actors/replica.rs:274:78
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace

In another window when i try to then use dfx deploy it returns this error.
An error happened during communication with the replica: error sending request for url (http://127.0.0.1:8000/api/v2/status): error trying to connect: tcp connect error: Connection refused (os error 111)

any help is appreciated,
Thank you MrPink

It looks like you’re running in WSL on Windows, you’ll need to store your projects in the WSL file system itself eg ~/ic-projects/, not on the mounted windows drives (which causes file permission issues). Once the replica’s running properly the connection refused error in the second terminal should be resolved too.

More tips for using WSL are in this thread here, if they’re useful: https://forum.dfinity.org/t/native-windows-support/1241/2?u=ori

2 Likes

Ori you damn genius thank you. I should just asked in the first place instead of spending 3 hours feeling like the ape from space odyssey.

Thank you,

2 Likes