我在CentOS 5.x服务器上安装了RabbitMQ,用于在我的程序之间传递消息。 我按照https://www.rabbitmq.com/management-cli.html上的说明安装了rabbitmqadmin ,并且过去在我的服务器上使用过它。
从我可以告诉它看起来这个特定的服务器配置错误。 我尝试获取有关如何解决此问题的更多信息时,我的网络搜索失败了。
错误:
[root@server ~]# python26 /usr/local/bin/rabbitmqadmin list nodes *** Could not connect: [Errno -2] Name or service not known [root@server ~]#我尝试了几种不同的rabbitmqadmin命令,它们给出了相同的结果。 如果我在没有额外参数的情况下运行该命令,则会显示正常的帮助对话框。 我有这个设置,并在其他几个服务器上工作。
根本问题是什么? 如果没有,无论如何要获得更多细节,比如详细?
更新:
我只是试图检查rabbitmq的版本,它也产生了一个错误:
[root@server ~]# rabbitmqctl status Status of node rabbit@server ... Error: unable to connect to node rabbit@server: nodedown DIAGNOSTICS =========== attempted to contact: [rabbit@server] rabbit@server: * connected to epmd (port 4369) on server * epmd reports node 'rabbit' running on port 25672 * TCP connection succeeded but Erlang distribution failed * suggestion: hostname mismatch? * suggestion: is the cookie set correctly? current node details: - node name: rabbitmqctl25451@server - home dir: /var/lib/rabbitmq - cookie hash: WXaeZT7XXm13naagfRX5cg== [root@server ~]#我将要看看我是否可以从中找到一些东西...我发现这很奇怪,因为服务器正在传递消息,可以通过Web控制台进行监控。
Erlang版本:
[root@server rabbitmq]# erl -eval 'erlang:display(erlang:system_info(otp_release)), halt().' -noshell "R14B04" [root@server rabbitmq]#Rabbitmq版本:
[root@server rabbitmq]# python26 /usr/local/bin/rabbitmqadmin --version rabbitmqadmin 3.3.5 [root@server rabbitmq]#I have RabbitMQ installed on a CentOS 5.x server which I use for message passing between my programs. I've installed rabbitmqadmin following the directions on https://www.rabbitmq.com/management-cli.html and have used it on my servers in the past.
From what I can tell it looks like this particular server is misconfigured. My web-searches have failed me on trying to get more information on how to troubleshoot this issue.
The error:
[root@server ~]# python26 /usr/local/bin/rabbitmqadmin list nodes *** Could not connect: [Errno -2] Name or service not known [root@server ~]#I have tried several different rabbitmqadmin commands and they give the same result. If I run the command without the extra params it displays the normal help dialog. I have this setup and working on several other servers.
Any idea on what the root issue is? If not, anyway to get more details, like verbose?
Update:
I just tried to check the version of rabbitmq and its yielding an error too:
[root@server ~]# rabbitmqctl status Status of node rabbit@server ... Error: unable to connect to node rabbit@server: nodedown DIAGNOSTICS =========== attempted to contact: [rabbit@server] rabbit@server: * connected to epmd (port 4369) on server * epmd reports node 'rabbit' running on port 25672 * TCP connection succeeded but Erlang distribution failed * suggestion: hostname mismatch? * suggestion: is the cookie set correctly? current node details: - node name: rabbitmqctl25451@server - home dir: /var/lib/rabbitmq - cookie hash: WXaeZT7XXm13naagfRX5cg== [root@server ~]#I'm going to see if I can find something from this... I find this weird because the server is passing messages fine and can be monitored through the web console.
Erlang version:
[root@server rabbitmq]# erl -eval 'erlang:display(erlang:system_info(otp_release)), halt().' -noshell "R14B04" [root@server rabbitmq]#Rabbitmq Version:
[root@server rabbitmq]# python26 /usr/local/bin/rabbitmqadmin --version rabbitmqadmin 3.3.5 [root@server rabbitmq]#最满意答案
经过多次挖掘和挫折后,我发现了我的问题...我发布了解决方案,以防其他人有类似的经历
以前,我发现如果你在Linux服务器上设置RabbitMQ,那么更改它可以打破一些兔子配置的主机名。
关于这个问题的一个很棒的部分是有人将服务器的名称从所有大写字母更改为小写字母......
我已经解决了以下两种方式之一:
解决方案1:
将主机名还原为以前的名称。 这样,带有附加服务器名称的rabbitmq引用再次起作用。
解决方案2:
如果要保持服务器名称更改,则可以在/etc/rabbitmq创建rabbitmq-env.conf文件,如:
NODENAME=rabbit@OLDHOSTNAME如果您不确定以前的名称是什么,可以通过在/var/lib/rabbitmq/mnesia/文件夹中执行ls来引用它。 然后,您将看到一个与您需要指定的节点名匹配的文件夹。
参考: https : //www.rabbitmq.com/man/rabbitmq-env.conf.5.man.html
更新:
主机名是CaSE SeNSiTIve ...如果有人在我身上更改了主机名,唯一的区别就是这种情况......所以需要一段时间才能注意到......
After much digging and frustration, I found my problem... I'm posting the solution in case anyone else has a similar experience
Previously, I found that if you setup RabbitMQ on a linux server then change the hostname that it can break some of the rabbit configuration.
The awesome part about this problem is that someone changed the name of the server from all capital letters to lowercase...
I've solve this one of two ways:
Solution 1:
Revert the host name back to the previous name. So that rabbitmq references with the appended server name work again.
Solution 2:
If you want to keep the server name change, then you can create a rabbitmq-env.conf files in /etc/rabbitmq like:
NODENAME=rabbit@OLDHOSTNAMEIf you aren't sure what your previous name was, you can reference it by doing an ls in your /var/lib/rabbitmq/mnesia/ folder. You'll then see a folder that matches the nodename you need to specify.
Reference: https://www.rabbitmq.com/man/rabbitmq-env.conf.5.man.html
UPDATE:
Host name is CaSE SeNSiTIve... had someone change a hostname on me and the only difference was the case... so took a while to notice...
rabbtimqadmin - 无法连接:[Errno -2]名称或服务未知(rabbtimqadmin - Could not connect: [Errno -2] Name or service not known)我在CentOS 5.x服务器上安装了RabbitMQ,用于在我的程序之间传递消息。 我按照https://www.rabbitmq.com/management-cli.html上的说明安装了rabbitmqadmin ,并且过去在我的服务器上使用过它。
从我可以告诉它看起来这个特定的服务器配置错误。 我尝试获取有关如何解决此问题的更多信息时,我的网络搜索失败了。
错误:
[root@server ~]# python26 /usr/local/bin/rabbitmqadmin list nodes *** Could not connect: [Errno -2] Name or service not known [root@server ~]#我尝试了几种不同的rabbitmqadmin命令,它们给出了相同的结果。 如果我在没有额外参数的情况下运行该命令,则会显示正常的帮助对话框。 我有这个设置,并在其他几个服务器上工作。
根本问题是什么? 如果没有,无论如何要获得更多细节,比如详细?
更新:
我只是试图检查rabbitmq的版本,它也产生了一个错误:
[root@server ~]# rabbitmqctl status Status of node rabbit@server ... Error: unable to connect to node rabbit@server: nodedown DIAGNOSTICS =========== attempted to contact: [rabbit@server] rabbit@server: * connected to epmd (port 4369) on server * epmd reports node 'rabbit' running on port 25672 * TCP connection succeeded but Erlang distribution failed * suggestion: hostname mismatch? * suggestion: is the cookie set correctly? current node details: - node name: rabbitmqctl25451@server - home dir: /var/lib/rabbitmq - cookie hash: WXaeZT7XXm13naagfRX5cg== [root@server ~]#我将要看看我是否可以从中找到一些东西...我发现这很奇怪,因为服务器正在传递消息,可以通过Web控制台进行监控。
Erlang版本:
[root@server rabbitmq]# erl -eval 'erlang:display(erlang:system_info(otp_release)), halt().' -noshell "R14B04" [root@server rabbitmq]#Rabbitmq版本:
[root@server rabbitmq]# python26 /usr/local/bin/rabbitmqadmin --version rabbitmqadmin 3.3.5 [root@server rabbitmq]#I have RabbitMQ installed on a CentOS 5.x server which I use for message passing between my programs. I've installed rabbitmqadmin following the directions on https://www.rabbitmq.com/management-cli.html and have used it on my servers in the past.
From what I can tell it looks like this particular server is misconfigured. My web-searches have failed me on trying to get more information on how to troubleshoot this issue.
The error:
[root@server ~]# python26 /usr/local/bin/rabbitmqadmin list nodes *** Could not connect: [Errno -2] Name or service not known [root@server ~]#I have tried several different rabbitmqadmin commands and they give the same result. If I run the command without the extra params it displays the normal help dialog. I have this setup and working on several other servers.
Any idea on what the root issue is? If not, anyway to get more details, like verbose?
Update:
I just tried to check the version of rabbitmq and its yielding an error too:
[root@server ~]# rabbitmqctl status Status of node rabbit@server ... Error: unable to connect to node rabbit@server: nodedown DIAGNOSTICS =========== attempted to contact: [rabbit@server] rabbit@server: * connected to epmd (port 4369) on server * epmd reports node 'rabbit' running on port 25672 * TCP connection succeeded but Erlang distribution failed * suggestion: hostname mismatch? * suggestion: is the cookie set correctly? current node details: - node name: rabbitmqctl25451@server - home dir: /var/lib/rabbitmq - cookie hash: WXaeZT7XXm13naagfRX5cg== [root@server ~]#I'm going to see if I can find something from this... I find this weird because the server is passing messages fine and can be monitored through the web console.
Erlang version:
[root@server rabbitmq]# erl -eval 'erlang:display(erlang:system_info(otp_release)), halt().' -noshell "R14B04" [root@server rabbitmq]#Rabbitmq Version:
[root@server rabbitmq]# python26 /usr/local/bin/rabbitmqadmin --version rabbitmqadmin 3.3.5 [root@server rabbitmq]#最满意答案
经过多次挖掘和挫折后,我发现了我的问题...我发布了解决方案,以防其他人有类似的经历
以前,我发现如果你在Linux服务器上设置RabbitMQ,那么更改它可以打破一些兔子配置的主机名。
关于这个问题的一个很棒的部分是有人将服务器的名称从所有大写字母更改为小写字母......
我已经解决了以下两种方式之一:
解决方案1:
将主机名还原为以前的名称。 这样,带有附加服务器名称的rabbitmq引用再次起作用。
解决方案2:
如果要保持服务器名称更改,则可以在/etc/rabbitmq创建rabbitmq-env.conf文件,如:
NODENAME=rabbit@OLDHOSTNAME如果您不确定以前的名称是什么,可以通过在/var/lib/rabbitmq/mnesia/文件夹中执行ls来引用它。 然后,您将看到一个与您需要指定的节点名匹配的文件夹。
参考: https : //www.rabbitmq.com/man/rabbitmq-env.conf.5.man.html
更新:
主机名是CaSE SeNSiTIve ...如果有人在我身上更改了主机名,唯一的区别就是这种情况......所以需要一段时间才能注意到......
After much digging and frustration, I found my problem... I'm posting the solution in case anyone else has a similar experience
Previously, I found that if you setup RabbitMQ on a linux server then change the hostname that it can break some of the rabbit configuration.
The awesome part about this problem is that someone changed the name of the server from all capital letters to lowercase...
I've solve this one of two ways:
Solution 1:
Revert the host name back to the previous name. So that rabbitmq references with the appended server name work again.
Solution 2:
If you want to keep the server name change, then you can create a rabbitmq-env.conf files in /etc/rabbitmq like:
NODENAME=rabbit@OLDHOSTNAMEIf you aren't sure what your previous name was, you can reference it by doing an ls in your /var/lib/rabbitmq/mnesia/ folder. You'll then see a folder that matches the nodename you need to specify.
Reference: https://www.rabbitmq.com/man/rabbitmq-env.conf.5.man.html
UPDATE:
Host name is CaSE SeNSiTIve... had someone change a hostname on me and the only difference was the case... so took a while to notice...
发布评论