あじちゃんの備忘録。

〜ここはメモ帳です

rabbitmq.cluster.confのrabbit@xxxのxxxはコンテナ名っぽい

rabbitmq.cluster.conf に設定していたこの辺

# cluster_formation.peer_discovery_backend     = rabbit_peer_discovery_classic_config
#
cluster_formation.classic_config.nodes.1 = rabbit@hostname_01
cluster_formation.classic_config.nodes.2 = rabbit@hostname_02
# cluster_formation.classic_config.nodes.3 = rabbit3@hostname
# cluster_formation.classic_config.nodes.4 = rabbit4@hostname

てっきりhostnameを見てクラスタリングしてくれるものと思っていたけど、実はコンテナ名を見ていたみたい。
なので、 docker-compose.yml に↓を追加してやると解決した。

container_name: hostname_01    # またはhostname_02