elsa icon indicating copy to clipboard operation
elsa copied to clipboard

Field missing in the Web interface the firt time is loaded

Open bonomani opened this issue 9 years ago • 2 comments

I am not sure it is a bug or a parameter to adjuste, but when it load the first time the ELSA web Interface with any of my browser some fields are empty like for the version of sphinx (not set) or the addterm menu (only "unclassified"). I have to reload it and then it works! Any idea of the problem? (I am woking on Centos 7 with Apache)

bonomani avatar Nov 26 '16 20:11 bonomani

I found this log message below: This is in my understandaning related to http_get for AnyEvent, but I dont really undertstand the problem. Please let me know if I can help!:

  • TRACE [2016/12/05 15:19:45] /usr/local/elsa/web/lib/Controller.pm (864) Controller::try {...} 15643 [undef] Sending request to URL http://127.0.0.1/API/local_info
  • ERROR [2016/12/05 15:19:45] /usr/local/elsa/web/lib/Controller.pm (883) Controller::ANON 15643 [undef] malformed JSON string, neither tag, array, object, number, string or atom, at character offset 0 (before "(end of string)") at /usr/local/elsa/web/lib/Controller.pm line 877.

Header: $VAR1 = { 'Reason' => 'Connection timed out', 'URL' => 'http://127.0.0.1/API/local_info', 'Status' => 596 };

body: $VAR1 = undef;

  • DEBUG [2016/12/05 15:19:45] /usr/local/elsa/web/lib/Controller.pm (757) Controller::_merge_node_info 15643 [undef] final: $VAR1 = { 'nodes' => {} };
  • DEBUG [2016/12/05 15:19:45] /usr/local/elsa/web/lib/Controller.pm (791) Controller::ANON 15643 [undef] stats: $VAR1 = { 'overall' => '0.00913190841674805'

bonomani avatar Dec 06 '16 08:12 bonomani

I think I have may be found the problem: I modified /usr/local/elsa/web/lib/Controller.pm Lines 876 } 877 AnyEvent->now_update; 878 $results{$peer} = http_get $url, headers => $headers, @no_proxy, sub {

I added the line 876 AnyEvent->now_update This just updates the counter to reflect real time and it seems to work now. I am sure that it is not the best place to add it, as you have probably the AnyEvent functions in different places. (you know that better than me :) Please let me know if you want me to try something else.

bonomani avatar Dec 06 '16 12:12 bonomani