Can't create coins, can also not debug

Using git version, master branch, localhost.
I’m not sure what I’m doing wrong here.

$ safe auth create --test-coins
Passphrase: 
Password: 
Sending request to authd to create a Safe...
[2020-12-07T10:28:08Z ERROR safe] sn_cli error: [Error] AuthdClientError - [Error] ClientError - Response not received: read error

I also have the issue that when I try to call the function in debug mode, input no longer responds.

$ RUST_LOG=debug safe auth create --test-coins
...
2020-12-07T10:25:15Z DEBUG sn_api::api::authd_client::authd_client_api] Creating new authd client for endpoint https://localhost:33000
Passphrase: [2020-12-07T10:25:15Z INFO  quinn::connection] drive; id=5
[2020-12-07T10:25:15Z INFO  quinn::connection] drive; id=4
...
3 Likes

I used to see that first error or something very similar intermittently with the released Baby Fleming. Then it would just go away, but I don’t think I figured out why. So maybe try again a few times, restart your machine even and see if you always get that.

3 Likes

Do you see any logs on authd side? it seems you are not getting response from authd and I guess cli eventually times out?

3 Likes

Where are the logs stored?

They should be at ~/.safe/authd/logs/sn_authd.log. You can also start authd in the foreground and see them in the stdout with safe-authd start --fg, I use this for debugging running it on a diff console.

3 Likes

I recreated the localhost file safe network add and restarted safe authd safe auth restart
I’m receiving a different error now.

$ safe auth create-acc --test-coins
Passphrase: 
Password: 
Creating a SafeKey with test-coins...
[2020-12-07T16:47:37Z ERROR safe] sn_cli error: [Error] ConnectionError - Application is not connected to the network

sn_authd.log

...
INFO 2020-12-07T14:45:58.842195344+01:00 [sn_authd/requests/mod.rs:77] Processing new incoming request (145767084): 'status'
INFO 2020-12-07T14:45:58.842253621+01:00 [sn_authd/requests/status.rs:29] Preparing authd status report...
INFO 2020-12-07T14:45:58.842304453+01:00 [sn_authd/requests/status.rs:55] Status report sent: AuthdStatus { logged_in: false, num_auth_reqs: 0, num_notif_subs: 0, authd_version: "0.0.11" }
INFO 2020-12-07T14:45:58.845307199+01:00 [sn_authd/authd.rs:161] Response sent, request 145767084 complete
INFO 2020-12-07T14:46:11.929444706+01:00 [sn_authd/requests/mod.rs:77] Processing new incoming request (3150267832): 'create-acc'
INFO 2020-12-07T14:46:11.929515964+01:00 [sn_authd/requests/create_acc.rs:25] Creating an account in SAFE...
...
INFO 2020-12-07T14:46:11.960753812+01:00 [/home/folaht/.cargo/git/checkouts/sn_client-ba0800b95f62001a/6b16e2d/src/client/mod.rs:130] Cliented started for pk: PublicKey::Ed25519(d91e4b..)
INFO 2020-12-07T14:46:11.962485320+01:00 [/home/folaht/.cargo/registry/src/github.com-1ecc6299db9ec823/quinn-0.6.1/src/connection.rs:228] drive; id=0
...
ERROR 2020-12-07T14:47:41.974168441+01:00 [sn_authd/requests/create_acc.rs:54] Error occurred when trying to create SAFE account: [Error] ClientError - QuicP2P error: Connection lost
ERROR 2020-12-07T14:47:41.974248273+01:00 [sn_authd/requests/mod.rs:120] Error when processing incoming 'create-acc' request with id 3150267832: [Error] ClientError - QuicP2P error: Connection lost
INFO 2020-12-07T14:47:41.974411808+01:00 [/home/folaht/.cargo/registry/src/github.com-1ecc6299db9ec823/quinn-0.6.1/src/connection.rs:228] drive; id=0
INFO 2020-12-07T14:47:41.975515660+01:00 [/home/folaht/.cargo/registry/src/github.com-1ecc6299db9ec823/quinn-0.6.1/src/connection.rs:228] drive; id=0
INFO 2020-12-07T14:47:41.976054688+01:00 [sn_authd/authd.rs:161] Response sent, request 3150267832 complete
INFO 2020-12-07T14:47:42.017433199+01:00 [/home/folaht/.cargo/registry/src/github.com-1ecc6299db9ec823/quinn-0.6.1/src/connection.rs:228] drive; id=0
INFO 2020-12-07T16:54:12.840581038+01:00 [sn_authd/operations.rs:144] Running authd instance from executable at "/home/folaht/.safe/authd/sn_authd"
INFO 2020-12-07T16:54:12.840742590+01:00 [sn_authd/operations.rs:150] authd instance starting (PID: 742331)...
INFO 2020-12-07T16:54:12.841090159+01:00 [sn_authd/operations.rs:178] Initialising SAFE Authenticator services...
INFO 2020-12-07T16:54:12.845877933+01:00 [sn_authd/authd.rs:84] Listening on [::1]:33000

You seem to be using latest released version of CLI, which won’t work with authd or sn_node built from master branches, you need to use all crates from the master branches to play with them.

5 Likes

I think it’s actually the other way around. I was still using the latest released version of authd on my client computer where I’m now testing whether the master branch works even locally.

Current situation:

$ safe auth create --test-coins
Passphrase: 
Password: 
Sending request to authd to create a Safe...
[2020-12-07T19:45:28Z ERROR safe] sn_cli error: [Error] AuthdClientError - [Error] ClientError - Response not received: read error

You need to run all authd, cli and sn-node from their master branches.

If you are not getting a response from authd please take a look at what the authd logs say, to see if it’s getting the request and what’s happening.

2 Likes

authd.log

INFO 2020-12-12T11:43:33.167618323+01:00 [sn_authd/operations.rs:144] Running authd instance from executable at "/home/folaht/.safe/authd/sn_authd"
INFO 2020-12-12T11:43:33.167844782+01:00 [sn_authd/operations.rs:150] authd instance starting (PID: 87610)...
INFO 2020-12-12T11:43:33.168045280+01:00 [sn_authd/operations.rs:178] Initialising SAFE Authenticator services...
INFO 2020-12-12T11:43:33.171014939+01:00 [sn_authd/authd.rs:84] Listening on [::1]:33000
INFO 2020-12-12T11:43:45.713145085+01:00 [/home/folaht/.cargo/registry/src/github.com-1ecc6299db9ec823/quinn-0.6.1/src/connection.rs:228] drive; id=0
INFO 2020-12-12T11:43:45.714219928+01:00 [/home/folaht/.cargo/registry/src/github.com-1ecc6299db9ec823/quinn-0.6.1/src/connection.rs:228] drive; id=0
INFO 2020-12-12T11:43:45.720647083+01:00 [/home/folaht/.cargo/registry/src/github.com-1ecc6299db9ec823/quinn-0.6.1/src/connection.rs:228] drive; id=0
INFO 2020-12-12T11:43:45.723893343+01:00 [sn_authd/requests/mod.rs:77] Processing new incoming request (3280305794): 'create'
INFO 2020-12-12T11:43:45.724083291+01:00 [sn_authd/requests/create.rs:25] Creating a Safe...
INFO 2020-12-12T11:43:45.723940913+01:00 [/home/folaht/.cargo/registry/src/github.com-1ecc6299db9ec823/quinn-0.6.1/src/connection.rs:228] drive; id=0
INFO 2020-12-12T11:43:45.725862505+01:00 [/home/folaht/.cargo/registry/src/github.com-1ecc6299db9ec823/quinn-0.6.1/src/connection.rs:228] drive; id=0
INFO 2020-12-12T11:43:45.726764325+01:00 [/home/folaht/.cargo/registry/src/github.com-1ecc6299db9ec823/quinn-0.6.1/src/connection.rs:228] drive; id=0
INFO 2020-12-12T11:43:45.727744505+01:00 [/home/folaht/.cargo/registry/src/github.com-1ecc6299db9ec823/quinn-0.6.1/src/connection.rs:228] drive; id=0
INFO 2020-12-12T11:43:46.865713698+01:00 [/home/folaht/.cargo/git/checkouts/sn_client-ba0800b95f62001a/03cd663/src/client/mod.rs:124] Client started for pk: PublicKey::Ed25519(d91e4b..)
INFO 2020-12-12T11:43:46.870799168+01:00 [/home/folaht/.cargo/registry/src/github.com-1ecc6299db9ec823/quinn-0.6.1/src/connection.rs:228] drive; id=0
INFO 2020-12-12T11:43:47.871885340+01:00 [/home/folaht/.cargo/registry/src/github.com-1ecc6299db9ec823/quinn-0.6.1/src/connection.rs:228] drive; id=0
INFO 2020-12-12T11:43:49.874677950+01:00 [/home/folaht/.cargo/registry/src/github.com-1ecc6299db9ec823/quinn-0.6.1/src/connection.rs:228] drive; id=0
INFO 2020-12-12T11:43:53.876232475+01:00 [/home/folaht/.cargo/registry/src/github.com-1ecc6299db9ec823/quinn-0.6.1/src/connection.rs:228] drive; id=0
INFO 2020-12-12T11:44:01.878094548+01:00 [/home/folaht/.cargo/registry/src/github.com-1ecc6299db9ec823/quinn-0.6.1/src/connection.rs:228] drive; id=0
INFO 2020-12-12T11:44:16.872033916+01:00 [/home/folaht/.cargo/registry/src/github.com-1ecc6299db9ec823/quinn-0.6.1/src/connection.rs:228] drive; id=0
ERROR 2020-12-12T11:44:16.873160229+01:00 [/home/folaht/.cargo/registry/src/github.com-1ecc6299db9ec823/qp2p-0.9.3/src/api.rs:247] Failed to bootstrap to the network: Connection lost
INFO 2020-12-12T11:44:16.880903603+01:00 [/home/folaht/.cargo/registry/src/github.com-1ecc6299db9ec823/quinn-0.6.1/src/connection.rs:228] drive; id=0
INFO 2020-12-12T11:44:17.881876560+01:00 [/home/folaht/.cargo/registry/src/github.com-1ecc6299db9ec823/quinn-0.6.1/src/connection.rs:228] drive; id=0
INFO 2020-12-12T11:44:19.884074699+01:00 [/home/folaht/.cargo/registry/src/github.com-1ecc6299db9ec823/quinn-0.6.1/src/connection.rs:228] drive; id=0
INFO 2020-12-12T11:44:23.885987730+01:00 [/home/folaht/.cargo/registry/src/github.com-1ecc6299db9ec823/quinn-0.6.1/src/connection.rs:228] drive; id=0
INFO 2020-12-12T11:44:31.888180669+01:00 [/home/folaht/.cargo/registry/src/github.com-1ecc6299db9ec823/quinn-0.6.1/src/connection.rs:228] drive; id=0
INFO 2020-12-12T11:44:46.882664425+01:00 [/home/folaht/.cargo/registry/src/github.com-1ecc6299db9ec823/quinn-0.6.1/src/connection.rs:228] drive; id=0
ERROR 2020-12-12T11:44:46.883569502+01:00 [/home/folaht/.cargo/registry/src/github.com-1ecc6299db9ec823/qp2p-0.9.3/src/api.rs:247] Failed to bootstrap to the network: Connection lost
INFO 2020-12-12T11:44:46.890488657+01:00 [/home/folaht/.cargo/registry/src/github.com-1ecc6299db9ec823/quinn-0.6.1/src/connection.rs:228] drive; id=0
INFO 2020-12-12T11:44:47.891874858+01:00 [/home/folaht/.cargo/registry/src/github.com-1ecc6299db9ec823/quinn-0.6.1/src/connection.rs:228] drive; id=0
INFO 2020-12-12T11:44:49.893332296+01:00 [/home/folaht/.cargo/registry/src/github.com-1ecc6299db9ec823/quinn-0.6.1/src/connection.rs:228] drive; id=0
INFO 2020-12-12T11:44:53.895372560+01:00 [/home/folaht/.cargo/registry/src/github.com-1ecc6299db9ec823/quinn-0.6.1/src/connection.rs:228] drive; id=0
INFO 2020-12-12T11:45:01.897417794+01:00 [/home/folaht/.cargo/registry/src/github.com-1ecc6299db9ec823/quinn-0.6.1/src/connection.rs:228] drive; id=0
INFO 2020-12-12T11:45:16.892492305+01:00 [/home/folaht/.cargo/registry/src/github.com-1ecc6299db9ec823/quinn-0.6.1/src/connection.rs:228] drive; id=0
ERROR 2020-12-12T11:45:16.893548845+01:00 [/home/folaht/.cargo/registry/src/github.com-1ecc6299db9ec823/qp2p-0.9.3/src/api.rs:247] Failed to bootstrap to the network: Connection lost
ERROR 2020-12-12T11:45:16.893931626+01:00 [sn_authd/requests/create.rs:55] Error occurred when trying to create a Safe: [Error] ClientError - QuicP2P error: BootstrapFailure
ERROR 2020-12-12T11:45:16.894082376+01:00 [sn_authd/requests/mod.rs:120] Error when processing incoming 'create' request with id 3280305794: [Error] ClientError - QuicP2P error: BootstrapFailure

The test net is a days away, just wait until they have stabilised the code base, so you can git pull a tagged expected to work revision of each component.
If you have problems at that point, then its worth MaidSafe investigating to find the issue.

4 Likes

Are you sure it will only be a couple of days?
What still needs to be done?

They said so, the GitHub activity looks like they are attempting to meet that pledge. Can we really ask anymore of them?

5 Likes

Ok, it seems you have an issue with connecting with your local section.

Perhaps you wanna remove ~/.safe/node/local-test-network before starting again you local section.

Then try starting it again with: cargo run --bin launch_network --release --features=simulated-payouts -- -vv (using master branch), then you can take a look at some of the nodes’ logs to see if it’s receiving the connection from authd, e.g. for genesis you can look at ~/.safe/node/local-test-network/sn-node-genesis/sn_node.log.

You can test connectivity directly from CLI as well, by running $ safe keys create --test-coins, if that works authd should then have no issues with connecting with the network.

It’s also worth checking the connection information is being written correctly by sn-node at ~/.safe/node/node_connection_info.config, it should contain "127.0.0.1:12000".

2 Likes

That works.
Is using launch_network the only way the nodes can be run currently?

You could use the sn_node binary and pass the same args as the tool does, or copy the sn_node binary to ~/.safe/node/ and then use CLI $ safe node run-baby-fleming

2 Likes
$ cargo run --bin launch_network --release --features=simulated-payouts --
    Finished release [optimized] target(s) in 0.79s
[folaht@pjehrsohmehj sn_node-0.25.11]$ cd target
[folaht@pjehrsohmehj target]$ cd release/
[folaht@pjehrsohmehj release]$ mv sn_node ~/.safe/node/
[folaht@pjehrsohmehj release]$ safe node killall
Success, all processes instances of sn_node were stopped!
[folaht@pjehrsohmehj release]$ safe node run-baby-fleming
Storing nodes' generated data at /home/folaht/.safe/node/baby-fleming-nodes
Launching local Safe network...
Launching with node executable from: /home/folaht/.safe/node/sn_node
Network size: 8 nodes
Launching genesis node (#1)...
Genesis node contact info: ["127.0.0.1:12000"]
Launching node #2...
Launching node #3...
Launching node #4...
Launching node #5...
Launching node #6...
Launching node #7...
Launching node #8...
Done!
[folaht@pjehrsohmehj release]$ safe auth restart
Stopping SAFE Authenticator daemon (sn_authd)...
Success, sn_authd (PID: 185496) stopped!
Starting SAFE Authenticator daemon (sn_authd)...
sn_authd started (PID: 224190)
Success, sn_authd restarted!
[folaht@pjehrsohmehj release]$ safe auth create --test-coins
Passphrase: 
Password: 
Sending request to authd to create a Safe...
[2020-12-17T06:12:08Z ERROR safe] sn_cli error: [Error] AuthdClientError - [Error] ClientError - Response not received: read error
2 Likes

Remember these two tips if you are not getting a response from authd, you can check with CLI directly to see if the network is responding, but also checking authd logs can tell you if there is something else happening apart from connectivity issue with local section.

Also, I’d recommend you pull latest code from these branches as we’ve been activelly working on them, so just to make sure you are working on the same codebase.

2 Likes

I think I’ll take the stable version for now again.
sn_cli 0.16 is just out.
I noticed sn_cli-0.16.0-x86_64-unknown-linux-gnu.tar.gz unpacked is still named safe and not sn_cli.

Also:

$ safe auth install
thread 'main' panicked at 'Cannot drop a runtime in a context where blocking is not allowed. This happens when a runtime is dropped from within an asynchronous context.', /home/folaht/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.24/src/runtime/blocking/shutdown.rs:51:21
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

https://github.com/maidsafe/sn_api/issues/655


Locally it works.


I don’t I need nodes to be anything more than localhost, just the cli access to the nodes via LAN.
So I have:

$ cat /home/folaht/.safe/cli/networks/shared_node_connection_info.config 
"192.168.178.23:12000"

sn_authd.log

ERROR 2020-12-18T09:55:08.902854535+01:00 [/home/bochaco/.cargo/registry/src/github.com-1ecc6299db9ec823/qp2p-0.9.6/src/api.rs:250] Failed to bootstrap to the network: Connection lost
ERROR 2020-12-18T09:55:08.903041483+01:00 [sn_authd/requests/create.rs:55] Error occurred when trying to create a Safe: [Error] ClientError - QuicP2P error: BootstrapFailure
ERROR 2020-12-18T09:55:08.903119484+01:00 [sn_authd/requests/mod.rs:120] Error when processing incoming 'create' request with id 2485994889: [Error] ClientError - QuicP2P error: BootstrapFailure

Have you tried wiping everything and following the instructions from the latest dev update? Even building from source is trivial to get a local ‘baby’ network running.

2 Likes