[erlang-questions] mnesia sample of backup traversal - with change of node name

Sanjaya Vitharana sanjaya@REDACTED
Wed Apr 25 09:43:28 CEST 2007


Hi,

I wan't to make it work the sample "bup.erl" (code example doing backup traversal - with change of node name) which is located in example directory of mnesia.

But failed with 2 nodes. Where am I doing wrong ? Please guide me.

NOTE:
    Also note that the ping from node 1 to node 2 fails & node 2 to node 1 success

Thanks in advance.

Sanjaya Vitharana

-----------------------------------------------------------------------
Node 1

[root@REDACTED examples]# pwd
/usr/local/lib/erlang/lib/mnesia-4.3.3/examples
[root@REDACTED examples]# erl -sname db_nodes  -mnesia dir '"/usr/local/lib/erlang/lib/mnesia-4.3.3/examples/db_nodes"' -setcookie w
Erlang (BEAM) emulator version 5.5.2 [source] [async-threads:0] [hipe]

Eshell V5.5.2  (abort with ^G)
(db_nodes@REDACTED)1> nodes().
[]
(db_nodes@REDACTED)2> net_adm:ping(db_nodes@REDACTED).
pang
(db_nodes@REDACTED)3> nodes().
[db_nodes@REDACTED]
(db_nodes@REDACTED)4> c(bup).
./bup.erl:139: Warning: variable 'NewStartRes' is unused
./bup.erl:224: Warning: variable 'Oid' is unused
./bup.erl:232: Warning: variable 'CounterTab' is unused
{ok,bup}
(db_nodes@REDACTED)5> bup:test().

=INFO REPORT==== 22-Apr-2007::23:01:20 ===
    application: mnesia
    exited: stopped
    type: temporary
{schema,schema,
        [{name,schema},
         {type,set},
         {ram_copies,[]},
         {disc_copies,[db_nodes@REDACTED]},
         {disc_only_copies,[]},
         {load_order,0},
         {access_mode,read_write},
         {index,[]},
         {snmp,[]},
         {local_content,false},
         {record_name,schema},
         {attributes,[table,cstruct]},
         {user_properties,[]},
         {frag_properties,[]},
         {cookie,{{1177,261280,346825},db_nodes@REDACTED}},
         {version,{{2,0},[]}}]}.
{schema,bup_rec,
        [{name,bup_rec},
         {type,set},
         {ram_copies,[]},
         {disc_copies,[db_nodes@REDACTED]},
         {disc_only_copies,[]},
         {load_order,0},
         {access_mode,read_write},
         {index,[]},
         {snmp,[]},
         {local_content,false},
         {record_name,bup_rec},
         {attributes,[key,val]},
         {user_properties,[]},
         {frag_properties,[]},
         {cookie,{{1177,261280,330333},db_nodes@REDACTED}},
         {version,{{2,0},[]}}]}.
{bup_rec,9,81}.
{bup_rec,6,36}.
{bup_rec,7,49}.
{bup_rec,5,25}.
{bup_rec,4,16}.
{bup_rec,8,64}.
{bup_rec,3,9}.
{bup_rec,2,4}.
{bup_rec,10,100}.
{bup_rec,1,1}.
{error,{{badmatch,{error,{"Cannot install fallback",enoent}}},
        [{bup,test2,3},
         {bup,test,1},
         {erl_eval,do_apply,5},
         {shell,exprs,6},
         {shell,eval_loop,3}]}}
(db_nodes@REDACTED)6> 
-----------------------------------------------------------------------
Node 2

[root@REDACTED examples]# pwd
/usr/local/lib/erlang/lib/mnesia-4.2.3/examples
[root@REDACTED examples]# erl -sname db_nodes  -mnesia dir '"/usr/local/lib/erlang/lib/mnesia-4.2.3/examples/db_nodes"' -setcookie w
Erlang (BEAM) emulator version 5.4.12 [source] [hipe] [threads:0]

Eshell V5.4.12  (abort with ^G)
(db_nodes@REDACTED)1> nodes().
[]
(db_nodes@REDACTED)2> net_adm:ping(db_nodes@REDACTED).
pong
(db_nodes@REDACTED)3> nodes().
[db_nodes@REDACTED]
(db_nodes@REDACTED)4> 
-----------------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20070425/31c38ce7/attachment.htm>


More information about the erlang-questions mailing list