`
zdx3578
  • 浏览: 93043 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

erlang Bad cookie in table definition

 
阅读更多
merge_schema_failed,
                                      "Bad cookie in table definition rabbit_user_permission: 


参考这里:  http://www.joshdevins.net/2010/03/21/rabbitmq-cluster-auto-configuration-debugging/

 rm -rf /var/lib/rabbitmq/mnesia
应该是本地数据库要通过
mnesia:change_config(extra_db_nodes, [p3s@POP3SPIDER9]). 命令同步到本地

 看rabbitmq 源代码 



 mnesia 启动顺序  集群先 exchange config 后 等等 顺序!!!

mnesia:change_config(extra_db_nodes, [p3s@POP3SPIDER9]).
mnesia:change_table_copy_type(schema, node(), disc_copies).
mnesia:add_table_copy(sq_sending_queue, node(), disc_copies).
mnesia:add_table_copy(sq_pending_queue, node(), disc_copies).

sq_p3s:start().


{error,{merge_schema_failed,"Bad cookie in table definition
mnesia:change_config 尽早执行 不在普通函数里面执行 放到sup文件里面执行  尽早执行!
 
分享到:
评论
5 楼 zdx3578 2012-04-20  
(p3s--232@POP3ADMIN)112> lists:filter(fun(X) -> (re:run(erlang:atom_to_list(X),"p3s") /= {match,[{0,3}]}) and ( re:run(erlang:atom_to_list(X),"smtp") /=  {match,[{0,4}]})   end,nodes()).
['node3_p3s@BB-POP03','db_node3@BB-POP03',
'node3_smtp@BB-POP03',admin@POP3ADMIN,
'node4_webadmin@BB-HUB01',db@POP3SPIDER7,db@POP3SPIDER9,
db@POP3SPIDER8]
(p3s--232@POP3ADMIN)113>
(p3s--232@POP3ADMIN)113> lists:filter(fun(X) -> (re:run(erlang:atom_to_list(X),"p3s") == {match,[{0,3}]}) or ( re:run(erlang:atom_to_list(X),"p3s|smtp") ==  {match,[{0,4}]})   end,nodes()).
[p3s@POP3SPIDER9,p3s@POP3SPIDER5,smtp@POP3SPIDER5,
p3s@POP3SPIDER8,p3s@POP3SPIDER14,p3s@POP3SPIDER15,
smtp@POP3SPIDER7,p3s@POP3SPIDER10,smtp@POP3SPIDER10,
p3s@POP3SPIDER7,smtp@POP3SPIDER9,p3s@POP3SPIDER6,
smtp@POP3SPIDER6]
(p3s--232@POP3ADMIN)114>
4 楼 zdx3578 2012-04-20  
[rpc:call(Node, application, loaded_applications, []) || Node <-[node() |  lists:filter(fun(X) -> re:run(erlang:atom_to_list(X),"p3s") /= {match,[{0,3}]}  end,nodes())]].
3 楼 zdx3578 2012-04-20  
> lists:filter(fun(X) -> re:run(erlang:atom_to_list(X),"p3s") == {match,[{0,3}]}  end,nodes()).
[p3s@POP3SPIDER9,p3s@POP3SPIDER5,p3s@POP3SPIDER8,。。。。。
2 楼 zdx3578 2012-04-20  
lists:member("p",erlang:atom_to_list(X))   这样  就no member
1 楼 zdx3578 2012-04-20  
re:run("smtp@POP3SPIDER9","smtp").           
{match,[{0,4}]}
正则匹配

lists:member(119,erlang:atom_to_list(X))  string 即list 119为 ascII: 109  : "m"
http://blog.chinaunix.net/uid-721864-id-96982.html

(p3s--232@POP3ADMIN)52> lists:filter(fun(X) -> lists:member(119,erlang:atom_to_list(X)) == true end,nodes()). 
['node4_webadmin@BB-HUB01']

相关推荐

Global site tag (gtag.js) - Google Analytics