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文件里面执行  尽早执行!
 

你可能感兴趣的:(erlang)