๊ฐœ๋ฐœ.log/rabbitMQ

[RabbitMQ] Window/rabbitmq-server ์„œ๋ฒ„๊ฐ€ ์‹คํ–‰ ์ค‘์ธ์ง€ ํ™•์ธํ•˜๊ธฐ/ Error: unable to connect to node rabbit@localhost: nodedown

๊ฐœ๋ฐœํ•˜๋Š” ์ฃผ๋””์”จ 2023. 4. 18. 14:22

 

Error: unable to connect to node rabbit@localhost: nodedown

 

rabbitMq๋Š” ๋ถ„์‚ฐ ๋ฉ”์‹œ์ง• ์‹œ์Šคํ…œ์œผ๋กœ์„œ ์ฃผ๋กœ ์„œ๋ฒ„๋ฅผ ๊ตฌ์ถ•ํ•˜๋Š” ๋ฆฌ๋ˆ…์Šค๋‚˜ ํด๋ผ์šฐ๋“œ ํ™˜๊ฒฝ์— ์„ค์น˜ํ•˜๊ฒŒ ๋œ๋‹ค. ํ•˜์ง€๋งŒ ์–ด์ฉŒ๋‹ค๋ณด๋‹ˆ Window ํ™˜๊ฒฝ์—์„œ ์‚ฌ์šฉํ•˜๊ฒŒ ๋˜์—ˆ๋‹ค. ๋งŽ์€ ์‚ฌ๋žŒ๋“ค์ด Window์—์„œ๋Š” ์ž˜ ์‚ฌ์šฉํ•˜์ง€ ์•Š๋‹ค๋ณด๋‹ˆ ์ž๋ฃŒ๋„ ๋ณ„๋กœ ์—†์–ด ๊ฝค ๊ณ ์ƒํ–ˆ์—ˆ๋‹ค. ๋”ฐ๋ผ์„œ Window ์—์„œ RabbitMq๋ฅผ ์„ค์น˜ํ•˜๋ฉฐ ์‚ฝ์งˆํ–ˆ๋˜ ๊ณผ์ •์„ ํฌ์ŠคํŒ…ํ•˜๋ ค๊ณ  ํ•œ๋‹ค.

 

rabbitmq-server ๋ช…๋ น์–ด๊ฐ€ ์‹คํ–‰๋˜์ง€ ์•Š๊ณ  ์ด์ƒํ•œ ์—๋Ÿฌ๋ฉ”์‹œ์ง€๊ฐ€ ์ถœ๋ ฅ๋œ๋‹ค๋ฉด rabbitmq ์„œ๋ฒ„๊ฐ€ ์‹คํ–‰๋˜๊ณ  ์žˆ๋Š” ์ง€ ํ™•์ธํ•ด์•ผ ํ•œ๋‹ค. ์ด๋•Œ, ์„œ๋ฒ„ ์‹คํ–‰๊ณผ localhost manager UIํ™”๋ฉด๊ณผ๋Š” ๋ณ„๊ฐœ์ด๋‹ค. ์„œ๋ฒ„๊ฐ€ ์‹คํ–‰๋˜์ง€ ์•Š์•„๋„ manager UI๋Š” ์ ‘๊ทผ์ด ๋˜๊ธฐ ๋•Œ๋ฌธ์— ํ˜ผ๋ˆํ•ด์„  ์•ˆ๋œ๋‹ค.

rabbitmqctl status

 

์œ„ ๋ช…๋ น์„ ์‹คํ–‰ํ•˜๋ฉด RabbitMQ ์„œ๋ฒ„์˜ ์ƒํƒœ ์ •๋ณด๋ฅผ ํ™•์ธํ•  ์ˆ˜ ์žˆ๋‹ค. ๋งŒ์•ฝ RabbitMQ ์„œ๋ฒ„๊ฐ€ ์‹คํ–‰๋˜๊ณ  ์žˆ๋‹ค๋ฉด, Status๊ฐ€ ๋กœ๊ทธํ˜•ํƒœ๋กœ ์ถœ๋ ฅ๋œ๋‹ค. ๋งŒ์•ฝ ์„œ๋ฒ„๊ฐ€ ์‹คํ–‰๋˜๊ณ  ์žˆ์ง€ ์•Š๋‹ค๋ฉด, Failed to connect to broker์™€ ๊ฐ™์€ ์—๋Ÿฌ ๋ฉ”์‹œ์ง€๊ฐ€ ์ถœ๋ ฅ๋œ๋‹ค.

 

rabbitMq server๊ฐ€ ์‹คํ–‰์ค‘์ผ ๋•Œ log

 

*RabbitMq ์„œ๋ฒ„๊ฐ€ ์‹คํ–‰ ์ค‘์ผ ๋•Œ, ์„ฑ๊ณต ๋ฉ”์‹œ์ง€

Status of node rabbit@localhost ...
[{pid,21654},
 {running_applications,[{rabbit,"RabbitMQ","3.8.14"},
                        {os_mon,"CPO  CXC 138 46","2.5.1"},
                        {rabbit_common,[],"3.8.14"},
                        {xmerl,"XML parser","1.3.18"},
                        {crypto,"CRYPTO","4.8.2"},
                        {ssl,"Erlang/OTP SSL application","10.6.2"},
                        {public_key,"Public key infrastructure","1.10.4"},
                        {asn1,"The Erlang ASN1 compiler version 5.0.9","5.0.9"},
                        {sasl,"SASL  CXC 138 11","3.4.4"},
                        {stdlib,"ERTS  CXC 138 10","3.15.1"},
                        {kernel,"ERTS  CXC 138 10","7.0.1"}]},
 {os,{unix,linux}},
 {erlang_version,"22.3.4.18"},
 {memory,[{total,71228208},
          {connection_readers,0},
          {connection_writers,0},
          {connection_channels,0},
          {connection_other,0},
          {queue_procs,0},
          {queue_slave_procs,0},
          {plugins,0},
          {other_proc,629848},
          {mnesia,13584},
          {mgmt_db,0},
          {msg_index,0},
          {other_ets,811080},
          {binary,17280},
          {code,29853798},
          {atom,805929},
          {other_system,13736397}]},
 {alarms,[]},
 {listeners,[{clustering,25672,"::"},{amqp,5672,"::"}]},
 {vm_memory_high_watermark,0.4},
 {vm_memory_limit,6665370828},
 {disk_free_limit,50000000},
 {disk_free,65297798144},
 {file_descriptors,[{total_limit,1048576},
                     {total_used,17},
                     {sockets_limit,943626},
                     {sockets_used,15}]},
 {processes,[{limit,1048576},{used,259}]},
 {run_queue,0},
 {uptime,3}]

 

* RabbitMq ์„œ๋ฒ„๊ฐ€ ์‹คํ–‰ ์ค‘์ด ์•„๋‹ ๋•Œ, ์—๋Ÿฌ ๋ฉ”์‹œ์ง€

Error: unable to connect to node rabbit@localhost: nodedown

DIAGNOSTICS
===========
- nodes and their ports on localhost: []
- current node: rabbitmq-cli-3.8.14
- current node home dir: /usr/local/Cellar/rabbitmq/3.8.14_1/lib/rabbitmq
- current node cookie hash: R9E9jKsw/57OEM01IOTgOA==

์„ฑ๊ณต ๋ฉ”์‹œ์ง€๋ฅผ ๋ฐ›์•˜๋‹ค๋ฉด ์„œ๋ฒ„๊ฐ€ ์‹คํ–‰ ์ค‘์ด๋ผ๋Š” ๋œป์ด์ง€๋งŒ ์—๋Ÿฌ ๋ฉ”์‹œ์ง€๋ฅผ ๋ฐ›์€ ๊ฒฝ์šฐ, ์•„๋ž˜ ๋ช…๋ น์–ด๋ฅผ ์ž…๋ ฅํ•˜์—ฌ RabbitMQ ์„œ๋ฒ„๋ฅผ ์‹คํ–‰ํ•ด์ฃผ์–ด์•ผ ํ•œ๋‹ค.

rabbitmq-server start

 

์ด๋ ‡๊ฒŒ ํ–ˆ๋Š”๋ฐ๋„ ์„œ๋ฒ„๊ฐ€ ์‹คํ–‰๋˜์—ˆ๋‹ค๋Š” ๋กœ๊ทธ ๋ฉ”์‹œ์ง€ ์—†์ด Warning ๋งŒ ๋‚˜์˜ค๋Š” ๊ฒฝ์šฐ๊ฐ€ ์žˆ๋‹ค.. ์ด๊ฑธ๋กœ ์ดํ‹€์„ ์‚ฝ์งˆ ํ•œ ๊ฒƒ ๊ฐ™๋‹ค.

RabbitMQ ์„œ๋ฒ„๊ฐ€ ์‹คํ–‰๋˜์ง€ ์•Š๊ณ  ๊ฒฝ๊ณ  ๋ฉ”์‹œ์ง€๋งŒ ๋‚˜ํƒ€๋‚˜๋Š” ๊ฒฝ์šฐ, ์ผ๋ฐ˜์ ์œผ๋กœ ํ™˜๊ฒฝ ๋ณ€์ˆ˜๊ฐ€ ์ œ๋Œ€๋กœ ์„ค์ •๋˜์ง€ ์•Š์•˜๊ฑฐ๋‚˜ Erlang cookie๊ฐ€ ์ผ์น˜ํ•˜์ง€ ์•Š๋Š” ๊ฒฝ์šฐ์ด๋‹ค. ํ™˜๊ฒฝ ๋ณ€์ˆ˜๊ฐ€ ์ œ๋Œ€๋กœ ์„ค์ •๋˜์–ด ์žˆ๋Š”์ง€ ํ™•์ธํ•˜๊ณ  Erlang cookie๊ฐ€ ์ผ์น˜ํ•˜๋Š”์ง€ ํ™•์ธํ•ด๋ด์•ผ ํ•œ๋‹ค.

 

ํ•˜์ง€๋งŒ ๊ทผ๋ณธ์ ์œผ๋กœ Erlnag cookie๋ฅผ ์ง์ ‘ ์†๋Œˆ ์ผ์€ ๊ฑฐ์˜ ์—†๋‹ค. ์ด ๊ฒฝ์šฐ Erlang ๋ฒ„์ „๊ณผ RabbitMq ๋ฒ„์ „์ด ํ˜ธํ™˜๋˜์ง€ ์•Š์•„ cookie๋ฅผ ๋ชป์ฐพ๋Š” ๊ฒฝ์šฐ์ด๋‹ค. ๋”ฐ๋ผ์„œ ๋ฒ„์ „์„ ํ™•์ธํ•˜๊ณ  ์žฌ์„ค์น˜ํ•˜๋ฉด ํ•ด๊ฒฐ๋  ๊ฐ€๋Šฅ์„ฑ์ด ๋†’๋‹ค.