为什么RabbitMQ不尊重EC2 / Ubuntu Lucid上的主机名?

我在Lucid EC2实例上重新安装了rabbitmq-server主机名设置正确,但rabbitmq不会select主机名,并坚持自己调用localhost 。 任何想法如何说服它呢?

 $ cat /etc/hostname mifune $ hostname mifune $ cat /etc/hosts 127.0.0.1 localhost mifune ... $ sudo rabbitmqctl status Status of node rabbit@localhost ... [{running_applications,[{rabbit,"RabbitMQ","1.7.2"}, {mnesia,"MNESIA CXC 138 12","4.4.12"}, {os_mon,"CPO CXC 138 46","2.2.4"}, {sasl,"SASL CXC 138 11","2.1.8"}, {stdlib,"ERTS CXC 138 10","1.16.4"}, {kernel,"ERTS CXC 138 10","2.13.4"}]}, {nodes,[rabbit@localhost]}, {running_nodes,[rabbit@localhost]}] ...done. 

您是否认为将/etc/hosts/的顺序切换为:

 127.0.0.1 localhost mifune 

至:

 127.0.0.1 mifune localhost 

诀窍吗?

在做这件事之前,确保你停止了rabbitmq,否则rabbitmq会忘记它是谁,并开始在附近徘徊,纠缠每个人去超市的方向。 它也可能是紧张的,需要彻底清除和重新安装。