Project

General

Profile

Actions

Bug #14033

closed

dhcp web interface error: undefined method `sort' for nil:NilClass

Added by rui fernandes over 8 years ago. Updated over 8 years ago.

Status:
Duplicate
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

After upgrading from foreman-proxy version 1.9.3-1 to 1.10 (I just tested on 1.10.2)
I started seeing this error , when I go to: http://myserver.....net:8443/dhcp
I see:

undefined method `sort' for nil:NilClass

Everything else works fine. Foreman can get new IPs. I just cannot connect to the web interface.

If I rollback to the old version everything is OK, I just do:

yum erase foreman-release foreman-proxy
yum clean all

install version 1.9

yum localinstall http://yum.theforeman.org/releases/1.9/el6/x86_64/foreman-release.rpm
yum install foreman-proxy
mv settings.yml.rpmsave settings.yml
mv settings.d/dhcp.yml.rpmsave settings.d/dhcp.yml
service foreman-proxy restart

and everything back to normal.

Foreman-proxy settings:

# cat settings.yml 
--- 
#replace default location of "settings.d" 
:settings_directory: /etc/foreman-proxy/settings.d

:daemon: true
:http_port: 8443
:daemon_pid: /var/run/foreman-proxy/foreman-proxy.pid
:log_file: /var/log/foreman-proxy/proxy.log
#:log_level: INFO
:log_level: debug
:virsh_network: default

here is the foreman-proxy log:

D, [2016-03-03T05:53:06.980944 #21215] DEBUG -- : accept: 10.50.20.55:60217
D, [2016-03-03T05:53:06.989471 #21215] DEBUG -- : Rack::Handler::WEBrick is invoked.
D, [2016-03-03T05:53:06.996779 #21215] DEBUG -- : require_ssl_client_verification: skipping, non-HTTPS request
D, [2016-03-03T05:53:07.005511 #21215] DEBUG -- : Reading config file /etc/dhcp/dhcpd.conf
D, [2016-03-03T05:53:07.007564 #21215] DEBUG -- : Reading config file /etc/dhcp/dhcpd.in-addr.zones.conf
D, [2016-03-03T05:53:07.008092 #21215] DEBUG -- : Reading config file /var/lib/dhcpd/dhcpd.leases
D, [2016-03-03T05:53:07.156621 #21215] DEBUG -- : Loading subnets for 127.0.0.1
D, [2016-03-03T05:53:07.157985 #21215] DEBUG -- : Added a subnet: 10.61.0.0
D, [2016-03-03T05:53:07.158480 #21215] DEBUG -- : Added a subnet: 10.61.1.0
D, [2016-03-03T05:53:07.159128 #21215] DEBUG -- : Added a subnet: 10.61.2.0
D, [2016-03-03T05:53:07.160027 #21215] DEBUG -- : Added a subnet: 10.61.3.0
D, [2016-03-03T05:53:07.161191 #21215] DEBUG -- : Added a subnet: 10.61.4.0
D, [2016-03-03T05:53:07.162624 #21215] DEBUG -- : Added a subnet: 10.61.5.0
D, [2016-03-03T05:53:07.164315 #21215] DEBUG -- : Added a subnet: 10.61.6.0
D, [2016-03-03T05:53:07.166402 #21215] DEBUG -- : Added a subnet: 10.61.7.0
D, [2016-03-03T05:53:07.168604 #21215] DEBUG -- : Added a subnet: 10.61.8.0
D, [2016-03-03T05:53:07.171041 #21215] DEBUG -- : Added a subnet: 10.61.9.0
D, [2016-03-03T05:53:07.173769 #21215] DEBUG -- : Added a subnet: 10.61.10.0
D, [2016-03-03T05:53:07.176734 #21215] DEBUG -- : Added a subnet: 10.61.11.0
D, [2016-03-03T05:53:07.179982 #21215] DEBUG -- : Added a subnet: 10.61.12.0
D, [2016-03-03T05:53:07.183479 #21215] DEBUG -- : Added a subnet: 10.61.13.0
D, [2016-03-03T05:53:07.187197 #21215] DEBUG -- : Added a subnet: 10.61.14.0
D, [2016-03-03T05:53:07.191199 #21215] DEBUG -- : Added a subnet: 10.61.15.0
D, [2016-03-03T05:53:07.195468 #21215] DEBUG -- : Added a subnet: 10.61.16.0
D, [2016-03-03T05:53:07.200018 #21215] DEBUG -- : Added a subnet: 10.61.17.0
D, [2016-03-03T05:53:07.204925 #21215] DEBUG -- : Added a subnet: 10.61.18.0
D, [2016-03-03T05:53:07.209947 #21215] DEBUG -- : Added a subnet: 10.61.19.0
D, [2016-03-03T05:53:07.215230 #21215] DEBUG -- : Added a subnet: 10.61.20.0
D, [2016-03-03T05:53:07.220805 #21215] DEBUG -- : Added a subnet: 10.61.21.0
D, [2016-03-03T05:53:07.226603 #21215] DEBUG -- : Added a subnet: 10.61.22.0
D, [2016-03-03T05:53:07.232671 #21215] DEBUG -- : Added a subnet: 10.61.23.0
D, [2016-03-03T05:53:07.238972 #21215] DEBUG -- : Added a subnet: 10.61.24.0
D, [2016-03-03T05:53:07.245570 #21215] DEBUG -- : Added a subnet: 10.61.25.0
D, [2016-03-03T05:53:07.252446 #21215] DEBUG -- : Added a subnet: 10.61.26.0
D, [2016-03-03T05:53:07.259554 #21215] DEBUG -- : Added a subnet: 10.61.27.0
D, [2016-03-03T05:53:07.267027 #21215] DEBUG -- : Added a subnet: 10.61.28.0
D, [2016-03-03T05:53:07.274767 #21215] DEBUG -- : Added a subnet: 10.61.29.0
D, [2016-03-03T05:53:07.282645 #21215] DEBUG -- : Added a subnet: 10.61.30.0
D, [2016-03-03T05:53:07.290783 #21215] DEBUG -- : Added a subnet: 10.61.31.0
D, [2016-03-03T05:53:07.299155 #21215] DEBUG -- : Added a subnet: 10.61.32.0
D, [2016-03-03T05:53:07.307830 #21215] DEBUG -- : Added a subnet: 10.61.33.0
D, [2016-03-03T05:53:07.316734 #21215] DEBUG -- : Added a subnet: 10.61.34.0
D, [2016-03-03T05:53:07.325874 #21215] DEBUG -- : Added a subnet: 10.61.35.0
E, [2016-03-03T05:53:07.327090 #21215] ERROR -- : undefined method `sort' for nil:NilClass
D, [2016-03-03T05:53:07.327201 #21215] DEBUG -- : /usr/share/foreman-proxy/lib/../views/dhcp/index.erb:3:in `__tilt_ce0898e35ad569459f39b10c1c3ea3fd'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/tilt.rb:195:in `send'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/tilt.rb:195:in `evaluate'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/tilt.rb:131:in `render'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:343:in `render'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:302:in `erb'
/usr/share/foreman-proxy/modules/dhcp/dhcp_api.rb:55:in `GET /?'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:863:in `call'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:863:in `route'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:521:in `instance_eval'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:521:in `route_eval'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:500:in `route!'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:497:in `catch'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:497:in `route!'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:476:in `each'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:476:in `route!'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:601:in `dispatch!'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:411:in `call!'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:566:in `instance_eval'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:566:in `invoke'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:566:in `catch'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:566:in `invoke'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:411:in `call!'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:399:in `call'
/usr/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/methodoverride.rb:24:in `call'
/usr/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/commonlogger.rb:18:in `call'
/usr/share/foreman-proxy/lib/proxy/log.rb:58:in `call'
/usr/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/showexceptions.rb:24:in `call'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:979:in `call'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:1005:in `synchronize'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:979:in `call'
/usr/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/urlmap.rb:47:in `call'
/usr/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/urlmap.rb:41:in `each'
/usr/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/urlmap.rb:41:in `call'
/usr/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/builder.rb:77:in `call'
/usr/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/content_length.rb:13:in `call'
/usr/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/handler/webrick.rb:48:in `service'
/usr/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
/usr/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
/usr/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
/usr/lib/ruby/1.8/webrick/server.rb:162:in `start'
/usr/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'
/usr/lib/ruby/1.8/webrick/server.rb:95:in `start'
/usr/lib/ruby/1.8/webrick/server.rb:92:in `each'
/usr/lib/ruby/1.8/webrick/server.rb:92:in `start'
/usr/lib/ruby/1.8/webrick/server.rb:23:in `start'
/usr/lib/ruby/1.8/webrick/server.rb:82:in `start'
/usr/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/handler/webrick.rb:14:in `run'
/usr/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/server.rb:155:in `start'
/usr/share/foreman-proxy/lib/launcher.rb:116:in `launch'
/usr/share/foreman-proxy/lib/launcher.rb:116:in `initialize'
/usr/share/foreman-proxy/lib/launcher.rb:116:in `new'
/usr/share/foreman-proxy/lib/launcher.rb:116:in `launch'
/usr/share/foreman-proxy/bin/smart-proxy:6
I, [2016-03-03T05:53:07.327575 #21215]  INFO -- : 10.50.20.55 - - [03/Mar/2016 05:53:07] "GET  HTTP/1.1" 400 40 0.3311


Related issues 1 (0 open1 closed)

Has duplicate Smart Proxy - Bug #13947: Remove html views for dhcp and root modulesClosed02/29/2016Actions
Actions

Also available in: Atom PDF