Error: unable to perform an operation on node 'rabbit@xxxx'.
Please see diagnostics information and suggestions below.
Error: unable to perform an operation on node 'rabbitmqcli-13048-rabbit@xxxxxxx@localhost'. Please see diagnostics information and suggestions below.
Most common reasons for this are:
* Target node is unreachable (e.g. due to hostname resolution, TCP connection or firewall issues)
* CLI tool fails to authenticate with the server (e.g. due to CLI tool's Erlang cookie not matching that of the server)
* Target node is not running
In addition to the diagnostics info below:
* See the CLI, clustering and networking guides on https://rabbitmq.com/documentation.html to learn more
* Consult server logs on node rabbitmqcli-13048-rabbit@xxxxxxxxx@localhost
* If target node is configured to use long node names, don't forget to use --longnames with CLI tools
DIAGNOSTICS
===========
attempted to contact: ['rabbitmqcli-13048-rabbit@xxxxxxxx@localhost']
rabbitmqcli-13048-rabbit@xxxxxxxx@localhost:
* unable to connect to epmd (port 4369) on xxxxxxxxx@localhost: nxdomain (non-existing domain)
Current node details:
* node name: 'rabbitmqcli-9940-rabbit@xxxxxxxxx'
* effective user's home directory: C:\Users\Judy
* Erlang cookie hash: 각자 해시값
이 오류는 RabbitMQ 노드에서 작업을 수행하지 못할 때 발생한다. 이 메시지는 대개 노드 이름이 잘못되었거나 Erlang 환경이 올바르게 설정되지 않았을 때 발생하는데 해결 방법은 다음과 같다.
- RabbitMQ 노드 이름이 올바른지 확인해야 한다. rabbitmqctl 명령어를 사용하여 노드 이름을 확인할 수 있다.
RabbitMQ 노드 이름은 기본적으로 'rabbit@[호스트명]' 형식으로 자동으로 설정된다.
만약 명시적으로 노드 이름을 지정하지 않았다면, 'rabbit@[호스트명]' 형식의 기본값으로 설정된다. 이러한 경우에는 호스트명 뒤에 식별자가 붙지 않은 'rabbit@[호스트명]' 형식의 노드 이름으로 설정됩니다.
- Erlang 환경이 올바르게 설치되었는지 확인한다. RabbitMQ는 Erlang VM 위에서 실행되므로 Erlang VM이 시스템에 설치되어 있어야 한다.
- RabbitMQ 구성 파일을 다시 확인한다. 구성 파일에서 오류가 발생하면 RabbitMQ가 시작되지 않을 수 있다.
- RabbitMQ 포트 방화벽이 차단되어있는지 확인해 본다.
- Erlang cookie가 Server에 구성 파일로 잡혀있는지 확인.
erlang.cookie 파일에는 래빗엠큐 서버와 클라이언트 간의 인증에 사용되는 쿠키 값이 들어 있다. 두 쿠키 값이 일치하지 않으면 클라이언트에서 서버로의 접속이 실패한다. 쿠키 값은 무작위로 생성된 문자열로, 32바이트 길이의 랜덤 한 바이너리 값이다.
쿠키는 일반적으로 노드가 처음 시작될 때 무작위로 생성되며, 이후에는 변경되지 않는다. 즉, 노드를 재시작하면 동일한 쿠키 값이 생성된다. 그러나 노드가 여러 대인 경우에는 각 노드가 공유할 수 있도록 동일한 Erlang 쿠키 값을 사용해야 한다. 따라서 새로운 노드를 추가하거나 새로운 클러스터를 만드는 경우 새로운 쿠키를 생성하여 모든 노드에 배포해야 한다.
Erlang cookie에 대해 경험하는 좋은 시도였으나 Erlang과 rabbitMq 버전이 맞지 않아 발생했던 문제로 둘 다 버전을 맞추어 재설치하여 해결하였다;; Springboot로 개발한 이후 버전관리에 소홀했더니 꽤 많은 시간을 소요하며 삽질했다.
Spring으로 개발했을 땐 버전관리에 예민하게 반응했었는데.. 이래서 자동화되는 것이 무조건 좋은 일만은 아닌 것 같다 :)