Error starting master database

Trying to create a new node on an existing and running node server.
It is Linux without docker. Current node is running without issues.
Duplicated all required node files, created new identity, signed it etc.
Edited all paths in config.yaml etc. for the new node.
Now when starting it I get: “Error starting master database on storagenode.” It complains dirs blobs, temp, garbage and trash are missing.
It reflects correct new storage path.
When I create those dirs manually it complains that database files do not exist.

What additional setting is required to get the second node running? It seems that I am missing something.

1 Like

Did you follow this guide ?

No, it is not a Docker setup. But basically with new identity and own token, yes. What I basically did is setting up a second node the same way like the first running node with its own identity, token and paths. But for some reason there is an issue with the correct setup of the database/folders.

Anyone with an idea how to solve it?
It seems that databases do not get created. Is there a way to create all of them manually to see if this will make it work?

After some fiddling around it seems to be working. It looks like the issue is related to this one here: Error starting master database on storagenode: storage node database error: unable to open database file: operation not permitted

When I started up the node with an executable version 1.6.4 all databases got created correctly and the server started.
So indeed it seems that there are permission issues with the latest version. After creating of all databases and fixing some of the permissions of the files that get created during startup that led to some further error messages, the node finally started successsfuly.

So to me it looks that something is broken in the latest update that prevents the node from creating the required databases and files.

One thing remains: How do I access the dashboard for the second node (cli). Executing the dashboard run file with second node config path still shows dashboard from first node. I guess I have to pass the correct port somehow.

To setup a second node without a docker, you should not start the storagenode right away, you should setup it first (tip storagenode setup --help).
The setup could not work, if the destination dir (--config-dir parameter) contains config.yaml.

Since you do not use a docker, you do not have any isolation from the other storagenode, so, you should use all bindings with a different ports.
In this case you missed the server.private-address: parameter, it should use an own port, not default one. And when you call a dashboard, you should specify this address include port with an --address parameter.
Also please check the server.address:, it should bind to the different port as well. It can use the same port as an contact.external-address: parameter, but it must be a different from the first node.

Yes I had changed all ports of the second node to not interfere with the first node.
Now with the address flag added I can open the dashboard for the second node. So this is resolved now.

But this is not a solution to the database issue, or am I missing something? Because all ports had been already changed, so it should not have interfered with the first node and only version 1.6.4 storagenode executable was able to create the databases as expected.

Have you run a storagenode setup?

No. I did not. I had ran a version 1.6.4 binary which was able to perform all the tasks that the current binary did not.

Please, try it in the next time :slight_smile:
Do you know that there is development process and everything got changed from time to time? :wink:

I have no idea what storagenode setup will do and I could not find any docs on that command besides the help output but this does not explain anything else than what flags that can be used.
Will that command create the database files that were missing? An why does the current binary not create the databases while the 1.6.4 version was able to create them without issues? I mean to change the code so that required databases are not getting created is a bit surprising.

Only if there is no databases at all, include folder storage and config.yaml

I see. And with --storage.path string I can set the path where to create them?

So the problem was that when I copied the storage folder and the config.yaml from the existing node this prevented the creation of the database although the folder was empty and the config.yaml content had been adjusted to not to interfere with the existing node. Is that correct?

Yes. All correct.
If you were would not creating neither of them - your setup would be ok.