Open s3u opened 12 years ago
I see the following in the logs whenever I select "All" and hit "Search".
NoMethodError - undefined method first' for "_all":String: /usr/share/kibana/rashidkpc-Kibana-41a1298/lib/kelastic.rb:247:ininitialize' kibana.rb:66:in new' kibana.rb:66:inblock in ' /var/lib/gems/1.9.1/gems/sinatra-1.3.3/lib/sinatra/base.rb:1265:in call' /var/lib/gems/1.9.1/gems/sinatra-1.3.3/lib/sinatra/base.rb:1265:inblock in compile!' /var/lib/gems/1.9.1/gems/sinatra-1.3.3/lib/sinatra/base.rb:835:in []' /var/lib/gems/1.9.1/gems/sinatra-1.3.3/lib/sinatra/base.rb:835:inblock (3 levels) in route!' /var/lib/gems/1.9.1/gems/sinatra-1.3.3/lib/sinatra/base.rb:851:in route_eval' /var/lib/gems/1.9.1/gems/sinatra-1.3.3/lib/sinatra/base.rb:835:inblock (2 levels) in route!' /var/lib/gems/1.9.1/gems/sinatra-1.3.3/lib/sinatra/base.rb:872:in block in process_route' /var/lib/gems/1.9.1/gems/sinatra-1.3.3/lib/sinatra/base.rb:870:incatch' /var/lib/gems/1.9.1/gems/sinatra-1.3.3/lib/sinatra/base.rb:870:in process_route' /var/lib/gems/1.9.1/gems/sinatra-1.3.3/lib/sinatra/base.rb:834:inblock in route!' /var/lib/gems/1.9.1/gems/sinatra-1.3.3/lib/sinatra/base.rb:833:in each' /var/lib/gems/1.9.1/gems/sinatra-1.3.3/lib/sinatra/base.rb:833:inroute!' /var/lib/gems/1.9.1/gems/sinatra-1.3.3/lib/sinatra/base.rb:936:in dispatch!' /var/lib/gems/1.9.1/gems/sinatra-1.3.3/lib/sinatra/base.rb:769:inblock in call!' /var/lib/gems/1.9.1/gems/sinatra-1.3.3/lib/sinatra/base.rb:921:in block in invoke' /var/lib/gems/1.9.1/gems/sinatra-1.3.3/lib/sinatra/base.rb:921:incatch' /var/lib/gems/1.9.1/gems/sinatra-1.3.3/lib/sinatra/base.rb:921:in invoke' /var/lib/gems/1.9.1/gems/sinatra-1.3.3/lib/sinatra/base.rb:769:incall!' /var/lib/gems/1.9.1/gems/sinatra-1.3.3/lib/sinatra/base.rb:755:in call' /var/lib/gems/1.9.1/gems/rack-protection-1.2.0/lib/rack/protection/xss_header.rb:22:incall' /var/lib/gems/1.9.1/gems/rack-protection-1.2.0/lib/rack/protection/base.rb:47:in call' /var/lib/gems/1.9.1/gems/rack-protection-1.2.0/lib/rack/protection/base.rb:47:incall' /var/lib/gems/1.9.1/gems/rack-protection-1.2.0/lib/rack/protection/path_traversal.rb:16:in call' /var/lib/gems/1.9.1/gems/rack-protection-1.2.0/lib/rack/protection/json_csrf.rb:17:incall' /var/lib/gems/1.9.1/gems/rack-protection-1.2.0/lib/rack/protection/base.rb:47:in call' /var/lib/gems/1.9.1/gems/rack-protection-1.2.0/lib/rack/protection/xss_header.rb:22:incall' /var/lib/gems/1.9.1/gems/rack-1.4.1/lib/rack/session/abstract/id.rb:205:in context' /var/lib/gems/1.9.1/gems/rack-1.4.1/lib/rack/session/abstract/id.rb:200:incall' /var/lib/gems/1.9.1/gems/rack-1.4.1/lib/rack/logger.rb:15:in call' /var/lib/gems/1.9.1/gems/rack-1.4.1/lib/rack/commonlogger.rb:20:incall' /var/lib/gems/1.9.1/gems/sinatra-1.3.3/lib/sinatra/base.rb:136:in call' /var/lib/gems/1.9.1/gems/sinatra-1.3.3/lib/sinatra/base.rb:129:incall' /var/lib/gems/1.9.1/gems/rack-1.4.1/lib/rack/head.rb:9:in call' /var/lib/gems/1.9.1/gems/rack-1.4.1/lib/rack/methodoverride.rb:21:incall' /var/lib/gems/1.9.1/gems/sinatra-1.3.3/lib/sinatra/showexceptions.rb:21:in call' /var/lib/gems/1.9.1/gems/sinatra-1.3.3/lib/sinatra/base.rb:99:incall' /var/lib/gems/1.9.1/gems/sinatra-1.3.3/lib/sinatra/base.rb:1389:in block in call' /var/lib/gems/1.9.1/gems/sinatra-1.3.3/lib/sinatra/base.rb:1471:insynchronize' /var/lib/gems/1.9.1/gems/sinatra-1.3.3/lib/sinatra/base.rb:1389:in call' /var/lib/gems/1.9.1/gems/thin-1.5.0/lib/thin/connection.rb:81:inblock in pre_process' /var/lib/gems/1.9.1/gems/thin-1.5.0/lib/thin/connection.rb:79:in catch' /var/lib/gems/1.9.1/gems/thin-1.5.0/lib/thin/connection.rb:79:inpre_process' /var/lib/gems/1.9.1/gems/eventmachine-1.0.0/lib/eventmachine.rb:1037:in call' /var/lib/gems/1.9.1/gems/eventmachine-1.0.0/lib/eventmachine.rb:1037:inblock in spawn_threadpool'
first' for "_all":String: /usr/share/kibana/rashidkpc-Kibana-41a1298/lib/kelastic.rb:247:in
new' kibana.rb:66:in
call' /var/lib/gems/1.9.1/gems/sinatra-1.3.3/lib/sinatra/base.rb:1265:in
[]' /var/lib/gems/1.9.1/gems/sinatra-1.3.3/lib/sinatra/base.rb:835:in
route_eval' /var/lib/gems/1.9.1/gems/sinatra-1.3.3/lib/sinatra/base.rb:835:in
block in process_route' /var/lib/gems/1.9.1/gems/sinatra-1.3.3/lib/sinatra/base.rb:870:in
process_route' /var/lib/gems/1.9.1/gems/sinatra-1.3.3/lib/sinatra/base.rb:834:in
each' /var/lib/gems/1.9.1/gems/sinatra-1.3.3/lib/sinatra/base.rb:833:in
dispatch!' /var/lib/gems/1.9.1/gems/sinatra-1.3.3/lib/sinatra/base.rb:769:in
block in invoke' /var/lib/gems/1.9.1/gems/sinatra-1.3.3/lib/sinatra/base.rb:921:in
invoke' /var/lib/gems/1.9.1/gems/sinatra-1.3.3/lib/sinatra/base.rb:769:in
call' /var/lib/gems/1.9.1/gems/rack-protection-1.2.0/lib/rack/protection/xss_header.rb:22:in
call' /var/lib/gems/1.9.1/gems/rack-protection-1.2.0/lib/rack/protection/base.rb:47:in
call' /var/lib/gems/1.9.1/gems/rack-protection-1.2.0/lib/rack/protection/json_csrf.rb:17:in
context' /var/lib/gems/1.9.1/gems/rack-1.4.1/lib/rack/session/abstract/id.rb:200:in
call' /var/lib/gems/1.9.1/gems/rack-1.4.1/lib/rack/commonlogger.rb:20:in
call' /var/lib/gems/1.9.1/gems/sinatra-1.3.3/lib/sinatra/base.rb:129:in
call' /var/lib/gems/1.9.1/gems/rack-1.4.1/lib/rack/methodoverride.rb:21:in
call' /var/lib/gems/1.9.1/gems/sinatra-1.3.3/lib/sinatra/base.rb:99:in
block in call' /var/lib/gems/1.9.1/gems/sinatra-1.3.3/lib/sinatra/base.rb:1471:in
call' /var/lib/gems/1.9.1/gems/thin-1.5.0/lib/thin/connection.rb:81:in
catch' /var/lib/gems/1.9.1/gems/thin-1.5.0/lib/thin/connection.rb:79:in
call' /var/lib/gems/1.9.1/gems/eventmachine-1.0.0/lib/eventmachine.rb:1037:in
The offending line is
index = indices.first
Looks like an array check is missing.
I see the following in the logs whenever I select "All" and hit "Search".
NoMethodError - undefined method'
/var/lib/gems/1.9.1/gems/sinatra-1.3.3/lib/sinatra/base.rb:1265:in
first' for "_all":String: /usr/share/kibana/rashidkpc-Kibana-41a1298/lib/kelastic.rb:247:in
initialize' kibana.rb:66:innew' kibana.rb:66:in
block incall' /var/lib/gems/1.9.1/gems/sinatra-1.3.3/lib/sinatra/base.rb:1265:in
block in compile!' /var/lib/gems/1.9.1/gems/sinatra-1.3.3/lib/sinatra/base.rb:835:in[]' /var/lib/gems/1.9.1/gems/sinatra-1.3.3/lib/sinatra/base.rb:835:in
block (3 levels) in route!' /var/lib/gems/1.9.1/gems/sinatra-1.3.3/lib/sinatra/base.rb:851:inroute_eval' /var/lib/gems/1.9.1/gems/sinatra-1.3.3/lib/sinatra/base.rb:835:in
block (2 levels) in route!' /var/lib/gems/1.9.1/gems/sinatra-1.3.3/lib/sinatra/base.rb:872:inblock in process_route' /var/lib/gems/1.9.1/gems/sinatra-1.3.3/lib/sinatra/base.rb:870:in
catch' /var/lib/gems/1.9.1/gems/sinatra-1.3.3/lib/sinatra/base.rb:870:inprocess_route' /var/lib/gems/1.9.1/gems/sinatra-1.3.3/lib/sinatra/base.rb:834:in
block in route!' /var/lib/gems/1.9.1/gems/sinatra-1.3.3/lib/sinatra/base.rb:833:ineach' /var/lib/gems/1.9.1/gems/sinatra-1.3.3/lib/sinatra/base.rb:833:in
route!' /var/lib/gems/1.9.1/gems/sinatra-1.3.3/lib/sinatra/base.rb:936:indispatch!' /var/lib/gems/1.9.1/gems/sinatra-1.3.3/lib/sinatra/base.rb:769:in
block in call!' /var/lib/gems/1.9.1/gems/sinatra-1.3.3/lib/sinatra/base.rb:921:inblock in invoke' /var/lib/gems/1.9.1/gems/sinatra-1.3.3/lib/sinatra/base.rb:921:in
catch' /var/lib/gems/1.9.1/gems/sinatra-1.3.3/lib/sinatra/base.rb:921:ininvoke' /var/lib/gems/1.9.1/gems/sinatra-1.3.3/lib/sinatra/base.rb:769:in
call!' /var/lib/gems/1.9.1/gems/sinatra-1.3.3/lib/sinatra/base.rb:755:incall' /var/lib/gems/1.9.1/gems/rack-protection-1.2.0/lib/rack/protection/xss_header.rb:22:in
call' /var/lib/gems/1.9.1/gems/rack-protection-1.2.0/lib/rack/protection/base.rb:47:incall' /var/lib/gems/1.9.1/gems/rack-protection-1.2.0/lib/rack/protection/base.rb:47:in
call' /var/lib/gems/1.9.1/gems/rack-protection-1.2.0/lib/rack/protection/path_traversal.rb:16:incall' /var/lib/gems/1.9.1/gems/rack-protection-1.2.0/lib/rack/protection/json_csrf.rb:17:in
call' /var/lib/gems/1.9.1/gems/rack-protection-1.2.0/lib/rack/protection/base.rb:47:incall' /var/lib/gems/1.9.1/gems/rack-protection-1.2.0/lib/rack/protection/xss_header.rb:22:in
call' /var/lib/gems/1.9.1/gems/rack-1.4.1/lib/rack/session/abstract/id.rb:205:incontext' /var/lib/gems/1.9.1/gems/rack-1.4.1/lib/rack/session/abstract/id.rb:200:in
call' /var/lib/gems/1.9.1/gems/rack-1.4.1/lib/rack/logger.rb:15:incall' /var/lib/gems/1.9.1/gems/rack-1.4.1/lib/rack/commonlogger.rb:20:in
call' /var/lib/gems/1.9.1/gems/sinatra-1.3.3/lib/sinatra/base.rb:136:incall' /var/lib/gems/1.9.1/gems/sinatra-1.3.3/lib/sinatra/base.rb:129:in
call' /var/lib/gems/1.9.1/gems/rack-1.4.1/lib/rack/head.rb:9:incall' /var/lib/gems/1.9.1/gems/rack-1.4.1/lib/rack/methodoverride.rb:21:in
call' /var/lib/gems/1.9.1/gems/sinatra-1.3.3/lib/sinatra/showexceptions.rb:21:incall' /var/lib/gems/1.9.1/gems/sinatra-1.3.3/lib/sinatra/base.rb:99:in
call' /var/lib/gems/1.9.1/gems/sinatra-1.3.3/lib/sinatra/base.rb:1389:inblock in call' /var/lib/gems/1.9.1/gems/sinatra-1.3.3/lib/sinatra/base.rb:1471:in
synchronize' /var/lib/gems/1.9.1/gems/sinatra-1.3.3/lib/sinatra/base.rb:1389:incall' /var/lib/gems/1.9.1/gems/thin-1.5.0/lib/thin/connection.rb:81:in
block in pre_process' /var/lib/gems/1.9.1/gems/thin-1.5.0/lib/thin/connection.rb:79:incatch' /var/lib/gems/1.9.1/gems/thin-1.5.0/lib/thin/connection.rb:79:in
pre_process' /var/lib/gems/1.9.1/gems/eventmachine-1.0.0/lib/eventmachine.rb:1037:incall' /var/lib/gems/1.9.1/gems/eventmachine-1.0.0/lib/eventmachine.rb:1037:in
block in spawn_threadpool'