Cacti / cacti

Cacti ™
http://www.cacti.net
GNU General Public License v2.0
1.63k stars 405 forks source link

Graphs are not always refreshed properly #1286

Closed chilek closed 6 years ago

chilek commented 6 years ago

From time to time in graph_view some graphs are diaplayed but others are not. In Javascript console the following messages appear:

VM6360 jquery.js:9566 GET https://www.company.com/cacti/graph_json.php?rra_id=0&local_graph_id=1187&graph_start=1517354606&graph_end=1517376206&graph_height=240&graph_width=750 net::ERR_EMPTY_RESPONSE

VM6360 jquery.js:9566 GET https://www.company.com/cacti/graph_json.php?rra_id=0&local_graph_id=828&graph_start=1517354606&graph_end=1517376206&graph_height=240&graph_width=750 net::ERR_EMPTY_RESPONSE

VM6360 jquery.js:9566 GET https://www.company.com/cacti/graph_json.php?rra_id=0&local_graph_id=1225&graph_start=1517354606&graph_end=1517376206&graph_height=240&graph_width=750 net::ERR_INCOMPLETE_CHUNKED_ENCODING

Clicking refresh button in web browser usually refresh all elements the way that the are displayed.

System platform: CPU: i686

Server version: Apache/2.4.27 (Unix)

PHP 7.1.13 (cli) (built: Jan 8 2018 12:54:20) ( ZTS ) Copyright (c) 1997-2017 The PHP Group Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies with Zend OPcache v7.1.13, Copyright (c) 1999-2017, by Zend Technologies with Xdebug v2.5.5, Copyright (c) 2002-2017, by Derick Rethans

Mysql: 10.1.29-MariaDB

RRDtool 1.6.01.6.0

chilek commented 6 years ago

Full javascript stack trace log:

06:37:30.909 Navigated to https://www.company.com/cacti/graph_view.php?action=tree&node=tbranch-208&hgd=&hyper=true
============================================================================
06:37:33.387 jquery.js:9566 GET https://www.company.com/cacti/graph_json.php?rra_id=0&local_graph_id=1185&graph_start=1517355452&graph_end=1517377052&graph_height=240&graph_width=750 net::ERR_INCOMPLETE_CHUNKED_ENCODING
send @ jquery.js:9566
ajax @ jquery.js:9173
jQuery.ajax @ jquery-migrate.js:192
jQuery.(anonymous function) @ jquery.js:9322
getJSON @ jquery.js:9303
(anonymous) @ layout.js:2280
each @ jquery.js:362
each @ jquery.js:157
initializeGraphs @ layout.js:2275
(anonymous) @ VM6779:127
fire @ jquery.js:3317
add @ jquery.js:3376
(anonymous) @ VM6779:126
mightThrow @ jquery.js:3583
process @ jquery.js:3651
setTimeout (async)
(anonymous) @ jquery.js:3689
fire @ jquery.js:3317
add @ jquery.js:3376
(anonymous) @ jquery.js:3709
jQuery.Deferred @ jquery-migrate.js:533
then @ jquery.js:3694
jQuery.fn.ready @ jquery.js:3882
jQuery.fn.init @ jquery.js:3050
jQuery.fn.init @ jquery-migrate.js:105
jQuery @ jquery.js:98
(anonymous) @ VM6779:124
DOMEval @ jquery.js:82
domManip @ jquery.js:5788
append @ jquery.js:5924
(anonymous) @ jquery.js:6018
access @ jquery.js:3981
html @ jquery.js:5985
(anonymous) @ graph_view.php?action=tree&node=tbranch-208&hgd=&hyper=true:140
fire @ jquery.js:3317
fireWith @ jquery.js:3447
done @ jquery.js:9272
(anonymous) @ jquery.js:9514
XMLHttpRequest.send (async)
send @ jquery.js:9566
ajax @ jquery.js:9173
jQuery.ajax @ jquery-migrate.js:192
jQuery.(anonymous function) @ jquery.js:9322
(anonymous) @ graph_view.php?action=tree&node=tbranch-208&hgd=&hyper=true:139
dispatch @ jquery.js:5206
elemData.handle @ jquery.js:5014
trigger @ jquery.js:8201
triggerHandler @ jquery.js:8275
trigger @ jstree.js:884
select_node @ jstree.js:3179
(anonymous) @ jstree.js:3438
each @ jquery.js:362
set_state @ jstree.js:3437
set_state @ jstree.js:3428
(anonymous) @ jstree.js:3415
_load_nodes @ jstree.js:1302
c @ jstree.js:1285
(anonymous) @ jstree.js:1271
proxy @ jquery.js:496
(anonymous) @ jstree.js:1401
_append_html_data @ jstree.js:1514
(anonymous) @ jstree.js:1401
proxy @ jquery.js:496
fire @ jquery.js:3317
fireWith @ jquery.js:3447
done @ jquery.js:9272
(anonymous) @ jquery.js:9514
XMLHttpRequest.send (async)
send @ jquery.js:9566
ajax @ jquery.js:9173
jQuery.ajax @ jquery-migrate.js:192
_load_node @ jstree.js:1393
load_node @ jstree.js:1238
_load_nodes @ jstree.js:1290
c @ jstree.js:1285
(anonymous) @ jstree.js:1271
proxy @ jquery.js:496
(anonymous) @ jstree.js:1401
_append_html_data @ jstree.js:1514
(anonymous) @ jstree.js:1401
proxy @ jquery.js:496
fire @ jquery.js:3317
fireWith @ jquery.js:3447
done @ jquery.js:9272
(anonymous) @ jquery.js:9514
XMLHttpRequest.send (async)
send @ jquery.js:9566
ajax @ jquery.js:9173
jQuery.ajax @ jquery-migrate.js:192
_load_node @ jstree.js:1393
load_node @ jstree.js:1238
_load_nodes @ jstree.js:1290
set_state @ jstree.js:3412
restore_state @ jstree.js:7803
(anonymous) @ jstree.js:7778
proxy @ jquery.js:496
dispatch @ jquery.js:5206
elemData.handle @ jquery.js:5014
trigger @ jquery.js:8201
triggerHandler @ jquery.js:8275
trigger @ jstree.js:884
(anonymous) @ jstree.js:753
proxy @ jquery.js:496
setTimeout (async)
(anonymous) @ jstree.js:732
proxy @ jquery.js:496
dispatch @ jquery.js:5206
elemData.handle @ jquery.js:5014
trigger @ jquery.js:8201
triggerHandler @ jquery.js:8275
trigger @ jstree.js:884
(anonymous) @ jstree.js:1269
proxy @ jquery.js:496
(anonymous) @ jstree.js:1401
_append_html_data @ jstree.js:1514
(anonymous) @ jstree.js:1401
proxy @ jquery.js:496
fire @ jquery.js:3317
fireWith @ jquery.js:3447
done @ jquery.js:9272
(anonymous) @ jquery.js:9514
XMLHttpRequest.send (async)
send @ jquery.js:9566
ajax @ jquery.js:9173
jQuery.ajax @ jquery-migrate.js:192
_load_node @ jstree.js:1393
load_node @ jstree.js:1238
init @ jstree.js:526
init @ jstree.js:7873
$.jstree.create @ jstree.js:99
(anonymous) @ jstree.js:221
each @ jquery.js:362
each @ jquery.js:157
$.fn.jstree @ jstree.js:211
(anonymous) @ graph_view.php?action=tree&node=tbranch-208&hgd=&hyper=true:159
each @ jquery.js:362
each @ jquery.js:157
(anonymous) @ graph_view.php?action=tree&node=tbranch-208&hgd=&hyper=true:102
mightThrow @ jquery.js:3583
process @ jquery.js:3651
setTimeout (async)
(anonymous) @ jquery.js:3689
fire @ jquery.js:3317
fireWith @ jquery.js:3447
fire @ jquery.js:3455
fire @ jquery.js:3317
fireWith @ jquery.js:3447
ready @ jquery.js:3920
completed @ jquery.js:3930
=============================================================================
06:37:34.244 jquery.js:9566 GET https://www.company.com/cacti/graph_json.php?rra_id=0&local_graph_id=795&graph_start=1517355452&graph_end=1517377052&graph_height=240&graph_width=750 net::ERR_EMPTY_RESPONSE
send @ jquery.js:9566
ajax @ jquery.js:9173
jQuery.ajax @ jquery-migrate.js:192
jQuery.(anonymous function) @ jquery.js:9322
getJSON @ jquery.js:9303
(anonymous) @ layout.js:2280
each @ jquery.js:362
each @ jquery.js:157
initializeGraphs @ layout.js:2275
(anonymous) @ VM6779:127
fire @ jquery.js:3317
add @ jquery.js:3376
(anonymous) @ VM6779:126
mightThrow @ jquery.js:3583
process @ jquery.js:3651
setTimeout (async)
(anonymous) @ jquery.js:3689
fire @ jquery.js:3317
add @ jquery.js:3376
(anonymous) @ jquery.js:3709
jQuery.Deferred @ jquery-migrate.js:533
then @ jquery.js:3694
jQuery.fn.ready @ jquery.js:3882
jQuery.fn.init @ jquery.js:3050
jQuery.fn.init @ jquery-migrate.js:105
jQuery @ jquery.js:98
(anonymous) @ VM6779:124
DOMEval @ jquery.js:82
domManip @ jquery.js:5788
append @ jquery.js:5924
(anonymous) @ jquery.js:6018
access @ jquery.js:3981
html @ jquery.js:5985
(anonymous) @ graph_view.php?action=tree&node=tbranch-208&hgd=&hyper=true:140
fire @ jquery.js:3317
fireWith @ jquery.js:3447
done @ jquery.js:9272
(anonymous) @ jquery.js:9514
XMLHttpRequest.send (async)
send @ jquery.js:9566
ajax @ jquery.js:9173
jQuery.ajax @ jquery-migrate.js:192
jQuery.(anonymous function) @ jquery.js:9322
(anonymous) @ graph_view.php?action=tree&node=tbranch-208&hgd=&hyper=true:139
dispatch @ jquery.js:5206
elemData.handle @ jquery.js:5014
trigger @ jquery.js:8201
triggerHandler @ jquery.js:8275
trigger @ jstree.js:884
select_node @ jstree.js:3179
(anonymous) @ jstree.js:3438
each @ jquery.js:362
set_state @ jstree.js:3437
set_state @ jstree.js:3428
(anonymous) @ jstree.js:3415
_load_nodes @ jstree.js:1302
c @ jstree.js:1285
(anonymous) @ jstree.js:1271
proxy @ jquery.js:496
(anonymous) @ jstree.js:1401
_append_html_data @ jstree.js:1514
(anonymous) @ jstree.js:1401
proxy @ jquery.js:496
fire @ jquery.js:3317
fireWith @ jquery.js:3447
done @ jquery.js:9272
(anonymous) @ jquery.js:9514
XMLHttpRequest.send (async)
send @ jquery.js:9566
ajax @ jquery.js:9173
jQuery.ajax @ jquery-migrate.js:192
_load_node @ jstree.js:1393
load_node @ jstree.js:1238
_load_nodes @ jstree.js:1290
c @ jstree.js:1285
(anonymous) @ jstree.js:1271
proxy @ jquery.js:496
(anonymous) @ jstree.js:1401
_append_html_data @ jstree.js:1514
(anonymous) @ jstree.js:1401
proxy @ jquery.js:496
fire @ jquery.js:3317
fireWith @ jquery.js:3447
done @ jquery.js:9272
(anonymous) @ jquery.js:9514
XMLHttpRequest.send (async)
send @ jquery.js:9566
ajax @ jquery.js:9173
jQuery.ajax @ jquery-migrate.js:192
_load_node @ jstree.js:1393
load_node @ jstree.js:1238
_load_nodes @ jstree.js:1290
set_state @ jstree.js:3412
restore_state @ jstree.js:7803
(anonymous) @ jstree.js:7778
proxy @ jquery.js:496
dispatch @ jquery.js:5206
elemData.handle @ jquery.js:5014
trigger @ jquery.js:8201
triggerHandler @ jquery.js:8275
trigger @ jstree.js:884
(anonymous) @ jstree.js:753
proxy @ jquery.js:496
setTimeout (async)
(anonymous) @ jstree.js:732
proxy @ jquery.js:496
dispatch @ jquery.js:5206
elemData.handle @ jquery.js:5014
trigger @ jquery.js:8201
triggerHandler @ jquery.js:8275
trigger @ jstree.js:884
(anonymous) @ jstree.js:1269
proxy @ jquery.js:496
(anonymous) @ jstree.js:1401
_append_html_data @ jstree.js:1514
(anonymous) @ jstree.js:1401
proxy @ jquery.js:496
fire @ jquery.js:3317
fireWith @ jquery.js:3447
done @ jquery.js:9272
(anonymous) @ jquery.js:9514
XMLHttpRequest.send (async)
send @ jquery.js:9566
ajax @ jquery.js:9173
jQuery.ajax @ jquery-migrate.js:192
_load_node @ jstree.js:1393
load_node @ jstree.js:1238
init @ jstree.js:526
init @ jstree.js:7873
$.jstree.create @ jstree.js:99
(anonymous) @ jstree.js:221
each @ jquery.js:362
each @ jquery.js:157
$.fn.jstree @ jstree.js:211
(anonymous) @ graph_view.php?action=tree&node=tbranch-208&hgd=&hyper=true:159
each @ jquery.js:362
each @ jquery.js:157
(anonymous) @ graph_view.php?action=tree&node=tbranch-208&hgd=&hyper=true:102
mightThrow @ jquery.js:3583
process @ jquery.js:3651
setTimeout (async)
(anonymous) @ jquery.js:3689
fire @ jquery.js:3317
fireWith @ jquery.js:3447
fire @ jquery.js:3455
fire @ jquery.js:3317
fireWith @ jquery.js:3447
ready @ jquery.js:3920
completed @ jquery.js:3930
============================================================================
06:37:34.248 jquery.js:9566 GET https://www.company.com/cacti/graph_json.php?rra_id=0&local_graph_id=1191&graph_start=1517355452&graph_end=1517377052&graph_height=240&graph_width=750 net::ERR_INCOMPLETE_CHUNKED_ENCODING
send @ jquery.js:9566
ajax @ jquery.js:9173
jQuery.ajax @ jquery-migrate.js:192
jQuery.(anonymous function) @ jquery.js:9322
getJSON @ jquery.js:9303
(anonymous) @ layout.js:2280
each @ jquery.js:362
each @ jquery.js:157
initializeGraphs @ layout.js:2275
(anonymous) @ VM6779:127
fire @ jquery.js:3317
add @ jquery.js:3376
(anonymous) @ VM6779:126
mightThrow @ jquery.js:3583
process @ jquery.js:3651
setTimeout (async)
(anonymous) @ jquery.js:3689
fire @ jquery.js:3317
add @ jquery.js:3376
(anonymous) @ jquery.js:3709
jQuery.Deferred @ jquery-migrate.js:533
then @ jquery.js:3694
jQuery.fn.ready @ jquery.js:3882
jQuery.fn.init @ jquery.js:3050
jQuery.fn.init @ jquery-migrate.js:105
jQuery @ jquery.js:98
(anonymous) @ VM6779:124
DOMEval @ jquery.js:82
domManip @ jquery.js:5788
append @ jquery.js:5924
(anonymous) @ jquery.js:6018
access @ jquery.js:3981
html @ jquery.js:5985
(anonymous) @ graph_view.php?action=tree&node=tbranch-208&hgd=&hyper=true:140
fire @ jquery.js:3317
fireWith @ jquery.js:3447
done @ jquery.js:9272
(anonymous) @ jquery.js:9514
XMLHttpRequest.send (async)
send @ jquery.js:9566
ajax @ jquery.js:9173
jQuery.ajax @ jquery-migrate.js:192
jQuery.(anonymous function) @ jquery.js:9322
(anonymous) @ graph_view.php?action=tree&node=tbranch-208&hgd=&hyper=true:139
dispatch @ jquery.js:5206
elemData.handle @ jquery.js:5014
trigger @ jquery.js:8201
triggerHandler @ jquery.js:8275
trigger @ jstree.js:884
select_node @ jstree.js:3179
(anonymous) @ jstree.js:3438
each @ jquery.js:362
set_state @ jstree.js:3437
set_state @ jstree.js:3428
(anonymous) @ jstree.js:3415
_load_nodes @ jstree.js:1302
c @ jstree.js:1285
(anonymous) @ jstree.js:1271
proxy @ jquery.js:496
(anonymous) @ jstree.js:1401
_append_html_data @ jstree.js:1514
(anonymous) @ jstree.js:1401
proxy @ jquery.js:496
fire @ jquery.js:3317
fireWith @ jquery.js:3447
done @ jquery.js:9272
(anonymous) @ jquery.js:9514
XMLHttpRequest.send (async)
send @ jquery.js:9566
ajax @ jquery.js:9173
jQuery.ajax @ jquery-migrate.js:192
_load_node @ jstree.js:1393
load_node @ jstree.js:1238
_load_nodes @ jstree.js:1290
c @ jstree.js:1285
(anonymous) @ jstree.js:1271
proxy @ jquery.js:496
(anonymous) @ jstree.js:1401
_append_html_data @ jstree.js:1514
(anonymous) @ jstree.js:1401
proxy @ jquery.js:496
fire @ jquery.js:3317
fireWith @ jquery.js:3447
done @ jquery.js:9272
(anonymous) @ jquery.js:9514
XMLHttpRequest.send (async)
send @ jquery.js:9566
ajax @ jquery.js:9173
jQuery.ajax @ jquery-migrate.js:192
_load_node @ jstree.js:1393
load_node @ jstree.js:1238
_load_nodes @ jstree.js:1290
set_state @ jstree.js:3412
restore_state @ jstree.js:7803
(anonymous) @ jstree.js:7778
proxy @ jquery.js:496
dispatch @ jquery.js:5206
elemData.handle @ jquery.js:5014
trigger @ jquery.js:8201
triggerHandler @ jquery.js:8275
trigger @ jstree.js:884
(anonymous) @ jstree.js:753
proxy @ jquery.js:496
setTimeout (async)
(anonymous) @ jstree.js:732
proxy @ jquery.js:496
dispatch @ jquery.js:5206
elemData.handle @ jquery.js:5014
trigger @ jquery.js:8201
triggerHandler @ jquery.js:8275
trigger @ jstree.js:884
(anonymous) @ jstree.js:1269
proxy @ jquery.js:496
(anonymous) @ jstree.js:1401
_append_html_data @ jstree.js:1514
(anonymous) @ jstree.js:1401
proxy @ jquery.js:496
fire @ jquery.js:3317
fireWith @ jquery.js:3447
done @ jquery.js:9272
(anonymous) @ jquery.js:9514
XMLHttpRequest.send (async)
send @ jquery.js:9566
ajax @ jquery.js:9173
jQuery.ajax @ jquery-migrate.js:192
_load_node @ jstree.js:1393
load_node @ jstree.js:1238
init @ jstree.js:526
init @ jstree.js:7873
$.jstree.create @ jstree.js:99
(anonymous) @ jstree.js:221
each @ jquery.js:362
each @ jquery.js:157
$.fn.jstree @ jstree.js:211
(anonymous) @ graph_view.php?action=tree&node=tbranch-208&hgd=&hyper=true:159
each @ jquery.js:362
each @ jquery.js:157
(anonymous) @ graph_view.php?action=tree&node=tbranch-208&hgd=&hyper=true:102
mightThrow @ jquery.js:3583
process @ jquery.js:3651
setTimeout (async)
(anonymous) @ jquery.js:3689
fire @ jquery.js:3317
fireWith @ jquery.js:3447
fire @ jquery.js:3455
fire @ jquery.js:3317
fireWith @ jquery.js:3447
ready @ jquery.js:3920
completed @ jquery.js:3930
============================================================================
06:37:36.663 jquery.js:9566 GET https://www.company.com/cacti/graph_json.php?rra_id=0&local_graph_id=649&graph_start=1517355452&graph_end=1517377052&graph_height=240&graph_width=750 net::ERR_INCOMPLETE_CHUNKED_ENCODING
send @ jquery.js:9566
ajax @ jquery.js:9173
jQuery.ajax @ jquery-migrate.js:192
jQuery.(anonymous function) @ jquery.js:9322
getJSON @ jquery.js:9303
(anonymous) @ layout.js:2280
each @ jquery.js:362
each @ jquery.js:157
initializeGraphs @ layout.js:2275
(anonymous) @ VM6779:127
fire @ jquery.js:3317
add @ jquery.js:3376
(anonymous) @ VM6779:126
mightThrow @ jquery.js:3583
process @ jquery.js:3651
setTimeout (async)
(anonymous) @ jquery.js:3689
fire @ jquery.js:3317
add @ jquery.js:3376
(anonymous) @ jquery.js:3709
jQuery.Deferred @ jquery-migrate.js:533
then @ jquery.js:3694
jQuery.fn.ready @ jquery.js:3882
jQuery.fn.init @ jquery.js:3050
jQuery.fn.init @ jquery-migrate.js:105
jQuery @ jquery.js:98
(anonymous) @ VM6779:124
DOMEval @ jquery.js:82
domManip @ jquery.js:5788
append @ jquery.js:5924
(anonymous) @ jquery.js:6018
access @ jquery.js:3981
html @ jquery.js:5985
(anonymous) @ graph_view.php?action=tree&node=tbranch-208&hgd=&hyper=true:140
fire @ jquery.js:3317
fireWith @ jquery.js:3447
done @ jquery.js:9272
(anonymous) @ jquery.js:9514
XMLHttpRequest.send (async)
send @ jquery.js:9566
ajax @ jquery.js:9173
jQuery.ajax @ jquery-migrate.js:192
jQuery.(anonymous function) @ jquery.js:9322
(anonymous) @ graph_view.php?action=tree&node=tbranch-208&hgd=&hyper=true:139
dispatch @ jquery.js:5206
elemData.handle @ jquery.js:5014
trigger @ jquery.js:8201
triggerHandler @ jquery.js:8275
trigger @ jstree.js:884
select_node @ jstree.js:3179
(anonymous) @ jstree.js:3438
each @ jquery.js:362
set_state @ jstree.js:3437
set_state @ jstree.js:3428
(anonymous) @ jstree.js:3415
_load_nodes @ jstree.js:1302
c @ jstree.js:1285
(anonymous) @ jstree.js:1271
proxy @ jquery.js:496
(anonymous) @ jstree.js:1401
_append_html_data @ jstree.js:1514
(anonymous) @ jstree.js:1401
proxy @ jquery.js:496
fire @ jquery.js:3317
fireWith @ jquery.js:3447
done @ jquery.js:9272
(anonymous) @ jquery.js:9514
XMLHttpRequest.send (async)
send @ jquery.js:9566
ajax @ jquery.js:9173
jQuery.ajax @ jquery-migrate.js:192
_load_node @ jstree.js:1393
load_node @ jstree.js:1238
_load_nodes @ jstree.js:1290
c @ jstree.js:1285
(anonymous) @ jstree.js:1271
proxy @ jquery.js:496
(anonymous) @ jstree.js:1401
_append_html_data @ jstree.js:1514
(anonymous) @ jstree.js:1401
proxy @ jquery.js:496
fire @ jquery.js:3317
fireWith @ jquery.js:3447
done @ jquery.js:9272
(anonymous) @ jquery.js:9514
XMLHttpRequest.send (async)
send @ jquery.js:9566
ajax @ jquery.js:9173
jQuery.ajax @ jquery-migrate.js:192
_load_node @ jstree.js:1393
load_node @ jstree.js:1238
_load_nodes @ jstree.js:1290
set_state @ jstree.js:3412
restore_state @ jstree.js:7803
(anonymous) @ jstree.js:7778
proxy @ jquery.js:496
dispatch @ jquery.js:5206
elemData.handle @ jquery.js:5014
trigger @ jquery.js:8201
triggerHandler @ jquery.js:8275
trigger @ jstree.js:884
(anonymous) @ jstree.js:753
proxy @ jquery.js:496
setTimeout (async)
(anonymous) @ jstree.js:732
proxy @ jquery.js:496
dispatch @ jquery.js:5206
elemData.handle @ jquery.js:5014
trigger @ jquery.js:8201
triggerHandler @ jquery.js:8275
trigger @ jstree.js:884
(anonymous) @ jstree.js:1269
proxy @ jquery.js:496
(anonymous) @ jstree.js:1401
_append_html_data @ jstree.js:1514
(anonymous) @ jstree.js:1401
proxy @ jquery.js:496
fire @ jquery.js:3317
fireWith @ jquery.js:3447
done @ jquery.js:9272
(anonymous) @ jquery.js:9514
XMLHttpRequest.send (async)
send @ jquery.js:9566
ajax @ jquery.js:9173
jQuery.ajax @ jquery-migrate.js:192
_load_node @ jstree.js:1393
load_node @ jstree.js:1238
init @ jstree.js:526
init @ jstree.js:7873
$.jstree.create @ jstree.js:99
(anonymous) @ jstree.js:221
each @ jquery.js:362
each @ jquery.js:157
$.fn.jstree @ jstree.js:211
(anonymous) @ graph_view.php?action=tree&node=tbranch-208&hgd=&hyper=true:159
each @ jquery.js:362
each @ jquery.js:157
(anonymous) @ graph_view.php?action=tree&node=tbranch-208&hgd=&hyper=true:102
mightThrow @ jquery.js:3583
process @ jquery.js:3651
setTimeout (async)
(anonymous) @ jquery.js:3689
fire @ jquery.js:3317
fireWith @ jquery.js:3447
fire @ jquery.js:3455
fire @ jquery.js:3317
fireWith @ jquery.js:3447
ready @ jquery.js:3920
completed @ jquery.js:3930
============================================================================
06:37:36.669 jquery.js:9566 GET https://www.company.com/cacti/graph_json.php?rra_id=0&local_graph_id=1225&graph_start=1517355452&graph_end=1517377052&graph_height=240&graph_width=750 net::ERR_INCOMPLETE_CHUNKED_ENCODING
send @ jquery.js:9566
ajax @ jquery.js:9173
jQuery.ajax @ jquery-migrate.js:192
jQuery.(anonymous function) @ jquery.js:9322
getJSON @ jquery.js:9303
(anonymous) @ layout.js:2280
each @ jquery.js:362
each @ jquery.js:157
initializeGraphs @ layout.js:2275
(anonymous) @ VM6779:127
fire @ jquery.js:3317
add @ jquery.js:3376
(anonymous) @ VM6779:126
mightThrow @ jquery.js:3583
process @ jquery.js:3651
setTimeout (async)
(anonymous) @ jquery.js:3689
fire @ jquery.js:3317
add @ jquery.js:3376
(anonymous) @ jquery.js:3709
jQuery.Deferred @ jquery-migrate.js:533
then @ jquery.js:3694
jQuery.fn.ready @ jquery.js:3882
jQuery.fn.init @ jquery.js:3050
jQuery.fn.init @ jquery-migrate.js:105
jQuery @ jquery.js:98
(anonymous) @ VM6779:124
DOMEval @ jquery.js:82
domManip @ jquery.js:5788
append @ jquery.js:5924
(anonymous) @ jquery.js:6018
access @ jquery.js:3981
html @ jquery.js:5985
(anonymous) @ graph_view.php?action=tree&node=tbranch-208&hgd=&hyper=true:140
fire @ jquery.js:3317
fireWith @ jquery.js:3447
done @ jquery.js:9272
(anonymous) @ jquery.js:9514
XMLHttpRequest.send (async)
send @ jquery.js:9566
ajax @ jquery.js:9173
jQuery.ajax @ jquery-migrate.js:192
jQuery.(anonymous function) @ jquery.js:9322
(anonymous) @ graph_view.php?action=tree&node=tbranch-208&hgd=&hyper=true:139
dispatch @ jquery.js:5206
elemData.handle @ jquery.js:5014
trigger @ jquery.js:8201
triggerHandler @ jquery.js:8275
trigger @ jstree.js:884
select_node @ jstree.js:3179
(anonymous) @ jstree.js:3438
each @ jquery.js:362
set_state @ jstree.js:3437
set_state @ jstree.js:3428
(anonymous) @ jstree.js:3415
_load_nodes @ jstree.js:1302
c @ jstree.js:1285
(anonymous) @ jstree.js:1271
proxy @ jquery.js:496
(anonymous) @ jstree.js:1401
_append_html_data @ jstree.js:1514
(anonymous) @ jstree.js:1401
proxy @ jquery.js:496
fire @ jquery.js:3317
fireWith @ jquery.js:3447
done @ jquery.js:9272
(anonymous) @ jquery.js:9514
XMLHttpRequest.send (async)
send @ jquery.js:9566
ajax @ jquery.js:9173
jQuery.ajax @ jquery-migrate.js:192
_load_node @ jstree.js:1393
load_node @ jstree.js:1238
_load_nodes @ jstree.js:1290
c @ jstree.js:1285
(anonymous) @ jstree.js:1271
proxy @ jquery.js:496
(anonymous) @ jstree.js:1401
_append_html_data @ jstree.js:1514
(anonymous) @ jstree.js:1401
proxy @ jquery.js:496
fire @ jquery.js:3317
fireWith @ jquery.js:3447
done @ jquery.js:9272
(anonymous) @ jquery.js:9514
XMLHttpRequest.send (async)
send @ jquery.js:9566
ajax @ jquery.js:9173
jQuery.ajax @ jquery-migrate.js:192
_load_node @ jstree.js:1393
load_node @ jstree.js:1238
_load_nodes @ jstree.js:1290
set_state @ jstree.js:3412
restore_state @ jstree.js:7803
(anonymous) @ jstree.js:7778
proxy @ jquery.js:496
dispatch @ jquery.js:5206
elemData.handle @ jquery.js:5014
trigger @ jquery.js:8201
triggerHandler @ jquery.js:8275
trigger @ jstree.js:884
(anonymous) @ jstree.js:753
proxy @ jquery.js:496
setTimeout (async)
(anonymous) @ jstree.js:732
proxy @ jquery.js:496
dispatch @ jquery.js:5206
elemData.handle @ jquery.js:5014
trigger @ jquery.js:8201
triggerHandler @ jquery.js:8275
trigger @ jstree.js:884
(anonymous) @ jstree.js:1269
proxy @ jquery.js:496
(anonymous) @ jstree.js:1401
_append_html_data @ jstree.js:1514
(anonymous) @ jstree.js:1401
proxy @ jquery.js:496
fire @ jquery.js:3317
fireWith @ jquery.js:3447
done @ jquery.js:9272
(anonymous) @ jquery.js:9514
XMLHttpRequest.send (async)
send @ jquery.js:9566
ajax @ jquery.js:9173
jQuery.ajax @ jquery-migrate.js:192
_load_node @ jstree.js:1393
load_node @ jstree.js:1238
init @ jstree.js:526
init @ jstree.js:7873
$.jstree.create @ jstree.js:99
(anonymous) @ jstree.js:221
each @ jquery.js:362
each @ jquery.js:157
$.fn.jstree @ jstree.js:211
(anonymous) @ graph_view.php?action=tree&node=tbranch-208&hgd=&hyper=true:159
each @ jquery.js:362
each @ jquery.js:157
(anonymous) @ graph_view.php?action=tree&node=tbranch-208&hgd=&hyper=true:102
mightThrow @ jquery.js:3583
process @ jquery.js:3651
setTimeout (async)
(anonymous) @ jquery.js:3689
fire @ jquery.js:3317
fireWith @ jquery.js:3447
fire @ jquery.js:3455
fire @ jquery.js:3317
fireWith @ jquery.js:3447
ready @ jquery.js:3920
completed @ jquery.js:3930
chilek commented 6 years ago

It looks like graph loading AJAX requests are not properly handled.

netniV commented 6 years ago

@chilek If you are running on the latest code, this should give you a dialog box when the ajax fails. Just thinking about this now, makes me wonder if that would give you many errors if there is an overall problem but the only way to know is to see it in action.

There is a known issue where a JSON call sometimes returns a HTML page displaying a validation error. I'm not sure if I've actually created a full issue for that as it was picked up during my testing of another issue. Obviously, returning HTML to the getJSON function results in a failure because it can't parse that as JSON.

What cacti version are you running?

chilek commented 6 years ago

What cacti version are you running?

1.1.33

Google Chrome: 64.0.3282.119 (Linux)

netniV commented 6 years ago

When you browse directly to: https://www.company.com/cacti/graph_json.php?rra_id=0&local_graph_id=795&graph_start=1517355452&graph_end=1517377052&graph_height=240&graph_width=750

What does it give you in response? It should be a JSON string.

chilek commented 6 years ago

@netniV json object containing graph.

In mean time I've checked in browser's network inpsector how reply looks like - when the error in console triggers, reply visible in inspector is cut in some place.

chilek commented 6 years ago

@netniV: reply catched by web browser is cut to something rounded to kilobytes or even 4k.

netniV commented 6 years ago

Based off what I saw here there are no limits on the getJSON call, but there could be with the server output. However, other comments about increase limits for JSON sizes refer to .NET based code not PHP.

How long does the response take?

chilek commented 6 years ago

sometimes even a few seconds. Probably I've found guilty one - xdebug extension. I'll confirm (or not) it soon in this issue.

chilek commented 6 years ago

@netniV: two possible solutions occured in my installation which helped for some time: 1) Apache restart (which obviously was required to enable/disable xdebug extension in php). 2) Disabling xdebug extension as is (but I'm affraid that's not it).

netniV commented 6 years ago

So the issue resurfaced after that?

chilek commented 6 years ago

Not yet, but I'll be montioring this and if it return I will let know.

chilek commented 6 years ago

Today decribed problem has returned. I'm going to disable xdebug extension for longer time and check if it helps.

chilek commented 6 years ago

Disabling xdebug php extension didn't help - problem returned next day.

netniV commented 6 years ago

What is the full URL of the request that returns the truncated data? Is it the same as above? If so, maybe log the response from graph_json.php to a temporary file

file_put_contents('/tmp/json.log",$response)

where $response is the variable that is returned. I'm just heading out the door so can't verify the actually response variable.

chilek commented 6 years ago

I'll check it after weekend, because I've already restarted www server and now works ok (with php xdebug extension enabled). I'm almost sure that when I check it on monday the problem will return.

netniV commented 6 years ago

Seems strange that a server reboot is clearing it though. That would suggest that it's something memory or resource related.

chilek commented 6 years ago

Not server reboot - only apache restart.

netniV commented 6 years ago

That's what I meant, web server / apache reboot/restart. Bad choice of words really... 👍

cigamit commented 6 years ago

It's been a while since I looked at this, but the following looks wrong. graph_view.php?action=tree&node=tbranch-208&hgd=&hyper=true:102, I need to review the tree code. The :102 at the end does not make sense.

cigamit commented 6 years ago

Okay read from the start. Very odd. I think the :102 may have everything to do with the trace syntax and not the real URL.

cigamit commented 6 years ago

Joyful post here: http://thisinterestsme.com/err_incomplete_chunked_encoding/

cigamit commented 6 years ago

Let's hope that my graph_json.php commit helps things along.

chilek commented 6 years ago

@cigamit: I've cherry picked the above commit to my installation. I'm also curious if it'll help. For 5 minute test works well, but give it a try more time. I'll let know about result after weekend.

chilek commented 6 years ago

Unfortunately I was too fast - problem persists.

chilek commented 6 years ago

Maybe it somehow related with long reponse time for json document queries?

netniV commented 6 years ago

If you read the comments on the above commit, you will see we are already discussing how to further fix the issue. The commit alone makes sure the content type when successful is always treated to be JSON. If @cigamit hasn't already done so, I may see about working on a further fix for this tomorrow.

cigamit commented 6 years ago

@netniV & @chilek, please test using this. If there is a validation failure, you won't get a graph refresh, but instead you will get a nasty dialog. At least it'll be trapped. I could have done this with headers as well. Comments appreciated on method. It feels a little hackish.

chilek commented 6 years ago

@cigamit I tried to cherry-pick 99d670bed29a8296139cd09ece8d375b2d05aa0f to my local master installation, but I got conflicts:

On branch master
Your branch is ahead of 'origin/master' by 8 commits.
  (use "git push" to publish your local commits)
You are currently cherry-picking commit 99d670be.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:

    modified:   graph_json.php
    modified:   lib/html_validate.php

Unmerged paths:
  (use "git add <file>..." to mark resolution)

    both modified:   include/layout.js

Is there a way to do this without conflicts? Maybe cherry-pick one more commit from develop would be enough to avoid this conflict?

netniV commented 6 years ago

What both modified means is that you have manually modified the layout.js (probably through another cherry pick) and are attempting to modify it again with the current merge/cherry-pick against the same lines so it does not know which is best.

If you are sure that you haven't modified the file, I would git checkout include/layout.js but do be aware that as commits are cumulative within a tree, picking one specific commit may not give you all functionality expected at that commit level.

If you are not sure, do a git diff include/layout.js to see what the differences are between the .git head and your copy of layout.js

chilek commented 6 years ago

What both modified means is that you have manually modified the layout.js (probably through another cherry pick) and are attempting to modify it again with the current merge/cherry-pick against the same lines so it does not know which is best.

Yeah I know what it means, but thanks for detailed explanation!

My question on other words: is there a way to use my production installation without switch to develop branch and at the same time testing above changes? Will next numbered 1.1.x relase contain these changes?

cigamit commented 6 years ago

The development branch changes are getting pretty thick at this point. You will have to be very careful as there are changes to lib/functions.php, lib/html.php, and several other API, base, and header files. We are pretty close to release. Just waiting on one team member to get back from Europe. I'll be checking the bugs this morning, and if I can't find any low hanging fruit, we will be ready for release.

chilek commented 6 years ago

@cigamit: thanks for info so I'll wait for next numbered release.

netniV commented 6 years ago

From what I have seen, if they are appearing in the docs/CHANGELOG under the develop branch, they will be included in the next release. Unfortunately, there is no QA branch for pre-release where the only updates are bug fixes to the code above to be released.

Cherry picking can be hard because there can be many many changes to various parts of the system. Even though most will be part of a single commit, there can be further changes to fix aspects of that change which you could miss or updates relying on previous commits that you didn't cherry pick.

You would be better off having a copy of your production system as a test (if possible). Or even just a basic test system were you can add in the device you're having issues with to test the latest code against. That doesn't guarantee a like for like test, but most issues tend to be consistent when the same host/device combination are used.

Edit: Got distracted half way through typing this with some other work, didn't see @cigamit comment already 👍

cigamit commented 6 years ago

Test systems are a must when using open source software.

chilek commented 6 years ago

@cigamit: we develop open source system (LMS - Lan Management System) and we have develop branch and a few stable branches to which only bug fixes are backported. Although these stable branches are not public accessible, they are open source too!

netniV commented 6 years ago

This is an example of the differences between 1.1.32 and 1.1.33:

git diff --stat release/1.1.32 release/1.1.33
 docs/CHANGELOG            | 3 +++
 include/cacti_version     | 2 +-
 include/global_arrays.php | 1 +
 lib/functions.php         | 6 +++---
 4 files changed, 8 insertions(+), 4 deletions(-)

These are the changes so far between 1.1.33 and development:

git diff --stat release/1.1.33
 .travis.yml                         |   1 -
 aggregate_graphs.php                |  11 +-
 auth_changepassword.php             |  54 ++++++---
 auth_login.php                      |  45 ++------
 automation_snmp.php                 |  14 ++-
 cacti.sql                           |  69 ++++++------
 cdef.php                            |  18 +--
 cli/add_tree.php                    |   2 +-
 cli/audit_database.php              | 529 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 cli/convert_innodb.php              |   1 -
 cli/md5sum.php                      | 369 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 cli/remove_device.php               | 237 +++++++++++++++++++++++++++++++++++++++
 cli/removespikes.php                |   3 +-
 cli/reorder_data_query.php          |   2 +-
 color_templates.php                 |  14 ++-
 data_input.php                      |  22 ++--
 data_queries.php                    | 120 ++++++++++++++++----
 data_source_profiles.php            |  53 ++++++---
 data_sources.php                    |  17 +--
 docs/CHANGELOG                      |  30 +++++
 graph.php                           | 111 +++++++++++++------
 graph_json.php                      |   6 +-
 graph_realtime.php                  |  28 +----
 graphs.php                          |  38 ++++---
 graphs_new.php                      |  14 ++-
 host.php                            |  12 +-
 host_templates.php                  |  20 ++--
 include/auth.php                    |  22 +---
 include/cacti_version               |   2 +-
 include/global_arrays.php           |   6 +-
 include/global_constants.php        |   8 +-
 include/global_session.php          |  18 ++-
 include/js/jquery.zoom.js           |  43 ++++++--
 include/layout.js                   | 164 ++++++++++++++++-----------
 include/realtime.js                 |  34 ++++--
 include/themes/classic/main.css     |   2 +
 include/themes/dark/main.css        |   3 +-
 include/themes/modern/main.css      |   3 +-
 include/themes/paper-plane/main.css |   3 +-
 include/themes/paw/main.css         |   3 +-
 include/themes/sunrise/main.css     |   3 +-
 include/top_general_header.php      |  50 +--------
 include/top_graph_header.php        |  51 +--------
 include/top_header.php              |  51 +--------
 install/index.php                   |   6 +
 install/upgrades/1_1_31.php         |  16 +--
 install/upgrades/1_1_34.php         | 311 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 lib/api_automation.php              |  46 ++++----
 lib/boost.php                       |   4 +-
 lib/clog_webapi.php                 | 195 +++++++++++++++++++++++++++++----
 lib/data_query.php                  |   8 +-
 lib/functions.php                   | 143 ++++++++++++++++++------
 lib/html.php                        | 114 ++++++++++++++++---
 lib/html_tree.php                   |  29 +++--
 lib/html_utility.php                |   2 +-
 lib/html_validate.php               |  27 +++--
 lib/mib_cache.php                   | 117 ++++++++++----------
 lib/snmp.php                        | 260 ++++++++++++-------------------------------
 lib/utility.php                     |   4 +-
 logout.php                          |  43 +-------
 permission_denied.php               |  21 +---
 poller_automation.php               |   4 +-
 poller_maintenance.php              |   6 +-
 rrdcleaner.php                      |  54 +++++----
 script_server.php                   |   4 +-
 scripts/ss_host_cpu.php             |   2 +-
 settings.php                        |  12 +-
 tree.php                            |  77 ++++++++-----
 utilities.php                       |  17 +--
 vdef.php                            |  14 ++-
 70 files changed, 2793 insertions(+), 1049 deletions(-)

That's quite a bit of the system changed this time around due mostly to the number of bug fixes and also a couple of features. Hence why cherry picking isn't always a good thing. In fact, I think @cigamit must be getting tired of waking up to find a bunch of pull requests I sometimes generate overnight ;-)

netniV commented 6 years ago

So I was curious about the number of changes... here's some stats for those who are bored lol

Release Files Lines Lines
1.1.2 24 15321 (+) 14753 (-)
1.1.3 103 8519 (+) 823 (-)
1.1.4 99 18402 (+) 5858 (-)
1.1.5 21 1727 (+) 1621 (-)
1.1.6 283 143614 (+) 26195 (-)
1.1.7 214 30135 (+) 29047 (-)
1.1.8 95 25318 (+) 18427 (-)
1.1.9 6 9 (+) 5 (-)
1.1.10 37 3311 (+) 3002 (-)
1.1.11 85 9740 (+) 2180 (-)
1.1.12 16 1520 (+) 1345 (-)
1.1.13 73 2231 (+) 1953 (-)
1.1.14 68 3210 (+) 2930 (-)
1.1.15 6 79 (+) 3 (-)
1.1.16 32 1818 (+) 1561 (-)
1.1.17 87 3063 (+) 2615 (-)
1.1.18 29 9879 (+) 7558 (-)
1.1.19 25 49 (+) 26 (-)
1.1.20 37 616 (+) 514 (-)
1.1.21 13 326 (+) 139 (-)
1.1.22 14 175 (+) 123 (-)
1.1.23 5 23 (+) 12 (-)
1.1.24 39 12029 (+) 10679 (-)
1.1.25 27 16432 (+) 13114 (-)
1.1.26 84 10180 (+) 7846 (-)
1.1.27 212 6847 (+) 5006 (-)
1.1.28 115 2655 (+) 1653 (-)
1.1.29 33 1042 (+) 520 (-)
1.1.30 21 212 (+) 106 (-)
1.1.31 224 7327 (+) 5941 (-)
1.1.32 74 3598 (+) 2208 (-)
1.1.33 4 8 (+) 4 (-)
cigamit commented 6 years ago

Yea, we've been on a tear over the last year. Hopefully we will be slowing down on issues in the next release or so. That way we can start back into the dozens of feature requests on tap. We also have been looking at emulating Ansible Tower's API for the separation of presentation and UI. The Web Services piece will happen after 1.2. So much to do, so little time.

chilek commented 6 years ago

@cigamit: could you create any paypal donation link, please. I would like to donate 10$ per month.

chilek commented 6 years ago

1.1.34 has been released. Does it contain all fixes mentioned above? I've updated production installation already.

netniV commented 6 years ago

It contains the fixes that we did. However, you should refer back to @cigamit first link where people have described AV causing issues of Chunked data

cigamit commented 6 years ago

I would say deploy it since it has a number of minor bug fixes and some nice performance enhancements, and if the problem continues, we will have to use some console.log() statements to show the output of the json object. Simple enough.

You will just need to leave your browser open over night or something until it breaks.

chilek commented 6 years ago

Now I've got something like in screenshot in javascript console window. zrzut ekranu z 2018-02-06 11-24-08

netniV commented 6 years ago

OK, Have you tried disabling any AV that may be running and interfering with the network as per the above link from @cigamit https://github.com/Cacti/cacti/issues/1286#issuecomment-362818830:

http://thisinterestsme.com/err_incomplete_chunked_encoding/

I think that this is definitely a server or client configuration issue rather than a programming issue.

chilek commented 6 years ago

@netniV: no I haven't because I dont use any AV - my testing desktop is Fedora 27 x86_64.

netniV commented 6 years ago

OK can you grab the headers for that response?

netniV commented 6 years ago

I found a stackoverflow answer that suggests chunked coding is always possible under HTTP/1.1 see https://stackoverflow.com/a/35918498/697159 makes me wonder if we have to verify that's requested.

netniV commented 6 years ago

For reference, these are my request and response headers:


response:

Cache-Control:no-store, no-cache, must-revalidate
Connection:Keep-Alive
Content-Type:application/json
Date:Tue, 06 Feb 2018 10:49:33 GMT
Expires:Thu, 19 Nov 1981 08:52:00 GMT
Keep-Alive:timeout=5, max=98
Last-Modified:Tue, 06 Feb 2018 10:49:33 GMT
P3P:CP="CAO PSA OUR"
Pragma:no-cache
Server:Apache
Transfer-Encoding:chunked
X-Robots-Tag:noindex, nofollow

Transfer-Encoding:chunked makes me think this is possible the issue here.


request:

Accept:application/json, text/javascript, */*; q=0.01
Accept-Encoding:gzip, deflate, br
Accept-Language:en-GB,en-US;q=0.9,en;q=0.8
Connection:keep-alive
Cookie:Cacti=<auth cookie>
DNT:1
Host:cacti
Referer:https://cacti/graph_view.php?action=tree&node=tbranch-2&hgd=&hyper=true
User-Agent:Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3298.3 Safari/537.36
X-Requested-With:XMLHttpRequest
netniV commented 6 years ago

Just searched through the code, and I can't find that the code sets this header. Therefore, it may be a case that we need to remove the header if we find it present.