etsy / 411

An Alert Management Web Application
https://demo.fouroneone.io
MIT License
971 stars 112 forks source link

"Error getting active count data" after upgrading ES to 5.1.1 #101

Closed lbrug closed 7 years ago

lbrug commented 7 years ago

I've upgraded ES from 2.4.0 to 5.1.1 and 411 started to throw this error when it loads the dashboard Error getting active count data

Also, in the Alerts tab: Error executing query

I upgraded then 411 from 1.0.1 to 1.1.0 but the errors still remains.

Apache error log says:

[Wed Dec 21 10:46:20.585333 2016] [:error] [pid 1960] [client 172.24.17.15:58968] except [NONE] RuntimeException: "Error getting active count data" at [/var/www/411/phplib/ESClient.php:367] 0:[FOO\\ESClient->getActiveAlertCounts() called at [/var/www/411/phplib/REST/Dashboard.php:27]] 1:[FOO\\Dashboard_REST->GET() called at [/var/www/411/phplib/REST.php:107]] 2:[FOO\\REST->route() called at [/var/www/411/htdocs/api/dashboard.php:6]], referer: http://411alertas.xxxxxx.com.ar/
[Wed Dec 21 10:46:22.272387 2016] [:error] [pid 32458] [client 172.24.17.15:58971] except [NONE] RuntimeException: "Error executing query" at [/var/www/411/phplib/ESClient.php:275] 0:[FOO\\ESClient->bootstrap() called at [/var/www/411/phplib/REST/Alerts.php:141]] 1:[FOO\\Alerts_REST->bootstrapAlerts() called at [/var/www/411/phplib/REST/Alerts.php:80]] 2:[FOO\\Alerts_REST->GET() called at [/var/www/411/phplib/REST.php:107]] 3:[FOO\\REST->route() called at [/var/www/411/htdocs/api/alerts.php:6]], referer: http://411alertas.xxxxxx.com.ar/alerts?query=state:(0+1)

I followed the upgrade steps with no problems. Also I tried deleting old indices in ES and replacing the 411 SQLite DB from a new empty one, with no success.

Any hint? Thanks in advance. Leo

kiwiz commented 7 years ago

Hey @lbrug, 411 doesn't currently support ES 5.0. We're running 2.x internally and it will be a while before we upgrade. If you're feeling adventurous, a PR would be greatly appreciated. See #84 for some additional info.

lbrug commented 7 years ago

Sorry to read that :( Unfortunately I can't help you with development. I'll stay around anyway. Thanks a lot. Leo.

sts commented 7 years ago

Looks like this might be related to the following changes:

https://www.elastic.co/guide/en/elasticsearch/reference/5.x/query-dsl-filtered-query.html https://www.elastic.co/guide/en/elasticsearch/reference/5.x/breaking_50_aggregations_changes.html#_literal_size_0_literal_on_terms_significant_terms_and_geohash_grid_aggregations

Code: https://github.com/etsy/411/blob/master/phplib/ESClient.php#L361

kiwiz commented 7 years ago

There's now (experimental) ES5.0 support. See #106 for details.