Her*_*man 4 ubuntu installation rabbitmq
当我通过以下命令在突触中安装 rabbitMQ 时
sudo apt-get install rabbitmq-server
Run Code Online (Sandbox Code Playgroud)
它返回一个错误:
Starting rabbitmq-server: FAILED - check /var/log/rabbitmq/startup_log, _err
rabbitmq-server.
invoke-rc.d: initscript rabbitmq-server, action "start" failed.
dpkg: error processing rabbitmq-server (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
rabbitmq-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
Run Code Online (Sandbox Code Playgroud)
转到日志,它说以下内容:
Error: {cannot_connect_to_epmd,"herman-desktop",address}
Run Code Online (Sandbox Code Playgroud)
而我/etc/hosts
的定义如下:
127.0.0.1 localhost.localdomain localhost
::1 herman-desktop localhost6.localdomain6 localhost6
127.0.1.1 herman-desktop
Run Code Online (Sandbox Code Playgroud)
我需要做什么来解决这个问题?
您将 /etc/hosts 中的“herman-desktop”配置为仅 ipv6 中的本地主机地址,因为 rabbitmq 正在运行 ipv4,它将无法连接、编辑 /etc/hosts 并添加 herman-desktop(您的机器名称)我想)到 127.0.0.1 行(ipv4 上的本地主机)
此外,除非您的机器上配置了 127.0.1.1,否则它对我来说看起来像是一种类型:)
小智 7
最好的方法是告诉 rabbitmq 不要寻找主机名。你可以使用 rabbitmq 配置文件来做到这一点。
编辑配置,如果不存在则创建
vim /etc/rabbitmq/rabbitmq.conf
vim /etc/rabbitmq/rabbitmq-env.conf (in later versions of RabbitMQ)
Run Code Online (Sandbox Code Playgroud)
添加以下条目:
NODENAME=rabbit@localhost
NODE_IP_ADDRESS=127.0.0.1
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
8927 次 |
最近记录: |