7
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

同一ネットワーク内にクラスターを2系統立てたら事故った

Last updated at Posted at 2016-08-30

事象の内容

Heartbeat, Pacemaker, DRBDを使って某チケットシステムを冗長化していたのだが、しばらく前から下記ようなエラーログが大量に出てディスクを圧迫するようになった。
diskfullのアラートで気付いた(‘A’)

heartbeat: [1516]: ERROR: authtoken does not match, authtoken=fwa43wfa4g3a4ag4, authstr=f4waf43wafw4a
heartbeat: [1516]: ERROR: netstring authentication failed, s=###
14:(0)t=NS_ackmsg,26:(0)dest=pm-s,15:(0)ackseq=c2efe,28:(1)destuuid=T<98>^Vz.<A8>JߵHL<E7><AF><E3>W<BE>,25:(0)src=pm-p,27:(1)srcuuid=T<98>^Vz.<A8>JߵHL
<E7><AF><E3>W<BE>,14:(0)hg=571f08f9,14:(0)ts=57376ac1,8:(0)ttl=3,50:(0)auth=1 fwag43g4ga4fa4waf,%%%
heartbeat: [1516]: ERROR: MSG: Dumping message with 10 fields
heartbeat: [1516]: ERROR: MSG[0] : [t=NS_ackmsg]
ERROR: MSG[1] : [dest=pm-s]
heartbeat: [1516]: ERROR: MSG[2] : [ackseq=c2efe]
heartbeat: [1516]: ERROR: MSG[3] : [(1)destuuid=0x26d6e40(37 28)]
heartbeat: [1516]: ERROR: MSG[4] : [src=pm-p]
heartbeat: [1516]: ERROR: MSG[5] : [(1)srcuuid=0x26dbe20(36 27)]
heartbeat: [1516]: ERROR: MSG[6] : [hg=571f08f9]
heartbeat: [1516]: ERROR: MSG[7] : [ts=57376ac1]
heartbeat: [1516]: ERROR: MSG[8] : [ttl=3]
heartbeat: [1516]: ERROR: MSG[9] : [auth=1 d2dee8f32qr3warew4arewacdfe666a]

調査開始

なにやらクラスターの認証に失敗している模様。
/etc/ha.d/authkeys の中身は構築以来いじっていないし、タイムスタンプも随分前のまま。
しかもエラーが出ている割にはクラスターそのものは正常に稼動している不可解な事象。

原因

よーくログを見てみると認証を試みている相手はなんとペアとは別のクラスターノードだった。
実は同じブロードキャストドメイン内に全く別用途のクラスターを2セット設置していて、全員がペアを探すためにブロードキャストを飛ばしていた。
このため /etc/ha.d/authkeys が異なる(そもそもクラスター組めてはいけない)相手とひたすら認証しようとして大量のエラーを飛ばしていたというのが真相だった。
発生し始めた日付もエラー発生のタイミングが丁度その別クラスターを構築したタイミングとピタリと一致していた。

対処

ブロードキャストではなくユニキャストでペアを探すよう下のように設定を変更した。

vi /etc/ha.d/ha.cf
- bcast eth0
+ ucast eth0 192.168.0.10

教訓

  • 無暗にブロードキャストを使わない
  • 野良サーバーを自己満足でクラスタリングしない
7
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
7
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?