Ca.cert: no such file or directory

Hi all.

I’m trying to set up Storj on Ubuntu 18.04 and got as far as signing the identity but get the error:

2020-04-16T10:09:52.333Z	INFO	running on version v1.1.1
Error: file or directory not found error: open /home/rwardrup/.local/share/storj/identity/storagenode/ca.cert: no such file or directory

I’ve checked, and the ca and identity files all exist in ~/.local/share/storj/identity/storagenode. I was wondering if anyone here has any idea what’s going on. Maybe this is a permissions issue?

@minorsecond welcome to our forum!

Yes, it may be a problem with the permissions on such a directory or file.

Can you, please, list the permissions of the files in that directory (.i.e. ls -la /home/rwardrup/.local/share/storj/identity/storagenode) and post them here


-rw-r--r-- 1 rwardrup rwardrup  518 Apr 14 22:13 ca.cert
-rw------- 1 rwardrup rwardrup  241 Apr 14 22:13 ca.key
-rw-r--r-- 1 rwardrup rwardrup 1.1K Apr 14 22:13 identity.cert
-rw------- 1 rwardrup rwardrup  241 Apr 14 22:13 identity.key

Can you, please, post the command that you’re running with all the flags that you’re passing and the full output?

rwardrup@storj:~$ identity authorize storagenode <email:key>
2020-04-16T10:38:47.961Z	INFO	running on version v1.1.1
Error: file or directory not found error: open /home/rwardrup/.local/share/storj/identity/storagenode/ca.cert: no such file or directory

In case it’s not obvious, I’ve replaced my email and key with the placeholder. I’m not running it with “email:key

I cannot reproduce it.

The only that I can tell you is that if for whatever reason the user running identity doesn’t have permissions to access to the directory containing the files the error is the same Error: file or directory not found.....

Can you tell me what the permissions are for your ca and identity files?

Did you mistype the word storagenode as stroagenode?
Yes a guess.

I reproduced with the Linux binary published in the last release.

We are investigating what’s going on.

1 Like

I found the issue.
I can reproduce the problem if I use a generated identity with a difficulty less than 36, if I use one with 36 I can authorize the identity without any problem.

So the bug is in the error message.

@minorsecond please make sure that you use an identity with a difficulty of 36 at least, that’s a requirement.

Is there an option to use anything less than 36? I think it did reach 36. I’ll run it again and report back.

No, there isn’t.
It’s a proof of work and we require it for protecting the network.

Depending of the power of your machine can take from 1 hour to several days.
For avoiding to wait for many hours, generate the identity in a powerful machine; don’t worry the identity isn’t associated to the machine hence you can generate it in one machine and use it in any other.

I’ve realized that the issue was not the difficulty.
If the difficulty is less than 36 I get the correct message:
Error: certificates peer error: authorization claim error: difficulty must be greater than: 35

What returned me the Error: file or directory not found... error message was to point my identity dir (i.e. using --identity-dir flag) to a path in my home directory using ~ shorthand. If I use the full extended absolute path /home/username/... then it works and I see the correct message.

The thing is that the application doesn’t handle the ~ for a reason that I don’t know now.

I create a ticket in our issue tracker for being attended in the future as it isn’t a high priority.

This is what I found, but as far as I understand in your comments, you’re not using the --identity-directory flag and the error message shows the absolute path without the ~ shorthand so I don’t know again what could be wrong in your environment.

Nonetheless, it’s certain that you need an identity with more than 35 of difficulty.

Please report back once you get an identity with more than 35 of difficulty and you try to authorize it despite if you succeed or not.

1 Like

I tried it with that flag using the previously generated identity and it worked. Thanks for looking into it!

1 Like