[ZBX-16702] Error in comparison in the elastic search clearing history function Created: 2019 Sep 30 Updated: 2024 Apr 10 Resolved: 2019 Oct 15 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | API (A) |
Affects Version/s: | 4.0.13rc1, 4.2.7rc1, 4.4 (plan) |
Fix Version/s: | 4.0.14rc1, 4.2.8rc1, 4.4.1rc1, 5.0.0alpha1, 5.0 (plan) |
Type: | Problem report | Priority: | Trivial |
Reporter: | Aleksandrs Subins | Assignee: | Vasily Goncharenko (Inactive) |
Resolution: | Fixed | Votes: | 0 |
Labels: | elasticsearch, history, php7 | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified |
Attachments: |
![]() |
Team: | |
Sprint: | Sprint 56 (Sep 2019), Sprint 57 (Oct 2019) |
Story Points: | 0.125 |
Description |
The error is reproduced for PHP 7.2. Steps to reproduce: global $HISTORY; // Elasticsearch url (can be string if same url is used for all types). $HISTORY['url'] = [ 'uint' => 'http://localhost:9200', 'text' => 'http://localhost:9200' ]; // Value types stored in Elasticsearch. $HISTORY['types'] = ['uint', 'text']; 2. Create host; Result: Cannot clear history count(): Parameter must be an array or an object that implements Countable [items.php:910 → CHistoryManager->deleteHistory() → CHistoryManager->deleteHistoryFromElasticsearch() in include\classes\api\managers\CHistoryManager.php:765] file_get_contents(http://localhost:9200/uint*/values/_delete_by_query?scroll=10s): failed to open stream: No connection could be made because the target machine actively refused it. [items.php:910 → CHistoryManager->deleteHistory() → CHistoryManager->deleteHistoryFromElasticsearch() → CElasticsearchHelper::query() → CElasticsearchHelper::request() → file_get_contents() in include\classes\helpers\CElasticsearchHelper.php:58] Elasticsearch error: failed to parse JSON. |
Comments |
Comment by Vasily Goncharenko (Inactive) [ 2019 Oct 01 ] |
Fixed in development branch feature/ZBX-16702-4.0 |
Comment by Vasily Goncharenko (Inactive) [ 2019 Oct 10 ] |
Fixed in:
|