Skip to content

fix: address panic in dfx replica command#1338

Merged
mergify[bot] merged 5 commits intomasterfrom
pshahi/fix-replica-command-panic
Jan 29, 2021
Merged

fix: address panic in dfx replica command#1338
mergify[bot] merged 5 commits intomasterfrom
pshahi/fix-replica-command-panic

Conversation

@p-shahi
Copy link
Contributor

@p-shahi p-shahi commented Jan 27, 2021

The dfx replica command panics because it tries to write the replica-pid to a nonexistent replica-configuration directory

Before:

dfx replica
  Version v0.6.20-15-gb2eab11 installed successfully.
thread 'replica-actor' panicked at 'Could not write to replica-pid file.: Os { code: 2, kind: NotFound, message: "No such file or directory" }', src/dfx/src/actors/replica.rs:290:13
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Jan 27 23:11:00.823 INFO ic-starter. Configuration: ValidatedConfig { replica_path: Some("/Users/prithvishahi/.cache/dfinity/versions/0.6.20-15-gb2eab11/replica"), replica_version: "0.1.0", log_level: Warning, subnet_id: fscpm-uiaaa-aaaaa-aaaap-yai, cargo_bin: "cargo", cargo_opts: "", state_dir: "/Users/prithvishahi/dev/ic-projects/tmp/hello/.dfx/state/replicated_state", http_listen_addr: V4(127.0.0.1:8080), http_port_file: None, metrics_addr: None, hypervisor_create_funds_whitelist: "*", artifact_pool_dir: "/Users/prithvishahi/dev/ic-projects/tmp/hello/.dfx/state/replicated_state/node-100/ic_consensus_pool", crypto_root: "/Users/prithvishahi/dev/ic-projects/tmp/hello/.dfx/state/replicated_state/node-100/crypto", state_manager_root: "/Users/prithvishahi/dev/ic-projects/tmp/hello/.dfx/state/replicated_state/node-100/state", registry_file: "/Users/prithvishahi/dev/ic-projects/tmp/hello/.dfx/state/replicated_state/registry.proto", bootstrap_registry: None, state_dir_holder: None }, Application: starter
Jan 27 23:11:00.823 INFO Initialize replica configuration "/Users/prithvishahi/dev/ic-projects/tmp/hello/.dfx/state/replicated_state/ic.json5", Application: starter
Jan 27 23:11:00.842 INFO Executing "/Users/prithvishahi/.cache/dfinity/versions/0.6.20-15-gb2eab11/replica" "--replica-version" "0.1.0" "--config-file" "/Users/prithvishahi/dev/ic-projects/tmp/hello/.dfx/state/replicated_state/ic.json5", Application: starter
Jan 27 23:11:01.891 ERRO s:fscpm-uiaaa-aaaaa-aaaap-yai/n:inmtb-omw6w-7ek54-igna6-ygf5t-hw56y-qn4uj-ighc2-wm45g-mvf2u-2ae/ic_messaging/xnet_endpoint No XNet configuration for node inmtb-omw6w-7ek54-igna6-ygf5t-hw56y-qn4uj-ighc2-wm45g-mvf2u-2ae. This is an error in production, but may be ignored in single-subnet test deployments.
Jan 27 23:11:02.894 WARN s:fscpm-uiaaa-aaaaa-aaaap-yai/n:inmtb-omw6w-7ek54-igna6-ygf5t-hw56y-qn4uj-ighc2-wm45g-mvf2u-2ae/ic_http_handler/ic_http_handler NNS subnet not found in network topology. Skipping fetching the delegation.
^CStopping the replica...
Stopped.

After:

dfx replica
Jan 27 23:29:44.273 INFO ic-starter. Configuration: ValidatedConfig { replica_path: Some("/Users/prithvishahi/.cache/dfinity/versions/0.6.21-dirty/replica"), replica_version: "0.1.0", log_level: Warning, subnet_id: fscpm-uiaaa-aaaaa-aaaap-yai, cargo_bin: "cargo", cargo_opts: "", state_dir: "/Users/prithvishahi/dev/ic-projects/tmp/hello/.dfx/state/replicated_state", http_listen_addr: V4(127.0.0.1:8080), http_port_file: None, metrics_addr: None, hypervisor_create_funds_whitelist: "*", artifact_pool_dir: "/Users/prithvishahi/dev/ic-projects/tmp/hello/.dfx/state/replicated_state/node-100/ic_consensus_pool", crypto_root: "/Users/prithvishahi/dev/ic-projects/tmp/hello/.dfx/state/replicated_state/node-100/crypto", state_manager_root: "/Users/prithvishahi/dev/ic-projects/tmp/hello/.dfx/state/replicated_state/node-100/state", registry_file: "/Users/prithvishahi/dev/ic-projects/tmp/hello/.dfx/state/replicated_state/registry.proto", bootstrap_registry: None, state_dir_holder: None }, Application: starter
Jan 27 23:29:44.273 INFO Initialize replica configuration "/Users/prithvishahi/dev/ic-projects/tmp/hello/.dfx/state/replicated_state/ic.json5", Application: starter
Jan 27 23:29:44.294 INFO Executing "/Users/prithvishahi/.cache/dfinity/versions/0.6.21-dirty/replica" "--replica-version" "0.1.0" "--config-file" "/Users/prithvishahi/dev/ic-projects/tmp/hello/.dfx/state/replicated_state/ic.json5", Application: starter
Jan 27 23:29:45.549 ERRO s:fscpm-uiaaa-aaaaa-aaaap-yai/n:jgers-sv5te-lhyuh-5mgor-6jx2b-5j22n-yrl4c-n22a7-4sfy7-xbbmh-6qe/ic_messaging/xnet_endpoint No XNet configuration for node jgers-sv5te-lhyuh-5mgor-6jx2b-5j22n-yrl4c-n22a7-4sfy7-xbbmh-6qe. This is an error in production, but may be ignored in single-subnet test deployments.
Jan 27 23:29:46.554 WARN s:fscpm-uiaaa-aaaaa-aaaap-yai/n:jgers-sv5te-lhyuh-5mgor-6jx2b-5j22n-yrl4c-n22a7-4sfy7-xbbmh-6qe/ic_http_handler/ic_http_handler NNS subnet not found in network topology. Skipping fetching the delegation.
^CStopping the replica...
Stopped.

…lica-pid to a nonexistent replica-configuration directory
@p-shahi p-shahi requested a review from a user January 27, 2021 23:35
@mergify mergify bot merged commit 9415779 into master Jan 29, 2021
@mergify mergify bot deleted the pshahi/fix-replica-command-panic branch January 29, 2021 22:44
mergify bot pushed a commit that referenced this pull request Aug 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant