Mnesia folder

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Mnesia folder

Peter J Etheridge
dear list,
having recently discovered that nonode@nohost is an error, i now find a folder;

Mnesia.nonode@nohost

containing files;

DECISION_TAB.LOG
LATEST.LOG
etc

could this be because i did not name my node?

thank you in advance,
peter



_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Mnesia folder

Dániel Szoboszlay
This directory was created because you once called mnesia:create_schema/1 on a node called nonode@nohost (that is, on a non-distributed node).

By the way, nonode@nohost is not really an error, per se. Every Erlang node has a name (see erlang:node/0). For distributed nodes the name is important, because other nodes can find and connect to it via its name. But there can be non-distributed nodes too. They don't listen to incoming connections and don't attempt to connect to other nodes either. So their name is completely irrelevant, and by definition they are always called nonode@nohost. (It is also possible to stop and start distribution on a node without stopping it. If you do so, it will change its name.)

Now, the documentation sometimes calls nodes where distribution is running "alive, and nodes where it is stopped "not alive". These names may be a bit confusing. A "not alive" node is still alive in the sense that it is running and executing code. It is just not accessible to other nodes via the Erlang distribution protocol.

Back to Mnesia: Mnesia allows you to create a distributed database, but it can work perfectly on a single node as well. So it's even valid to use Mnesia on a non-distributed node. If you do so, you will get the directory you found. Of course, if you no longer want to use non-distributed nodes and don't need this DB instance, you can just delete it now.

Cheers,
Daniel

On Thu, 11 Jul 2019 at 07:39, Peter J Etheridge <[hidden email]> wrote:
dear list,
having recently discovered that nonode@nohost is an error, i now find a folder;

Mnesia.nonode@nohost

containing files;

DECISION_TAB.LOG
LATEST.LOG
etc

could this be because i did not name my node?

thank you in advance,
peter


_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Mnesia folder

Peter J Etheridge
Dear Daniel,

Noticing references in the manual without explanation, I had spent quite some time on search engines trying to understand nonode@nohost.

It is starting to make sense now i have read your answer.

Thank you, Daniel !

Happy coding,
Peter

----- Original Message -----
From:
"Dániel Szoboszlay" <[hidden email]>

To:
"Peter J Etheridge" <[hidden email]>
Cc:
"erlang-questions" <[hidden email]>
Sent:
Thu, 11 Jul 2019 23:30:44 +0200
Subject:
Re: [erlang-questions] Mnesia folder


This directory was created because you once called mnesia:create_schema/1 on a node called nonode@nohost (that is, on a non-distributed node).

By the way, nonode@nohost is not really an error, per se. Every Erlang node has a name (see erlang:node/0). For distributed nodes the name is important, because other nodes can find and connect to it via its name. But there can be non-distributed nodes too. They don't listen to incoming connections and don't attempt to connect to other nodes either. So their name is completely irrelevant, and by definition they are always called nonode@nohost. (It is also possible to stop and start distribution on a node without stopping it. If you do so, it will change its name.)

Now, the documentation sometimes calls nodes where distribution is running "alive, and nodes where it is stopped "not alive". These names may be a bit confusing. A "not alive" node is still alive in the sense that it is running and executing code. It is just not accessible to other nodes via the Erlang distribution protocol.

Back to Mnesia: Mnesia allows you to create a distributed database, but it can work perfectly on a single node as well. So it's even valid to use Mnesia on a non-distributed node. If you do so, you will get the directory you found. Of course, if you no longer want to use non-distributed nodes and don't need this DB instance, you can just delete it now.

Cheers,
Daniel

On Thu, 11 Jul 2019 at 07:39, Peter J Etheridge <[hidden email]> wrote:
dear list,
having recently discovered that nonode@nohost is an error, i now find a folder;

Mnesia.nonode@nohost

containing files;

DECISION_TAB.LOG
LATEST.LOG
etc

could this be because i did not name my node?

thank you in advance,
peter


_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions