Skip to content

Instantly share code, notes, and snippets.

@yoku0825
Created December 24, 2015 09:21
Show Gist options
  • Save yoku0825/d72f2af859e632415a69 to your computer and use it in GitHub Desktop.
Save yoku0825/d72f2af859e632415a69 to your computer and use it in GitHub Desktop.
  • MySQL Routerに接続した状態で
$ mysql -h 172.17.0.22 -P 13306

mysql> SELECT NOW();
+---------------------+
| NOW()               |
+---------------------+
| 2015-12-24 18:17:29 |
+---------------------+
1 row in set (0.00 sec)
  • MySQL Fabricを落とすと
$ sudo docker stop e51f65572eef
  • 30秒くらい刺さる。。
mysql> SELECT NOW();
^C^C^C^C^C^C -- query aborted
^C -- query aborted
+---------------------+
| NOW()               |
+---------------------+
+---------------------+
1 row in set (25.78 sec)
  • 復帰した後はフツーに動き出した。
mysql> SELECT NOW();
+---------------------+
| NOW()               |
+---------------------+
| 2015-12-24 18:17:58 |
+---------------------+
1 row in set (0.00 sec)
  • ログはこんな感じ
2015-12-24 18:17:13 INFO    [7f40dd6ec700] keepalive
2015-12-24 18:17:30 ERROR   [7f40d61fc700] Failed connecting with Fabric: Can't connect to MySQL server on '172.17.0.9' (110) (tried 1 time)
2015-12-24 18:17:40 ERROR   [7f40d61fc700] Failed connecting with Fabric: Can't connect to MySQL server on '172.17.0.9' (110) (tried 6 times)
2015-12-24 18:17:50 ERROR   [7f40d61fc700] Failed connecting with Fabric: Can't connect to MySQL server on '172.17.0.9' (110) (tried 11 times)
2015-12-24 18:18:00 ERROR   [7f40d61fc700] Failed connecting with Fabric: Can't connect to MySQL server on '172.17.0.9' (110) (tried 16 times)
2015-12-24 18:18:10 ERROR   [7f40d61fc700] Failed connecting with Fabric: Can't connect to MySQL server on '172.17.0.9' (110) (tried 21 times)
2015-12-24 18:18:13 INFO    [7f40dd6ec700] keepalive
  • その後もログは出続けてるけど、どこで接続可能になったんだろう。。謎い。
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment