Cannot get my local test baby-fleming to write files

I do the following to make sure I have a fresh configuration:

safe auth logout // Makes sure account is logged out before authd is terminated
safe auth stop // Stop the authenticator
safe vault killall // Stop any running vaults
safe auth clear // Clear the authenticator config
safe config clear // Clear config
safe auth install // Install latest version and maybe set default config files
safe vault install // Install latest version and maybe set default config files
safe auth restart // Restart the authenticator
safe vault run-baby-fleming --testing // Run the local test vaults and wait until the CPU drops from 100% to idle.

This allows me to successfully generate keypairs, keys, but where it fail is at safe files put.
I’m not sure if this is due to a folder permission that is not sufficient or something else.

This is the error that I’m getting:

user@user:~$ safe auth logout
Sending logout action request to authd…
Logged out successfully

user@user:~$ safe auth stop
Stopping SAFE Authenticator daemon (safe-authd)…
Success, safe-authd (PID: 100581) stopped!
user@user:~$ safe vault killall
Success, all processes instances of safe_vault were stopped!

user@user:~$ safe auth clear
Credentials were succesfully cleared from /home/user/.local/share/safe-cli/credentials

user@user:~$ safe config clear

user@user:~$ safe auth install
Latest release found: safe-authd v0.0.11
[00:00:18] [========================================] 6.53MB/6.53MB (0s) Done
Installing safe-authd binary at /home/user/.safe/authd …
Setting execution permissions to installed binary ‘/home/user/.safe/authd/safe-authd’…

user@user:~$ safe vault install
Latest release found: safe_vault v0.25.1
[00:00:20] [========================================] 8.39MB/8.39MB (0s) Done
Installing safe_vault binary at /home/user/.safe/vault …
Setting execution permissions to installed binary ‘/home/user/.safe/vault/safe_vault’…

user@user:~$ safe auth restart
Stopping SAFE Authenticator daemon (safe-authd)…
No running safe-authd process (with PID 100581) was found
Starting SAFE Authenticator daemon (safe-authd)…
safe-authd started (PID: 100953)
Success, safe-authd restarted!

user@user:~$ safe vault run-baby-fleming --testing
Storing vaults’ generated data at /home/user/.safe/vault/baby-fleming-vaults
Launching local SAFE network…
Launching with vault executable from: /home/user/.safe/vault/safe_vault
Network size: 8 vaults
Launching genesis vault (#1)…
Genesis vault contact info: [“”]
Launching vault #2
Launching vault #3
Launching vault #4
Launching vault #5
Launching vault #6
Launching vault #7
Launching vault #8
Setting up authenticator against local SAFE network…
Stopping SAFE Authenticator daemon (safe-authd)…
Success, safe-authd (PID: 100953) stopped!
Starting SAFE Authenticator daemon (safe-authd)…
safe-authd started (PID: 101056)
Creating a SafeKey with test-coins…
Sending account creation request to authd…
Account was created successfully!
SafeKey created and preloaded with test-coins. Owner key pair generated:
Public Key = ad8cea5962be56cecf083495ee7d9eefba5b5c6fb7427558bbdc90a8adbeab03bcf7c3893ebf2c39365ab9bc9f9cd1d6
Secret Key = 30f157da4674426e9ed049f3cf58c809955f3414f36dba2662e388b0892b2b33

user@user:~$ Sending login action request to authd…
Logged in successfully
Authorising CLI application…
Waiting for authorising response from authd…
SAFE CLI app was successfully authorised
Credentials were stored in /home/user/.local/share/safe-cli/credentials

user@user:~$ safe auth status
Sending request to authd to obtain a status report…
| SAFE Authenticator status | |
| Authenticator daemon version | 0.0.11 |
| Logged in to a SAFE account? | Yes |
| Number of pending authorisation requests | 0 |
| Number of notifications subscribers | 0 |

user@user:~$ safe keypair
Key pair generated:
Public Key = a6fb5f2301f0fe640ca4d8de6535b9979083840208eeb799850afa7dbed29fef4dcafee308a1e8d9752965a5e70aaa85
Secret Key = 8719ca687bbde478835ffd09f07733c889f2cd715848e4ad0fda2d2dfd7e1842

user@user:~$ safe keys create --test-coins --preload 777
New SafeKey created at: “safe://hbyyyybj79ze1pyuyueqhgudefbuju46w966tihfofy7jgn7omabzdkdjy”
Preloaded with 777 coins
Key pair generated:
Public Key = a7bfba24d04c1343b8698d050cd33d7a9ff7a35e1605075261760bc06e350d204ba999c1dd3f9303cb6f493d67a4aef1
Secret Key = 1aa50214cca4566f312942d6b7c94af10c7139b029cf7aa31a712fcec5b78e5a

Apparently the commands like safe keys create and safe keypair are being returned pretty quickly and resolved successfully, but the safe files put seems to take a long time (time-out?) and then eventually returns:

user@user:~$ safe files put ./safetestfile.txt /safefolder
FilesContainer created at: “safe://hnyynyxafj63xcc5gizw1y9y9jpw9ap5sou9fqrrfrwh7z1y8boc7oinaebnc”
E ./safetestfile.txt <[Error] NetDataError - Failed to PUT Public ImmutableData: RequestTimeout - CoreError::RequestTimeout>

Which makes me think that the vaults that are building or using ton of CPU resources are unable to respond or maybe not yet finished? But the non-file commands are still able to respond.

Will these vaults keep running at 100% and increase memory until it runs out of memory?


Hey @ThreeSteps
Thanks for reaching out. Allow me to help you out here. It would be nice to see some logs from the vault processes as well. Could you repeat the above steps after setting the RUST_LOG env variable.

export RUST_LOG=safe=trace
// start network and put files

Could you share the terminal output and the contents of ~/.safe/vault/baby-fleming-vaults/safe-vault-*/safe_vault.log

Thanks in advance.

1 Like

Also, I’d try with removing the ~/.safe/vault/baby-fleming-vaults folder and trying to run the section again afterwards.

1 Like

So I’m able to put files successfully after the CPU is fully recovered to baseline when the run-baby-fleming --testing command is run.

Something that seems to be very important is when I do a fresh install of the .safe folder to NOT add or switch to any network, “e.g. safe networks switch my-network” or “safe networks switch shared-section”.
What I thought was that only the shared-section would not work due to it being offline/only for IGD routers, so I always created a local network called ‘my-network’ but this causes the CLI to throw permission errors for writing data. When I don’t add any network, like how .safe is installed by default, it allows me to do everything without errors!

I do the following then:
safe run-baby-fleming --testing
//Wait until CPU is done, can take quite some time…
safe auth restart
safe auth create-acc --test-coins
safe auth logout //This is important because it seems the account doesn’t login with --self-auth, this might be throwing permission errors
safe auth login --self-auth

Now I can successfully use all commands like safe files put myfile /mylocation


This topic was automatically closed after 60 days. New replies are no longer allowed.