Giter Club home page Giter Club logo

Comments (3)

tichi73 avatar tichi73 commented on August 23, 2024

https://fixpoint.slack.com/archives/CUUS40EBF/p1722307429438229
rabbitmq コンテナ(rabbit@mq-ke2dev-swarm3)が再起動して、mnesia がクリアされたために、クラスタ参加できなかった場合の復帰手順

# rabbitmqctl stop_app
# rabbitmqctl -n rabbit@mq-ke2dev-swarm1 forget_cluster_node rabbit@mq-ke2dev-swarm3
# rabbitmqctl join_cluster rabbit@mq-ke2dev-swarm1
# rabbitmqctl start_app

from ke-docker.

tichi73 avatar tichi73 commented on August 23, 2024

https://fixpoint.slack.com/archives/CUUS40EBF/p1722338105215349?thread_ts=1722329934.675419&cid=CUUS40EBF

diff --git a/scripts/bootstrap-rabbitmq.sh b/scripts/bootstrap-rabbitmq.sh
index d4958ed..61debfb 100644
--- a/scripts/bootstrap-rabbitmq.sh
+++ b/scripts/bootstrap-rabbitmq.sh
@@ -8,5 +8,14 @@ chown -R rabbitmq:rabbitmq /etc/rabbitmq/ssl
 # SSL 認証プラグインを有効化
 rabbitmq-plugins enable rabbitmq_auth_mechanism_ssl
 
+# Swarm 構成時の初期化処理
+for cluster_node in $(grep '^cluster_formation.classic_config.nodes' /etc/rabbitmq/conf.d/*.conf | cut -d'=' -f2); do
+    if [[ rabbit@$(hostname) != ${cluster_node} ]]; then
+        if rabbitmqctl -n ${cluster_node} forget_cluster_node rabbit@$(hostname) 2> /dev/null; then
+            break
+        fi
+    fi
+done
+
 # rabbitmq-server を起動
 exec rabbitmq-server "$*"

from ke-docker.

tichi73 avatar tichi73 commented on August 23, 2024

再起動時のクラスタ再加入対策としては #37 で暫定的に対応しました。
再構築時のクラスタ再加入には別途対策を継続することとして、この Issue はオープンのままとします。

from ke-docker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.