LoginSignup
6
7

More than 5 years have passed since last update.

GCPの負荷分散(LB) - Compute Engine構成のヘルスチェックでなんかこける

Last updated at Posted at 2017-02-17
  • ん、こけるはずないのにってとき

やること

  • firewallの 130.211.0.0/16をallowになってるか確認してみてください
    • allowにすると動くかも

なんで

  • GCEのfirewallを解放してLB -> GCEのヘルスチェックのアクセスログを見てみる
- - - [16/Feb/2017:09:51:48 +0000] "GET /g/system HTTP/1.1" 200 1299 "-""GoogleHC/1.0" "130.211.1.99" "auth:-"
- - - [16/Feb/2017:09:51:50 +0000] "GET /g/system HTTP/1.1" 200 1299 "-""GoogleHC/1.0" "130.211.1.104" "auth:-"
- - - [16/Feb/2017:09:51:50 +0000] "GET /g/system HTTP/1.1" 200 1299 "-""GoogleHC/1.0" "130.211.1.96" "auth:-"
  • 130.211.1.xxxみたいのからアクセスきてる
  • 調べてみるとGCPのドメインみたい
~ % whois 130.211.1.99
#略
NetRange:       130.211.0.0 - 130.211.255.255
CIDR:           130.211.0.0/16
NetName:        GOOGLE-CLOUD
  • とりあえず、あけたら動いただった
  • セキュリティ的に大丈夫なのかはよくわからない。。
  • ケチって130.211.1.0/24とかやると、アクセスできないリクエストとかたまにあるからきっちり130.211.0.0/16で開けた方がいいかも

追記 (2017/2/17)

In addition, you must create a firewall rule that allows traffic from 130.211.0.0/22 and and 35.191.0.0/16 to reach your instances. This rule allows traffic from both the load balancer and the health checker. The rule should enable traffic on the port your global forwarding rule has been configured to use, and your health checker should be configured to use the same port.
https://cloud.google.com/compute/docs/load-balancing/http/
6
7
4

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
6
7