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 ์๋ฒ๊ฐ ์คํ ์ค์ผ ๋, ์ฑ๊ณต ๋ฉ์์ง
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๋ฅผ ๋ชป์ฐพ๋ ๊ฒฝ์ฐ์ด๋ค. ๋ฐ๋ผ์ ๋ฒ์ ์ ํ์ธํ๊ณ ์ฌ์ค์นํ๋ฉด ํด๊ฒฐ๋ ๊ฐ๋ฅ์ฑ์ด ๋๋ค.