aws-samples / aws-waf-dashboard

1 click deployment for creating AWS WAF dashboard
MIT No Attribution
39 stars 41 forks source link

Filtering by Host results in circuit_breaking_exception #7

Open andreobrown opened 3 years ago

andreobrown commented 3 years ago

Attempting to filter by "Host" on the dashboard generates the following error:

Request to Elasticsearch failed: {"error":{"root_cause":[{"type":"circuit_breaking_exception","reason":"[script] Too many dynamic script compilations within, max: [75/5m]; please use indexed, or scripts with parameters instead; this limit can be changed by the [script.max_compilations_rate] setting","bytes_wanted":0,"bytes_limit":0}],"type":"search_phase_execution_exception","reason":"all shards failed","phase":"query","grouped":true,"failed_shards":[{"shard":0,"index":"awswaf-2020-09-30","node":"4NcO--zKTTy5G0WfUp-NcQ","reason":{"type":"query_shard_exception","reason":"failed to create query: {\n \"bool\" : {\n \"must\" : [\n {\n \"match_all\" : {\n \"boost\" : 1.0\n }\n },\n {\n \"match_all\" : {\n \"boost\" : 1.0\n }\n },\n {\n \"script\" : {\n \"script\" : {\n \"source\" : \"boolean compare(Supplier s, def v) {return s.get() == v;}compare(() -> { def header_name;\\nfor(int i=0; i<params._source.httpRequest.headers.length; i++) { \\nheader_name = params._source.httpRequest.headers[i].name;\\n\\nif (header_name == \\\"Host\\\") {\\nreturn params._source.httpRequest.headers[i].value\\n}\\n}\\n }, params.value);\",\n \"lang\" : \"painless\",\n \"params\" : {\n \"value\" : \"nwcbbyo.org\"\n }\n },\n \"boost\" : 1.0\n }\n },\n {\n \"range\" : {\n \"timestamp\" : {\n \"from\" : 1601426835428,\n \"to\" : 1601427735428,\n \"include_lower\" : true,\n \"include_upper\" : true,\n \"format\" : \"epoch_millis\",\n \"boost\" : 1.0\n }\n }\n }\n ],\n \"adjust_pure_negative\" : true,\n \"boost\" : 1.0\n }\n}","index_uuid":"Rn43-_IFRciVgqZHWk0RiQ","index":"awswaf-2020-09-30","caused_by":{"type":"general_script_exception","reason":"Failed to compile inline script [boolean compare(Supplier s, def v) {return s.get() == v;}compare(() -> { def header_name;\nfor(int i=0; i<params._source.httpRequest.headers.length; i++) { \nheader_name = params._source.httpRequest.headers[i].name;\n\nif (header_name == \"Host\") {\nreturn params._source.httpRequest.headers[i].value\n}\n}\n }, params.value);] using lang [painless]","caused_by":{"type":"circuit_breaking_exception","reason":"[script] Too many dynamic script compilations within, max: [75/5m]; please use indexed, or scripts with parameters instead; this limit can be changed by the [script.max_compilations_rate] setting","bytes_wanted":0,"bytes_limit":0}}}}],"caused_by":{"type":"circuit_breaking_exception","reason":"[script] Too many dynamic script compilations within, max: [75/5m]; please use indexed, or scripts with parameters instead; this limit can be changed by the [script.max_compilations_rate] setting","bytes_wanted":0,"bytes_limit":0}},"status":400}