2017-07-31 339 views
2

我按照本指南https://www.rabbitmq.com/install-debian.html安装rabbitmq-server。但是,它不会有错误信息开始:​​rabbitmq-server无法启动 - 无法连接到epmd/Ubuntu 16.04

Jul 31 20:29:49 76672.local rabbitmqctl[7519]: attempted to contact: [[email protected]] 
Jul 31 20:29:49 76672.local rabbitmqctl[7519]: [email protected]: 
Jul 31 20:29:49 76672.local rabbitmqctl[7519]: * unable to connect to epmd (port 4369) on 76672: badarg (unknown POSIX error) 
Jul 31 20:29:49 76672.local rabbitmqctl[7519]: current node details: 
Jul 31 20:29:49 76672.local rabbitmqctl[7519]: - node name: '[email protected]' 
Jul 31 20:29:49 76672.local rabbitmqctl[7519]: - home dir: /var/lib/rabbitmq 
Jul 31 20:29:49 76672.local rabbitmqctl[7519]: - cookie hash: VwJCJ/LkSvmUKaoPOglCcQ== 
Jul 31 20:29:49 76672.local systemd[1]: Failed to start RabbitMQ broker. 
Jul 31 20:29:49 76672.local systemd[1]: rabbitmq-server.service: Unit entered failed state. 
Jul 31 20:29:49 76672.local systemd[1]: rabbitmq-server.service: Failed with result 'exit-code'. 
dpkg: error processing package rabbitmq-server (--configure): 
subprocess installed post-installation script returned error exit status 1 
Processing triggers for systemd (229-4ubuntu17) ... 
Processing triggers for ureadahead (0.100.0-19) ... 
Errors were encountered while processing: 
rabbitmq-server 
E: Sub-process /usr/bin/dpkg returned an error code (1) 
[email protected]: 

我试着做在Ubuntu的清晰实例此安装,并得到了同样的错误。我GOOGLE了错误信息,似乎我有一些网络设置的问题 - 我想我应该改变他们的默认状态的一些设置。

任何想法需要改变什么?或者,我应该在第一次尝试时采用哪种设置?

P.S.我在Unix中完全是新手。对我来说,这只是一个运行我的Python脚本的云环境。

+0

作为一个云ENV它可能​​被不同地配置到一个新的安装,看到这个帖子:https://stackoverflow.com/questions/23106813/error-with-rabbit-mq-服务器 - PS坚持下去,Linux是开发/生产的方式...;) –

回答

1

我通过在文件rabbitmq-env.conf中设置HOSTNAME解决了我的问题。我不知道到底是什么造成了这个问题。

我的设置:

sudo cat /etc/hostname 
76672.localhost 

sudo cat /etc/hosts 
127.0.0.1 localhost 
127.0.1.1 ubuntu16.04 ubuntu16 
# The following lines are desirable for IPv6 capable hosts 
::1  localhost ip6-localhost ip6-loopback 
ff02::1 ip6-allnodes 
ff02::2 ip6-allrouters 
127.0.0.1 76672.local 

/etc/rabbitmq/rabbitmq-env.conf 
# Empty - if the file is empty rabbitmq doesn't start 
HOSTNAME=76672.local # With this rabbitmq doesn't start either 
HOSTNAME=localhost # With this all works 
+0

'/ etc/hostname'('76672.localhost')中的主机名可能不会解析为IP地址。 '/ etc/hosts'中没有提到它(只有'76672.local')。 Erlang要求主机名解析为某个东西。 –