Project

General

Profile

Actions

Support #19411

closed

trying to find an ip address, we got {:to=>nil, :from=>nil}

Added by Denis Müller about 7 years ago. Updated about 7 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
DHCP
Target version:
-
Triaged:
Fixed in Releases:
Found in Releases:

Description

I don't know actually what happened. I restarted the service (foreman-proxy) and now it doesn't work, im getting this error. I just can't assing new ipaddresses für new hosts.
Eeverytime i click on create new host and suggest new ip, im getting an error.

Foreman-Proxy log already set to Debug:

D, [2017-04-27T15:26:44.547007 #20951] DEBUG -- : 'dns' settings: 'dns_ttl': 86400 (default), 'enabled': https, 'use_provider': dns_nsupdate (default)
D, [2017-04-27T15:26:44.562141 #20951] DEBUG -- : 'dhcp' settings: 'enabled': true, 'server': 192.168.11.16, 'subnets': 192.168.11.0/255.255.255.0, 'use_provider': dhcp_isc (default)
D, [2017-04-27T15:26:44.570956 #20951] DEBUG -- : Providers ['dns_nsupdate'] are going to be configured for 'dns'
D, [2017-04-27T15:26:44.571810 #20951] DEBUG -- : Providers ['dhcp_isc'] are going to be configured for 'dhcp'
D, [2017-04-27T15:26:44.585769 #20951] DEBUG -- : 'dns_nsupdate' settings: 'dns_key': /etc/rndc.key, 'dns_server': ns1.nodes.rto.de, 'dns_ttl': 86400, 'use_provider': dns_nsupdate
D, [2017-04-27T15:26:44.600053 #20951] DEBUG -- : 'dhcp_isc' settings: 'config': /etc/dhcp/dhcpd.conf (default), 'key_name': foreman, 'key_secret': Kf+zIC1KKHo3Yss6PPDcSg==, 'leases': /var/lib/dhcpd/dhcpd.leases (default), 'omapi_port': 7911, 'server': 192.168.11.16, 'subnets': 192.168.11.0/255.255.255.0, 'use_provider': dhcp_isc
I, [2017-04-27T15:26:44.607854 #20951] INFO -- : Successfully initialized 'foreman_proxy'
I, [2017-04-27T15:26:44.625696 #20951] INFO -- : Successfully initialized 'dns_nsupdate'
I, [2017-04-27T15:26:44.626680 #20951] INFO -- : Successfully initialized 'dns'
I, [2017-04-27T15:26:44.657033 #20951] INFO -- : Successfully initialized 'dhcp_isc'
I, [2017-04-27T15:26:44.664771 #20951] INFO -- : Successfully initialized 'dhcp'
I, [2017-04-27T15:26:44.706182 #20953] INFO -- : WEBrick 1.3.1
I, [2017-04-27T15:26:44.709450 #20953] INFO -- : ruby 1.8.7 (2013-06-27) [x86_64-linux]
D, [2017-04-27T15:26:44.716609 #20953] DEBUG -- : TCPServer.new(0.0.0.0, 8443)
D, [2017-04-27T15:26:44.720191 #20953] DEBUG -- : TCPServer.new(::, 8443)
W, [2017-04-27T15:26:44.722653 #20953] WARN -- : TCPServer Error: Address already in use - bind(2)
I, [2017-04-27T15:26:44.735522 #20953] INFO -- :
Certificate:
Data:
Version: 3 (0x2)
Serial Number: 11218190227863606622 (0x9baf04936291955e)
Signature Algorithm: sha256WithRSAEncryption
...
...
...
ee:81:8a:16:f0:bf:a0:6c:a4:59:3a:21:49:90:dd:65:ce:ad:
81:e1:d1:27:53:12:c1:a7:12:82:1c:c9:6c:42:dc:f9:4a:c1:
b3:2c:55:9e

D, [2017-04-27T15:26:44.757409 #20953] DEBUG -- : Rack::Handler::WEBrick is mounted on /.
I, [2017-04-27T15:26:44.759007 #20953] INFO -- : WEBrick::HTTPServer#start: pid=20953 port=8443

D, [2017-04-27T15:42:34.450145 #20953] DEBUG -- : accept: 192.168.11.237:58028
D, [2017-04-27T15:42:34.463085 #20953] DEBUG -- : Rack::Handler::WEBrick is invoked.
D, [2017-04-27T15:42:34.487267 #20953] DEBUG -- : verifying remote client 192.168.11.237 against trusted_hosts theforeman.nodes.rto.de
D, [2017-04-27T15:42:34.489173 #20953] DEBUG -- : Loading subnets for 192.168.11.16
D, [2017-04-27T15:42:34.489923 #20953] DEBUG -- : Reading config file /etc/dhcp/dhcpd.conf
D, [2017-04-27T15:42:34.492115 #20953] DEBUG -- : Reading config file /etc/dhcp/dhcpd.hosts
D, [2017-04-27T15:42:34.494106 #20953] DEBUG -- : Added a subnet: 192.168.11.0
D, [2017-04-27T15:42:34.498679 #20953] DEBUG -- : Reading config file /var/lib/dhcpd/dhcpd.leases
D, [2017-04-27T15:42:34.932895 #20953] DEBUG -- : Added a reservation: 192.168.11.54:52:54:00:32:17:e1:hostname
D, [2017-04-27T15:42:34.933784 #20953] DEBUG -- : Added a reservation: 192.168.11.24:68:b5:99:bd:15:9c:hostname



***
D, [2017-04-27T15:42:35.087342 #20953] DEBUG -- : trying to find an ip address, we got {:to=>nil, :from=>nil}
D, [2017-04-27T15:43:04.461723 #20953] DEBUG -- : accept: 192.168.11.237:58050
D, [2017-04-27T15:43:04.473160 #20953] DEBUG -- : Rack::Handler::WEBrick is invoked.
D, [2017-04-27T15:43:04.475995 #20953] DEBUG -- : verifying remote client 192.168.11.237 against trusted_hosts theforeman.nodes.rto.de
D, [2017-04-27T15:43:04.478204 #20953] DEBUG -- : Loading subnets for 192.168.11.16
D, [2017-04-27T15:43:04.478910 #20953] DEBUG -- : Reading config file /etc/dhcp/dhcpd.conf
D, [2017-04-27T15:43:04.481544 #20953] DEBUG -- : Reading config file /etc/dhcp/dhcpd.hosts
D, [2017-04-27T15:43:04.483299 #20953] DEBUG -- : Added a subnet: 192.168.11.0
D, [2017-04-27T15:43:04.485014 #20953] DEBUG -- : Reading config file /var/lib/dhcpd/dhcpd.leases

D, [2017-04-27T15:43:04.962890 #20953] DEBUG -- : Added a reservation: 192.168.11.54:52:54:00:32:17:e1:"hostname"
D, [2017-04-27T15:43:04.963995 #20953] DEBUG -- : Added a reservation: 192.168.11.24:68:b5:99:bd:15:9c:"hostname"
D, [2017-04-27T15:43:04.965392 #20953] DEBUG -- : Added a reservation: 192.168.11.154:52:54:00:d1:f5:11:"hostname"

D, [2017-04-27T15:43:05.136836 #20953] DEBUG -- : execution expired
D, [2017-04-27T15:43:05.141395 #20953] DEBUG -- : Added a reservation: 192.168.11.67:00:15:5d:4a:67:0e:fs-tier.nodes.rto.de
E, [2017-04-27T15:43:05.147791 #20953] ERROR -- : undefined method `reopen' for nil:NilClass
D, [2017-04-27T15:43:05.150898 #20953] DEBUG -- : undefined method `reopen' for nil:NilClass (NoMethodError)
/usr/share/foreman-proxy/modules/dhcp_common/subnet.rb:81:in `write_index_and_unlock'
/usr/share/foreman-proxy/modules/dhcp_common/subnet.rb:115:in `unused_ip'
/usr/share/foreman-proxy/modules/dhcp_common/server.rb:75:in `unused_ip'
/usr/share/foreman-proxy/modules/dhcp/dhcp_api.rb:61:in `GET /:network/unused_ip'
/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:63: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/share/foreman-proxy/lib/launcher.rb:134:in `launch'
/usr/share/foreman-proxy/lib/launcher.rb:134:in `initialize'
/usr/share/foreman-proxy/lib/launcher.rb:134:in `new'
/usr/share/foreman-proxy/lib/launcher.rb:134:in `launch'
/usr/share/foreman-proxy/bin/smart-proxy:6


Related issues 1 (0 open1 closed)

Related to Smart Proxy - Bug #19413: unused_ip call fails when a previous call for the same subnet failed to remove it.Duplicate04/27/2017Actions
Actions #1

Updated by Denis Müller about 7 years ago

  • Subject changed from rying to find an ip address, we got {:to=>nil, :from=>nil} to trying to find an ip address, we got {:to=>nil, :from=>nil}
Actions #2

Updated by Anonymous about 7 years ago

Could you try:
- shut down smart-proxy
- in /tmp dir remove any files that look like foreman-proxy_<some_net_address>_<mask_bits>.tmp.lock
- restart proxy

Actions #3

Updated by Denis Müller about 7 years ago

Dmitri Dolguikh wrote:

Could you try:
- shut down smart-proxy
- in /tmp dir remove any files that look like foreman-proxy_<some_net_address>_<mask_bits>.tmp.lock
- restart proxy

That did the trick. Thank you so much!!!

Actions #4

Updated by Anonymous about 7 years ago

  • Related to Bug #19413: unused_ip call fails when a previous call for the same subnet failed to remove it. added
Actions #5

Updated by Anonymous about 7 years ago

  • Tracker changed from Bug to Support
  • Status changed from New to Resolved
Actions

Also available in: Atom PDF