2017-08-16 3 views
0

私は領事から集められたデータでプロパティをレンダリングするために領事テンプレートを使用しています。ファイルが正常にレンダリングされているが、それがクラッシュするまで、その後領事-テンプレートは、何度も何度も失敗します。制限に達するまで領事テンプレート予期しない応答コード:504

2017/08/16 10:43:04.900637 [WARN] (view) kv.list(...): Unexpected response code: 504 (retry attempt 5 after "4s") 

これは、長いポーズで延々と続く/それがクラッシュします。

設定ログから引っ張っ:

2017/08/16 10:38:02.403969 [DEBUG] (runner) final config: 
{ 
    "Consul": { 
     "Address": "consul-client.development.discovery", 
     "Auth": { 
      "Enabled": false, 
      "Username": "", 
      "Password": "" 
     }, 
     "Retry": { 
      "Attempts": 12, 
      "Backoff": 250000000, 
      "MaxBackoff": 60000000000, 
      "Enabled": true 
     }, 
     "SSL": { 
      "CaCert": "", 
      "CaPath": "", 
      "Cert": "", 
      "Enabled": false, 
      "Key": "", 
      "ServerName": "", 
      "Verify": true 
     }, 
     "Token": "", 
     "Transport": { 
      "DialKeepAlive": 30000000000, 
      "DialTimeout": 30000000000, 
      "DisableKeepAlives": false, 
      "IdleConnTimeout": 90000000000, 
      "MaxIdleConns": 100, 
      "MaxIdleConnsPerHost": 3, 
      "TLSHandshakeTimeout": 10000000000 
     } 
    }, 
    "Dedup": { 
     "Enabled": false, 
     "MaxStale": 2000000000, 
     "Prefix": "consul-template/dedup/", 
     "TTL": 15000000000 
    }, 
    "Exec": { 
     "Command": "", 
     "Enabled": false, 
     "Env": { 
      "Blacklist": [], 
      "Custom": [], 
      "Pristine": false, 
      "Whitelist": [] 
     }, 
     "KillSignal": 2, 
     "KillTimeout": 30000000000, 
     "ReloadSignal": null, 
     "Splay": 0, 
     "Timeout": 0 
    }, 
    "KillSignal": 2, 
    "LogLevel": "DEBUG", 
    "MaxStale": 2000000000, 
    "PidFile": "", 
    "ReloadSignal": 1, 
    "Syslog": { 
     "Enabled": false, 
     "Facility": "LOCAL0" 
    }, 
    "Templates": [ 
     { 
      "Backup": false, 
      "Command": "", 
      "CommandTimeout": 30000000000, 
      "Contents": "", 
      "Destination": "/consul-template/output/service.properties", 
      "Exec": { 
       "Command": "", 
       "Enabled": false, 
       "Env": { 
        "Blacklist": [], 
        "Custom": [], 
        "Pristine": false, 
        "Whitelist": [] 
       }, 
       "KillSignal": 2, 
       "KillTimeout": 30000000000, 
       "ReloadSignal": null, 
       "Splay": 0, 
       "Timeout": 30000000000 
      }, 
      "Perms": 420, 
      "Source": "/consul-template/data/service.properties.tpl", 
      "Wait": { 
       "Enabled": false, 
       "Min": 0, 
       "Max": 0 
      }, 
      "LeftDelim": "", 
      "RightDelim": "" 
     }, 
     { 
      "Backup": false, 
      "Command": "", 
      "CommandTimeout": 30000000000, 
      "Contents": "", 
      "Destination": "/consul-template/output/application.properties", 
      "Exec": { 
       "Command": "", 
       "Enabled": false, 
       "Env": { 
        "Blacklist": [], 
        "Custom": [], 
        "Pristine": false, 
        "Whitelist": [] 
       }, 
       "KillSignal": 2, 
       "KillTimeout": 30000000000, 
       "ReloadSignal": null, 
       "Splay": 0, 
       "Timeout": 30000000000 
      }, 
      "Perms": 420, 
      "Source": "/consul-template/data/application.properties.tpl", 
      "Wait": { 
       "Enabled": false, 
       "Min": 0, 
       "Max": 0 
      }, 
      "LeftDelim": "", 
      "RightDelim": "" 
     }, 
     { 
      "Backup": false, 
      "Command": "", 
      "CommandTimeout": 30000000000, 
      "Contents": "", 
      "Destination": "/consul-template/output/anotherMicroConsul.properties", 
      "Exec": { 
       "Command": "", 
       "Enabled": false, 
       "Env": { 
        "Blacklist": [], 
        "Custom": [], 
        "Pristine": false, 
        "Whitelist": [] 
       }, 
       "KillSignal": 2, 
       "KillTimeout": 30000000000, 
       "ReloadSignal": null, 
       "Splay": 0, 
       "Timeout": 30000000000 
      }, 
      "Perms": 420, 
      "Source": "/consul-template/data/anotherMicroConsul.properties.tpl", 
      "Wait": { 
       "Enabled": false, 
       "Min": 0, 
       "Max": 0 
      }, 
      "LeftDelim": "", 
      "RightDelim": "" 
     }, 
     { 
      "Backup": false, 
      "Command": "", 
      "CommandTimeout": 30000000000, 
      "Contents": "", 
      "Destination": "/consul-template/output/master.properties", 
      "Exec": { 
       "Command": "", 
       "Enabled": false, 
       "Env": { 
        "Blacklist": [], 
        "Custom": [], 
        "Pristine": false, 
        "Whitelist": [] 
       }, 
       "KillSignal": 2, 
       "KillTimeout": 30000000000, 
       "ReloadSignal": null, 
       "Splay": 0, 
       "Timeout": 30000000000 
      }, 
      "Perms": 420, 
      "Source": "/consul-template/data/master.properties.tpl", 
      "Wait": { 
       "Enabled": false, 
       "Min": 0, 
       "Max": 0 
      }, 
      "LeftDelim": "", 
      "RightDelim": "" 
     }, 
     { 
      "Backup": false, 
      "Command": "", 
      "CommandTimeout": 30000000000, 
      "Contents": "", 
      "Destination": "/consul-template/output/microConsul.properties", 
      "Exec": { 
       "Command": "", 
       "Enabled": false, 
       "Env": { 
        "Blacklist": [], 
        "Custom": [], 
        "Pristine": false, 
        "Whitelist": [] 
       }, 
       "KillSignal": 2, 
       "KillTimeout": 30000000000, 
       "ReloadSignal": null, 
       "Splay": 0, 
       "Timeout": 30000000000 
      }, 
      "Perms": 420, 
      "Source": "/consul-template/data/microConsul.properties.tpl", 
      "Wait": { 
       "Enabled": false, 
       "Min": 0, 
       "Max": 0 
      }, 
      "LeftDelim": "", 
      "RightDelim": "" 
     } 
    ], 
    "Vault": { 
     "Address": "", 
     "Enabled": false, 
     "Grace": 15000000000, 
     "RenewToken": true, 
     "Retry": { 
      "Attempts": 12, 
      "Backoff": 250000000, 
      "MaxBackoff": 60000000000, 
      "Enabled": true 
     }, 
     "SSL": { 
      "CaCert": "", 
      "CaPath": "", 
      "Cert": "", 
      "Enabled": true, 
      "Key": "", 
      "ServerName": "", 
      "Verify": true 
     }, 
     "Transport": { 
      "DialKeepAlive": 30000000000, 
      "DialTimeout": 30000000000, 
      "DisableKeepAlives": false, 
      "IdleConnTimeout": 90000000000, 
      "MaxIdleConns": 100, 
      "MaxIdleConnsPerHost": 3, 
      "TLSHandshakeTimeout": 10000000000 
     }, 
     "UnwrapToken": false 
    }, 
    "Wait": { 
     "Enabled": false, 
     "Min": 0, 
     "Max": 0 
    } 
} 

このエラーメッセージがsession.goRenewから来ているように見えるコードをふるいです。

/session/listの下、領事のセッションを見るはずですか?私は複数のコンスルテンプレートコンテナーを運営しています(各ホストに1つ) - いくつかのセッションを見るはずですか?あなたがプロキシまたはあなたの領事・テンプレートと領事との間にロードバランサを持っています。今、私は

curl localhost:8500/v1/session/list 
[] 

答えて

0

原因 ...何も表示されません。

回避策:キープアライブの後でキックし、アライブ接続を維持しますので、:)

詳細:60秒(65secまたは120秒など)上記のものにアイドル状態の接続のためのロードバランサまたはプロキシタイムアウトを増やします

  • HTTP 504は、接続が「カット」またはサービスが応答しなくなりましたが、私はあなたの領事クラスタはまだそれが途中でアクティブなネットワークデバイスが原因であるため、動作していることを前提とすることをされていることを意味し、ゲートウェイタイムアウトです(betwコンサルテンプレートとコンサルト)
  • コンスルテンプレートは、変更を待ち受けるために長続きする接続を開きます。したがって、ロードバランサによって接続が強制終了されると、これらのエラーが発生します。
  • consul-templateが正常に再接続するため、これらのメッセージは問題ありません。しかし、彼らは迷惑であり、AWSで、65secためにあなたのELBアイドルタイムアウトを設定し、これらのメッセージは離れ
を行く場合はオーバーと
  • ;-)上で同じ警告を使用してログとディスクスペースを埋めます
    関連する問題