2017-07-31 335 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要求主機名解析爲某個東西。 –