rabbitmqctl Error: unable to connect to node rabbit@myserver nodedown

后端 未结 4 1901
醉话见心
醉话见心 2020-12-30 03:13

I am running RabbitMQ v3.3.5 with Erlang OTP 17.1 on Windows 2008 R2. My Dev and QA environments are stand-alone. My staging and production environments are clustered.

相关标签:
4条回答
  • 2020-12-30 03:52

    To anyone else getting this error, this was my fix. I installed Erlang, but overlooked the instructions on setting up the Environmental Variable.

    I was reading the manual install page: https://www.rabbitmq.com/install-windows-manual.html and found the following:

    Set ERLANG_HOME to where you actually put your Erlang installation, e.g. C:\Program Files\erlx.x.x (full path). The RabbitMQ batch files expect to execute %ERLANG_HOME%\bin\erl.exe.

    Go to Start > Settings > Control Panel > System > Advanced > Environment Variables. Create the system environment variable ERLANG_HOME and set it to the full path of the directory which contains bin\erl.exe.

    For some reason, the auto install assigned the wrong path name to the ERLANG_HOME variable - see image below. I simply added \bin on the end.

    0 讨论(0)
  • 2020-12-30 03:57

    If you are using linux try to change permission of /var/lib/rabbitmq/mnesia folder.

    0 讨论(0)
  • 2020-12-30 04:03

    Hostnames are case-insensitives when you are trying to resolve them. For example, LOCALHOST and localhost are the same host.

    However, when Erlang constructs the name of a node (eg. rabbit@<hostname> in the case of RabbitMQ), this name is case-sensitive. So rabbit@LOCALHOST and rabbit@localhost are two different node names, even if they run on the same host.

    Recently, we (the RabbitMQ team) found out that, on Windows, the node name constructed for RabbitMQ was inconsistent. Therefore, sometimes, RabbitMQ started as a Windows service could be named rabbit@MYHOST but rabbitmqctl would try to reach rabbit@myhost and fail.

    Since RabbitMQ 3.6.0, the node name should be consistent.

    0 讨论(0)
  • 2020-12-30 04:08

    I had a similar problem on my linux box and am posting the answer here, because rabbitmq on windows may handle things similarly.

    My post and solution: rabbtimqadmin - Could not connect: [Errno -2] Name or service not known

    The core issue was changing the servername after rabbitmq was configured. When installed, rabbitmq references the servers name, making it part of its configuration. I can see this being a similar issue on windows.

    In short, you can change server's name back to the name it was when you first installed rabbitmq or you can add a rabbitmq-env.conf file, I'm not sure where it would go in windows, but the following gives details for linux: https://www.rabbitmq.com/man/rabbitmq-env.conf.5.man.html

    Note that on linux the name of the server was CaSe SENiTivE! So you may or may not have a similar issue with windows.

    Hope this helps and good luck!

    0 讨论(0)
提交回复
热议问题