oxidized: ArgumentError - wrong number of arguments
Hi,
when clicking on “Versions” in the WebUI I get the following error:
ArgumentError at /node/version
wrong number of arguments (given 0, expected 1+)
It is a clean new install, here are the versions:
oxidized (0.26.2)
oxidized-script (0.6.0)
oxidized-web (0.13.1)
git log
shows multiple versions are stored and git log -p
shows the differences, so I guess it is an issue in the webinterface, not in oxidized itself.
Here is the error message in the server log:
2019-03-06 07:13:24 - ArgumentError - wrong number of arguments (given 0, expected 1+):
/var/lib/gems/2.3.0/gems/oxidized-web-0.13.1/lib/oxidized/web/views/versions.haml:24:in `count'
/var/lib/gems/2.3.0/gems/oxidized-web-0.13.1/lib/oxidized/web/views/versions.haml:24:in `block in singleton class'
/var/lib/gems/2.3.0/gems/oxidized-web-0.13.1/lib/oxidized/web/views/versions.haml:-2:in `instance_eval'
/var/lib/gems/2.3.0/gems/oxidized-web-0.13.1/lib/oxidized/web/views/versions.haml:-2:in `singleton class'
/var/lib/gems/2.3.0/gems/oxidized-web-0.13.1/lib/oxidized/web/views/versions.haml:-5:in `__tilt_47342395654600'
/var/lib/gems/2.3.0/gems/tilt-2.0.9/lib/tilt/template.rb:170:in `call'
/var/lib/gems/2.3.0/gems/tilt-2.0.9/lib/tilt/template.rb:170:in `evaluate'
/var/lib/gems/2.3.0/gems/tilt-2.0.9/lib/tilt/haml.rb:24:in `evaluate'
/var/lib/gems/2.3.0/gems/tilt-2.0.9/lib/tilt/template.rb:109:in `render'
/var/lib/gems/2.3.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:823:in `render'
/var/lib/gems/2.3.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:677:in `haml'
/var/lib/gems/2.3.0/gems/oxidized-web-0.13.1/lib/oxidized/web/webapp.rb:241:in `out'
/var/lib/gems/2.3.0/gems/oxidized-web-0.13.1/lib/oxidized/web/webapp.rb:165:in `block in <class:WebApp>'
/var/lib/gems/2.3.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1611:in `call'
/var/lib/gems/2.3.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1611:in `block in compile!'
/var/lib/gems/2.3.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:975:in `block (3 levels) in route!'
/var/lib/gems/2.3.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:994:in `route_eval'
/var/lib/gems/2.3.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:975:in `block (2 levels) in route!'
/var/lib/gems/2.3.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1015:in `block in process_route'
/var/lib/gems/2.3.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1013:in `catch'
/var/lib/gems/2.3.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1013:in `process_route'
/var/lib/gems/2.3.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:973:in `block in route!'
/var/lib/gems/2.3.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:972:in `each'
/var/lib/gems/2.3.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:972:in `route!'
/var/lib/gems/2.3.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1085:in `block in dispatch!'
/var/lib/gems/2.3.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1067:in `block in invoke'
/var/lib/gems/2.3.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1067:in `catch'
/var/lib/gems/2.3.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1067:in `invoke'
/var/lib/gems/2.3.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1082:in `dispatch!'
/var/lib/gems/2.3.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:907:in `block in call!'
/var/lib/gems/2.3.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1067:in `block in invoke'
/var/lib/gems/2.3.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1067:in `catch'
/var/lib/gems/2.3.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1067:in `invoke'
/var/lib/gems/2.3.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:907:in `call!'
/var/lib/gems/2.3.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:895:in `call'
/var/lib/gems/2.3.0/gems/rack-protection-1.5.5/lib/rack/protection/xss_header.rb:18:in `call'
/var/lib/gems/2.3.0/gems/rack-protection-1.5.5/lib/rack/protection/path_traversal.rb:16:in `call'
/var/lib/gems/2.3.0/gems/rack-protection-1.5.5/lib/rack/protection/json_csrf.rb:18:in `call'
/var/lib/gems/2.3.0/gems/rack-protection-1.5.5/lib/rack/protection/base.rb:49:in `call'
/var/lib/gems/2.3.0/gems/rack-protection-1.5.5/lib/rack/protection/base.rb:49:in `call'
/var/lib/gems/2.3.0/gems/rack-protection-1.5.5/lib/rack/protection/frame_options.rb:31:in `call'
/var/lib/gems/2.3.0/gems/rack-1.6.11/lib/rack/nulllogger.rb:9:in `call'
/var/lib/gems/2.3.0/gems/rack-1.6.11/lib/rack/head.rb:13:in `call'
/var/lib/gems/2.3.0/gems/sinatra-1.4.8/lib/sinatra/show_exceptions.rb:25:in `call'
/var/lib/gems/2.3.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:182:in `call'
/var/lib/gems/2.3.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:2013:in `call'
/var/lib/gems/2.3.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1487:in `block in call'
/var/lib/gems/2.3.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1787:in `synchronize'
/var/lib/gems/2.3.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1487:in `call'
/var/lib/gems/2.3.0/gems/rack-1.6.11/lib/rack/urlmap.rb:66:in `block in call'
/var/lib/gems/2.3.0/gems/rack-1.6.11/lib/rack/urlmap.rb:50:in `each'
/var/lib/gems/2.3.0/gems/rack-1.6.11/lib/rack/urlmap.rb:50:in `call'
/var/lib/gems/2.3.0/gems/rack-1.6.11/lib/rack/builder.rb:153:in `call'
/var/lib/gems/2.3.0/gems/puma-3.11.4/lib/puma/configuration.rb:225:in `call'
/var/lib/gems/2.3.0/gems/puma-3.11.4/lib/puma/server.rb:632:in `handle_request'
/var/lib/gems/2.3.0/gems/puma-3.11.4/lib/puma/server.rb:446:in `process_client'
/var/lib/gems/2.3.0/gems/puma-3.11.4/lib/puma/server.rb:306:in `block in run'
/var/lib/gems/2.3.0/gems/puma-3.11.4/lib/puma/thread_pool.rb:120:in `block in spawn_thread'
Here is my config:
---
interval: 60
use_syslog: false
debug: false
prompt: !ruby/regexp /^([\w.@-]+[#>]\s?)$/
rest: 10.23.42.8:8888
next_adds_job: false
pid: "/root/.config/oxidized/pid"
stats:
history_size: 10
input:
default: ssh, telnet
debug: true
ssh:
secure: false
ftp:
passive: true
utf8_encoded: true
output:
default: git
git:
user: Oxidized
email: meldungen@stw-on.de
repo: "/root/.config/oxidized/oxidized.git"
source:
default: csv
csv:
file: "/root/.config/oxidized/devices.db"
delimiter: !ruby/regexp /:/
map:
name: 0
ip: 1
model: 2
username: 3
password: 4
gpg: false
And this is the devices.db:
switch-bs-apm-h64-3-00056:10.23.42.18:procurve:manager:xxxxxxx
Thanks for your help in advance!
IngoQ
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 24 (9 by maintainers)
Commits related to this issue
- Fix git diff detection Fixes #1727 — committed to Haeki/oxidized by ytti 5 years ago
- Fix git diff detection Fixes #1727 — committed to nickhilliard/oxidized by ytti 5 years ago
This issue is still there in version 0.27.0
curl http://127.0.0.1:8888/node/version NoMethodError: undefined method
include?' for nil:NilClass /var/lib/gems/2.3.0/gems/oxidized-web-0.13.1/lib/oxidized/web/webapp.rb:156:in
block in class:WebApp’ /var/lib/gems/2.3.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1611:incall' /var/lib/gems/2.3.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1611:in
block in compile!’