Closed laf closed 6 years ago
I think this happens because not all nodes have a configuration file stored. I use HTML as source and when the node list is generated the app which generates it also checks if each node has a file and if there is none then a placeholder empty file is put in place.
This fixes the issue for me.
@chibi4588 commented on Wed Nov 01 2017
I am having an issue upon a new Oxidized deployment when I attempt to use "Search in Configs". I get an oxidized-web "NoMethodError at /nodes/conf_search, undifined method '[]' nil:NilClass" from file webapp.rb.
Any thoughts on a remedy?? Thanks much!
Here is the output in the logs:
Puma starting in single mode...
2017-10-31 16:57:04 - NoMethodError - undefined method'
/usr/local/share/gems/gems/oxidized-web-0.9.2/lib/oxidized/web/webapp.rb:53:in
[]' for nil:NilClass: /usr/local/share/gems/gems/oxidized-web-0.9.2/lib/oxidized/web/webapp.rb:56:in
block (2 levels) inmap' /usr/local/share/gems/gems/oxidized-web-0.9.2/lib/oxidized/web/webapp.rb:53:in
each' /usr/local/share/gems/gems/oxidized-web-0.9.2/lib/oxidized/web/webapp.rb:53:inblock in <class:WebApp>' /usr/local/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1611:in
call' /usr/local/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1611:inblock in compile!' /usr/local/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:975:in
[]' /usr/local/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:975:inblock (3 levels) in route!' /usr/local/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:994:in
route_eval' /usr/local/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:975:inblock (2 levels) in route!' /usr/local/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1015:in
block in process_route' /usr/local/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1013:incatch' /usr/local/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1013:in
process_route' /usr/local/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:973:inblock in route!' /usr/local/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:972:in
each' /usr/local/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:972:inroute!' /usr/local/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1085:in
block in dispatch!' /usr/local/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1067:inblock in invoke' /usr/local/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1067:in
catch' /usr/local/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1067:ininvoke' /usr/local/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1082:in
dispatch!' /usr/local/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:907:inblock in call!' /usr/local/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1067:in
block in invoke' /usr/local/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1067:incatch' /usr/local/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1067:in
invoke' /usr/local/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:907:incall!' /usr/local/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:895:in
call' /usr/local/share/gems/gems/rack-protection-1.5.3/lib/rack/protection/xss_header.rb:18:incall' /usr/local/share/gems/gems/rack-protection-1.5.3/lib/rack/protection/path_traversal.rb:16:in
call' /usr/local/share/gems/gems/rack-protection-1.5.3/lib/rack/protection/json_csrf.rb:18:incall' /usr/local/share/gems/gems/rack-protection-1.5.3/lib/rack/protection/base.rb:49:in
call' /usr/local/share/gems/gems/rack-protection-1.5.3/lib/rack/protection/base.rb:49:incall' /usr/local/share/gems/gems/rack-protection-1.5.3/lib/rack/protection/frame_options.rb:31:in
call' /usr/local/share/gems/gems/rack-1.6.8/lib/rack/nulllogger.rb:9:incall' /usr/local/share/gems/gems/rack-1.6.8/lib/rack/head.rb:13:in
call' /usr/local/share/gems/gems/sinatra-1.4.8/lib/sinatra/show_exceptions.rb:25:incall' /usr/local/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:182:in
call' /usr/local/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:2013:incall' /usr/local/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1487:in
block in call' /usr/local/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1787:insynchronize' /usr/local/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1487:in
call' /usr/local/share/gems/gems/rack-1.6.8/lib/rack/urlmap.rb:66:inblock in call' /usr/local/share/gems/gems/rack-1.6.8/lib/rack/urlmap.rb:50:in
each' /usr/local/share/gems/gems/rack-1.6.8/lib/rack/urlmap.rb:50:incall' /usr/local/share/gems/gems/rack-1.6.8/lib/rack/builder.rb:153:in
call' /usr/local/share/gems/gems/puma-3.10.0/lib/puma/configuration.rb:225:incall' /usr/local/share/gems/gems/puma-3.10.0/lib/puma/server.rb:605:in
handle_request' /usr/local/share/gems/gems/puma-3.10.0/lib/puma/server.rb:437:inprocess_client' /usr/local/share/gems/gems/puma-3.10.0/lib/puma/server.rb:301:in
block in run' /usr/local/share/gems/gems/puma-3.10.0/lib/puma/thread_pool.rb:120:incall' /usr/local/share/gems/gems/puma-3.10.0/lib/puma/thread_pool.rb:120:in
block in spawn_thread'@laf commented on Wed Nov 01 2017
Please post your config.
@chibi4588 commented on Wed Nov 01 2017
Iaf, Thanks. Here is the config (scrubbed).
@laf commented on Wed Nov 01 2017
Are the configs themselves being stored ok?
@chibi4588 commented on Wed Nov 01 2017
Yeah, its is just the "Search in Configs" that is broken... and I can't for the life of me figure out why (not that I am a Ruby guy by any stretch). This is my 3rd deployment of Ox, all with the same config file. The only thing that I see has changed between the previous 2* deployments, is the version of Puma was updated from 3.9.1 to 3.4.0. Not sure if this would have any influence, but again, this is the only difference.
@chibi4588 commented on Thu Nov 02 2017
If anyone has any thoughts... would be greatly appreciated.
Thanks!
@laf commented on Sun Nov 05 2017
Maybe try Puma 3.9.1 again to see?
@laf commented on Sat Jan 06 2018
No further response provided so this issue is being closed.
I've moved this to oxidized-web in the meantime.