Project

General

Profile

Actions

Bug #11196

closed

ERF12-6899 [ProxyAPI::ProxyException]

Added by shads ap almost 9 years ago. Updated about 8 years ago.

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

Description

Hello Team,

We are facing issues on getting DHCP to work with our foreman. No hosts can be added because of this issue.
Could you please help us on this?
Please let us know if you require any more details.

Unable to save
Create DHCP Settings for client1.domain.com task failed with the following error: ERF12-6899 [ProxyAPI::ProxyException]: Unable to set DHCP entry ([RestClient::BadRequest]: 400 Bad Request) for proxy https://hadoopserver.domain.com:8443/dhcp

Suggest new IP is not working.

======================================================================================
Our environment details:

Foreman Version = 1.8.2
The new machines to be added as hosts are virtual machines.

Please see the attached screenshots/files for our settings ======================================================================================

Our configuration - YML files:

======================================================================================
[root@hadoopserver settings.d]# pwd
/etc/foreman-proxy/settings.d
=====================================================
[root@hadoopserver settings.d]# ls -l
total 44
-rw-r-----. 1 root          foreman-proxy  317 Jul  2 13:27 bmc.yml
-rw-r-----. 1 root          foreman-proxy  785 Jul 22 12:30 dhcp.yml
-rw-r-----. 1 root          foreman-proxy  786 Jul 21 14:16 dns.yml
-rw-r--r--. 1 root          root            92 Jun 15 16:30 facts.yml
lrwxrwxrwx. 1 root          root            31 Jul  7 13:22 foreman_proxy.yml -> /etc/foreman-proxy/settings.yml
-rw-------. 1 foreman-proxy foreman-proxy  118 Jul 14 12:10 Komapi_key.+157+55117.key
-rw-------. 1 foreman-proxy foreman-proxy  229 Jul 14 12:10 Komapi_key.+157+55117.private
-rw-r-----. 1 root          foreman-proxy   95 Jul 21 14:22 puppetca.yml
-rw-r-----. 1 root          foreman-proxy 1944 Jul 22 10:16 puppet.yml
-rw-r-----. 1 root          foreman-proxy  358 Jul 21 13:36 realm.yml
-rw-r-----. 1 root          foreman-proxy 1087 Jul  2 13:27 templates.yml
-rw-r-----. 1 root          foreman-proxy  183 Jul 21 12:22 tftp.yml

======================================================================================
[root@hadoopserver settings.d]# cat dhcp.yml 
---
# Enable DHCP management
:enabled: https
# valid vendors:
#   - isc
#   - native_ms (Microsoft native implementation)
#   - virsh (simple implementation for libvirt)
# The vendor can be either isc or native_ms
:dhcp_vendor: isc
# dhcp_subnets is a Native MS implementation setting. It restricts the subnets queried to a
# subset, so as to reduce the query time.
:dhcp_subnets: [192.168.101.20/255.255.255.0, 192.168.101.252/255.255.255.0]
# Settings for Ubuntu ISC
#:dhcp_config: /etc/dhcp3/dhcpd.conf
#:dhcp_leases: /var/lib/dhcp3/dhcpd.leases
# Settings for Redhat ISC
:dhcp_config: /etc/dhcp/dhcpd.conf
:dhcp_leases: /var/lib/dhcpd/dhcpd.leases
:dhcp_key_name: omapi_key
:dhcp_key_secret: eiflm5CVYvb5a+3P2CXvRYVjvA3Gyy2b6BR3s5A7vyiq+IDocMwkohciOEcy/tfKqznmcO/cfHBBD+deJDeElQ==

======================================================================================
[root@hadoopserver settings.d]# cat /etc/dhcp/dhcpd.conf 
ddns-update-style interim;
ignore client-updates;
authoritative;
allow booting;
allow bootp;

omapi-port 7911;
key omapi_key {
        algorithm HMAC-MD5;
        secret "eiflm5CVYvb5a+3P2CXvRYVjvA3Gyy2b6BR3s5A7vyiq+IDocMwkohciOEcy/tfKqznmcO/cfHBBD+deJDeElQ==";
}
omapi-key omapi_key;

subnet 192.168.101.0 netmask 255.255.255.0 {
  range 192.168.101.20 192.168.101.252;
  option log-servers    syslog;
  filename "pxelinux.0";
  next-server 192.168.101.1;
  default-lease-time 21600;
  max-lease-time 43200;
}
======================================================================================
[root@hadoopserver settings.d]# cat foreman_proxy.yml 
---
### File managed with puppet ###
## Module:           'foreman_proxy'

:settings_directory: /etc/foreman-proxy/settings.d

# SSL Setup

# if enabled, all communication would be verfied via SSL
# NOTE that both certificates need to be signed by the same CA in order for this to work
# see http://theforeman.org/projects/smart-proxy/wiki/SSL for more information
:ssl_ca_file: /var/lib/puppet/ssl/certs/ca.pem
:ssl_certificate: /var/lib/puppet/ssl/certs/hadoopserver.domain.com.pem
:ssl_private_key: /var/lib/puppet/ssl/private_keys/hadoopserver.domain.com.pem

# the hosts which the proxy accepts connections from
# commenting the following lines would mean every verified SSL connection allowed
:trusted_hosts:
  - hadoopserver.domain.com
  - 192.168.101.1
  - localhost
# Endpoint for reverse communication
:foreman_url: https://hadoopserver.domain.com

# SSL settings for client authentication against Foreman. If undefined, the values
# from general SSL options are used instead. Mainly useful when Foreman uses
# different certificates for its web UI and for smart-proxy requests.
:foreman_ssl_ca: /var/lib/puppet/ssl/certs/ca.pem
:foreman_ssl_cert: /var/lib/puppet/ssl/certs/hadoopserver.domain.com.pem
:foreman_ssl_key: /var/lib/puppet/ssl/private_keys/hadoopserver.domain.com.pem
#:foreman_ssl_ca: ssl/certs/ca.pem
#:foreman_ssl_cert: ssl/certs/fqdn.pem
#:foreman_ssl_key: ssl/private_keys/fqdn.pem

# by default smart_proxy runs in the foreground. To enable running as a daemon, uncomment 'daemon' setting
:daemon: true
# Only used when 'daemon' is set to true.
# Uncomment and modify if you want to change the default pid file '/var/run/foreman-proxy/foreman-proxy.pid'
#:daemon_pid: /var/run/foreman-proxy/foreman-proxy.pid

# HTTP ports configuration
# http is disabled by default. To enable, uncomment 'http_port' setting
# https is enabled if certificate, CA certificate, and private key are present in locations specifed by
# ssl_certificate, ssl_ca_file, and ssl_private_key correspondingly
# default values for https_port is 8443
:https_port: 8443
:http_port: 8000

# shared options for virsh DNS/DHCP provider
:virsh_network: ForeManNetwork

# Where our proxy log files are stored
# filename or STDOUT
:log_file: /var/log/foreman-proxy/proxy.log
# valid options are
# WARN, DEBUG, Error, Fatal, INFO, UNKNOWN
:log_level: DEBUG
==================================================


Files

Domains.png View Domains.png 33.5 KB domain settings shads ap, 07/23/2015 02:07 AM
Smart-proxy.png View Smart-proxy.png 35.9 KB smart-proxy services enabled shads ap, 07/23/2015 02:07 AM
Proxies.png View Proxies.png 50.1 KB proxies in subnets shads ap, 07/23/2015 02:07 AM
Subnets.png View Subnets.png 83.6 KB subnet settings shads ap, 07/23/2015 02:07 AM
Actions #1

Updated by Dominic Cleal almost 9 years ago

  • Description updated (diff)
Actions #2

Updated by Dominic Cleal almost 9 years ago

  • Status changed from New to Need more information

The log file is probably the first thing to check - can you provide the proxy.log from the time you're getting the error?

Logs from dhcpd too would be useful, probably from syslog.

Actions #3

Updated by shads ap almost 9 years ago

Dominic Cleal wrote:

The log file is probably the first thing to check - can you provide the proxy.log from the time you're getting the error?

Logs from dhcpd too would be useful, probably from syslog.

Actions #4

Updated by shads ap almost 9 years ago

Sure ... will fetch the log and update here. Thanks

Actions #5

Updated by shads ap almost 9 years ago

Please find the /var/log/foreman/production.log below:-

2015-07-26 09:39:23 [I]

Started POST "/hosts" for 10.0.9.183 at 2015-07-26 09:39:23 +0400
2015-07-26 09:39:23 [I] Processing by HostsController#create as */*
2015-07-26 09:39:23 [I] Parameters: {"utf8"=>"✓", "authenticity_token"=>"lmzmsCXQJ+s5eXlayu2yvHshu+rR79uTS8CpBky5QwU=", "host"=>{"name"=>"client1", "hostgroup_id"=>"2", "compute_resource_id"=>"", "environment_id"=>"2", "puppet_ca_proxy_id"=>"1", "puppet_proxy_id"=>"1", "puppetclass_ids"=>[""], "managed"=>"true", "progress_report_id"=>"[FILTERED]", "type"=>"Host::Managed", "interfaces_attributes"=>{"0"=>{"_destroy"=>"0", "type"=>"Nic::Managed", "mac"=>"52:54:00:aa:03:13", "identifier"=>"eth0", "name"=>"client1", "domain_id"=>"1", "subnet_id"=>"1", "ip"=>"192.168.101.30", "managed"=>"1", "primary"=>"1", "provision"=>"1", "virtual"=>"0", "tag"=>"", "attached_to"=>""}, "new_interfaces"=>{"_destroy"=>"1", "type"=>"Nic::Managed", "mac"=>"", "identifier"=>"", "name"=>"", "domain_id"=>"", "subnet_id"=>"", "ip"=>"", "managed"=>"1", "primary"=>"0", "provision"=>"0", "virtual"=>"0", "tag"=>"", "attached_to"=>"admin"}}, "architecture_id"=>"1", "operatingsystem_id"=>"1", "provision_method"=>"build", "build"=>"1", "medium_id"=>"10", "ptable_id"=>"8", "disk"=>"", "root_pass"=>"[FILTERED]", "is_owned_by"=>"3-Users", "enabled"=>"1", "model_id"=>"", "comment"=>"", "overwrite"=>"false"}}
2015-07-26 09:39:24 [I] Create DHCP reservation for client1.domain.com-52:54:00:aa:03:13/192.168.101.30
2015-07-26 09:39:24 [W] Create DHCP Settings for client1.domain.com task failed with the following error: ERF12-6899 [ProxyAPI::ProxyException]: Unable to set DHCP entry ([RestClient::BadRequest]: 400 Bad Request) for proxy https://hadoopserver.domain.com:8443/dhcp/usr/share/foreman/lib/proxy_api/dhcp.rb:66:in `rescue in set'
/usr/share/foreman/lib/proxy_api/dhcp.rb:62:in `set'
/usr/share/foreman/lib/net/dhcp/record.rb:29:in `create'
/usr/share/foreman/app/models/concerns/orchestration/dhcp.rb:25:in `set_dhcp'
/usr/share/foreman/app/models/concerns/orchestration.rb:141:in `execute'
/usr/share/foreman/app/models/concerns/orchestration.rb:86:in `block in process'
/usr/share/foreman/app/models/concerns/orchestration.rb:78:in `each'
/usr/share/foreman/app/models/concerns/orchestration.rb:78:in `process'
/usr/share/foreman/app/models/concerns/orchestration.rb:19:in `on_save'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:649:in `_run__2317314957712211960__save__3566245033051328600__callbacks'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:405:in `__run_callback'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:385:in `_run_save_callbacks'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:81:in `run_callbacks'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/callbacks.rb:264:in `create_or_update'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/persistence.rb:84:in `save'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/validations.rb:50:in `save'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/attribute_methods/dirty.rb:22:in `save'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:241:in `block (2 levels) in save'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:295:in `block in with_transaction_returning_status'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/database_statements.rb:192:in `transaction'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:208:in `transaction'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:293:in `with_transaction_returning_status'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:241:in `block in save'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:252:in `rollback_active_record_state!'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:240:in `save'
/usr/share/foreman/app/models/concerns/foreman/sti.rb:29:in `save_with_type'
/usr/share/foreman/app/controllers/hosts_controller.rb:84:in `create'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/implicit_render.rb:4:in `send_action'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/base.rb:167:in `process_action'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/rendering.rb:10:in `process_action'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/callbacks.rb:18:in `block in process_action'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:627:in `block (4 levels) in run_2142735281260475663__process_action__2326221629229067714__callbacks'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:215:in `block in conditional_callback_around_7441'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:326:in `around'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:310:in `_callback_around_1633'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:214:in `_conditional_callback_around_7441'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:626:in `block (3 levels) in _run
_2142735281260475663__process_action__2326221629229067714__callbacks'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:215:in `block in conditional_callback_around_7440'
/usr/share/foreman/app/controllers/concerns/application_shared.rb:13:in `set_timezone'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:214:in `_conditional_callback_around_7440'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:625:in `block (2 levels) in _run
_2142735281260475663__process_action__2326221629229067714__callbacks'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:215:in `block in conditional_callback_around_7439'
/usr/share/foreman/app/models/concerns/foreman/thread_session.rb:32:in `clear_thread'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:214:in `_conditional_callback_around_7439'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:448:in `block in _run
_2142735281260475663__process_action__2326221629229067714__callbacks'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:215:in `block in conditional_callback_around_7438'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:326:in `around'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:310:in `_callback_around_13'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:214:in `_conditional_callback_around_7438'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:414:in `_run
_2142735281260475663__process_action__2326221629229067714__callbacks'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:405:in `__run_callback'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:385:in `_run_process_action_callbacks'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:81:in `run_callbacks'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/callbacks.rb:17:in `process_action'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/rescue.rb:29:in `process_action'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/instrumentation.rb:30:in `block in process_action'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/notifications.rb:123:in `block in instrument'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/notifications.rb:123:in `instrument'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/instrumentation.rb:29:in `process_action'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/params_wrapper.rb:207:in `process_action'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/railties/controller_runtime.rb:18:in `process_action'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/base.rb:121:in `process'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/rendering.rb:45:in `process'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal.rb:203:in `dispatch'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/rack_delegation.rb:14:in `dispatch'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal.rb:246:in `block in action'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/routing/route_set.rb:73:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/routing/route_set.rb:73:in `dispatch'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/routing/route_set.rb:36:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/journey-1.0.4/lib/journey/router.rb:68:in `block in call'
/opt/rh/ruby193/root/usr/share/gems/gems/journey-1.0.4/lib/journey/router.rb:56:in `each'
/opt/rh/ruby193/root/usr/share/gems/gems/journey-1.0.4/lib/journey/router.rb:56:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/routing/route_set.rb:600:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/apipie-rails-0.2.6/lib/apipie/static_dispatcher.rb:65:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/apipie-rails-0.2.6/lib/apipie/extractor/recorder.rb:97:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/apipie-rails-0.2.6/lib/apipie/middleware/checksum_in_headers.rb:27:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/etag.rb:23:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/conditionalget.rb:35:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/head.rb:14:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/params_parser.rb:21:in `call'
/usr/share/foreman/lib/middleware/catch_json_parse_errors.rb:9:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/flash.rb:242:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/session/abstract/id.rb:205:in `context'
/opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/session/abstract/id.rb:200:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/cookies.rb:339:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/query_cache.rb:64:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:473:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:405:in `_run__2595123461182137500__call__3566245033051328600__callbacks'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:405:in `__run_callback'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:385:in `_run_call_callbacks'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:81:in `run_callbacks'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/callbacks.rb:27:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/remote_ip.rb:31:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/rack/logger.rb:26:in `call_app'
/opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/rack/logger.rb:16:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/request_id.rb:22:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/methodoverride.rb:21:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/runtime.rb:17:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/cache/strategy/local_cache.rb:72:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/lock.rb:15:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/static.rb:62:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/rack-cache-1.2/lib/rack/cache/context.rb:136:in `forward'
/opt/rh/ruby193/root/usr/share/gems/gems/rack-cache-1.2/lib/rack/cache/context.rb:143:in `pass'
/opt/rh/ruby193/root/usr/share/gems/gems/rack-cache-1.2/lib/rack/cache/context.rb:155:in `invalidate'
/opt/rh/ruby193/root/usr/share/gems/gems/rack-cache-1.2/lib/rack/cache/context.rb:71:in `call!'
/opt/rh/ruby193/root/usr/share/gems/gems/rack-cache-1.2/lib/rack/cache/context.rb:51:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/engine.rb:479:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/application.rb:223:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/railtie/configurable.rb:30:in `method_missing'
/opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/builder.rb:134:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/urlmap.rb:64:in `block in call'
/opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/urlmap.rb:49:in `each'
/opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/urlmap.rb:49:in `call'
/usr/lib/ruby/gems/1.8/gems/passenger-4.0.18/lib/phusion_passenger/rack/thread_handler_extension.rb:77:in `process_request'
/usr/lib/ruby/gems/1.8/gems/passenger-4.0.18/lib/phusion_passenger/request_handler/thread_handler.rb:140:in `accept_and_process_next_request'
/usr/lib/ruby/gems/1.8/gems/passenger-4.0.18/lib/phusion_passenger/request_handler/thread_handler.rb:108:in `main_loop'
/usr/lib/ruby/gems/1.8/gems/passenger-4.0.18/lib/phusion_passenger/request_handler.rb:441:in `block (3 levels) in start_threads'
2015-07-26 09:39:24 [W] Rolling back due to a problem: [Create DHCP Settings for client1.domain.com 10 failed [#<Nic::Managed id: nil, mac: "52:54:00:aa:03:13", ip: "192.168.101.30", type: "Nic::Managed", name: "client1.domain.com", host_id: nil, subnet_id: 1, domain_id: 1, attrs: {}, created_at: nil, updated_at: nil, provider: nil, username: nil, password: nil, virtual: false, link: true, identifier: "eth0", tag: "", attached_to: "", managed: true, mode: "balance-rr", attached_devices: "", bond_options: "", primary: true, provision: true, compute_attributes: {}>, :set_dhcp]]
2015-07-26 09:39:24 [I] Failed to save: Create DHCP Settings for client1.domain.com task failed with the following error: ERF12-6899 [ProxyAPI::ProxyException]: Unable to set DHCP entry ([RestClient::BadRequest]: 400 Bad Request) for proxy https://hadoopserver.domain.com:8443/dhcp
2015-07-26 09:39:24 [I] Rendered hosts/_progress.html.erb (0.2ms)
2015-07-26 09:39:24 [I] Rendered puppetclasses/_selectedClasses.html.erb (0.0ms)
2015-07-26 09:39:24 [I] Rendered puppetclasses/_classes_in_groups.html.erb (0.0ms)
2015-07-26 09:39:24 [I] Rendered puppetclasses/_classes.html.erb (0.0ms)
2015-07-26 09:39:24 [I] Rendered puppetclasses/_class_selection.html.erb (22.8ms)
2015-07-26 09:39:24 [I] Rendered nic/_base_form.html.erb (7.2ms)
2015-07-26 09:39:24 [I] Rendered nic/_virtual_form.html.erb (0.7ms)
2015-07-26 09:39:24 [I] Rendered nic/_provider_specific_form.html.erb (0.1ms)
2015-07-26 09:39:24 [I] Rendered nic/manageds/_managed.html.erb (9.0ms)
2015-07-26 09:39:24 [I] Rendered nic/_base_form.html.erb (5.3ms)
2015-07-26 09:39:24 [I] Rendered nic/_virtual_form.html.erb (0.6ms)
2015-07-26 09:39:24 [I] Rendered nic/_provider_specific_form.html.erb (0.0ms)
2015-07-26 09:39:24 [I] Rendered nic/manageds/_managed.html.erb (6.9ms)
2015-07-26 09:39:24 [I] Rendered hosts/_interfaces.html.erb (17.1ms)
2015-07-26 09:39:24 [I] Rendered common/os_selection/_architecture.html.erb (2.2ms)
2015-07-26 09:39:24 [I] Rendered common/os_selection/_operatingsystem.html.erb (4.4ms)
2015-07-26 09:39:24 [I] Rendered hosts/_operating_system.html.erb (9.9ms)
2015-07-26 09:39:24 [I] Rendered hosts/_unattended.html.erb (10.0ms)
2015-07-26 09:39:24 [I] Rendered puppetclasses/_class_parameters.html.erb (0.0ms)
2015-07-26 09:39:24 [I] Rendered puppetclasses/_classes_parameters.html.erb (4.4ms)
2015-07-26 09:39:24 [I] Rendered common_parameters/_inherited_parameters.html.erb (0.1ms)
2015-07-26 09:39:24 [I] Rendered common_parameters/_puppetclass_parameter.html.erb (1.5ms)
2015-07-26 09:39:24 [I] Rendered common_parameters/_puppetclasses_parameters.html.erb (2.2ms)
2015-07-26 09:39:24 [I] Rendered common_parameters/_parameter.html.erb (0.9ms)
2015-07-26 09:39:24 [I] Rendered common_parameters/_parameters.html.erb (1.9ms)
2015-07-26 09:39:24 [I] Rendered hosts/_form.html.erb (93.9ms)
2015-07-26 09:39:24 [I] Rendered hosts/new.html.erb within layouts/application (94.1ms)
2015-07-26 09:39:24 [I] Rendered home/_user_dropdown.html.erb (0.8ms)
2015-07-26 09:39:24 [I] Read fragment views/tabs_and_title_records-3 (0.1ms)
2015-07-26 09:39:24 [I] Rendered home/_topbar.html.erb (1.4ms)
2015-07-26 09:39:24 [I] Rendered layouts/base.html.erb (2.2ms)
2015-07-26 09:39:24 [I] Completed 200 OK in 501ms (Views: 88.3ms | ActiveRecord: 20.0ms)
2015-07-26 09:39:25 [I]

Started GET "/tasks/fdd3f6ee-e551-4dd0-a969-5e84e5cf3ca4" for 10.0.9.183 at 2015-07-26 09:39:25 +0400
2015-07-26 09:39:25 [I] Processing by TasksController#show as */*
2015-07-26 09:39:25 [I] Parameters: {"id"=>"fdd3f6ee-e551-4dd0-a969-5e84e5cf3ca4"}
2015-07-26 09:39:25 [I] Parameters: {"id"=>"fdd3f6ee-e551-4dd0-a969-5e84e5cf3ca4"}
2015-07-26 09:39:25 [I] Rendered tasks/_list.html.erb (0.2ms)
2015-07-26 09:39:25 [I] Completed 200 OK in 3ms (Views: 0.6ms | ActiveRecord: 0.5ms)

====================================================================================================

Also please find the /var/log/foreman-proxy/proxy.log below:-

D, [2015-07-26T09:39:23.955121 #7826] DEBUG -- : verifying remote client 10.0.9.183 against trusted_hosts hadoopserver.domain.com192.168.101.1localhost
10.0.9.183 - - [26/Jul/2015 09:39:23] "GET /serverName HTTP/1.1" 200 30 0.0024
D, [2015-07-26T09:39:24.029008 #7826] DEBUG -- : verifying remote client 10.0.9.183 against trusted_hosts hadoopserver.domain.com192.168.101.1localhost
D, [2015-07-26T09:39:24.030144 #7826] DEBUG -- : Reading config file /etc/dhcp/dhcpd.conf
D, [2015-07-26T09:39:24.030391 #7826] DEBUG -- : Reading config file /var/lib/dhcpd/dhcpd.leases
D, [2015-07-26T09:39:24.030613 #7826] DEBUG -- : Loading subnets for 127.0.0.1
E, [2015-07-26T09:39:24.030926 #7826] ERROR -- : Subnet 192.168.101.0 not found
10.0.9.183 - - [26/Jul/2015 09:39:24] "GET /192.168.101.0/192.168.101.30 HTTP/1.1" 404 30 0.0025
D, [2015-07-26T09:39:24.252646 #7826] DEBUG -- : verifying remote client 10.0.9.183 against trusted_hosts hadoopserver.domain.com192.168.101.1localhost
D, [2015-07-26T09:39:24.253106 #7826] DEBUG -- : Reading config file /etc/dhcp/dhcpd.conf
D, [2015-07-26T09:39:24.253382 #7826] DEBUG -- : Reading config file /var/lib/dhcpd/dhcpd.leases
D, [2015-07-26T09:39:24.253603 #7826] DEBUG -- : Loading subnets for 127.0.0.1
E, [2015-07-26T09:39:24.254004 #7826] ERROR -- : No Subnet detected for: "192.168.101.0"
D, [2015-07-26T09:39:24.254102 #7826] DEBUG -- : /usr/share/foreman-proxy/modules/dhcp/server.rb:111:in `addRecord'
/usr/share/foreman-proxy/modules/dhcp/providers/server/isc.rb:32:in `addRecord'
/usr/share/foreman-proxy/modules/dhcp/dhcp_api.rb:96:in `POST /:network'
/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:35: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/smart_proxy.rb:136:in `launch'
/usr/share/foreman-proxy/lib/smart_proxy.rb:136:in `initialize'
/usr/share/foreman-proxy/lib/smart_proxy.rb:136:in `new'
/usr/share/foreman-proxy/lib/smart_proxy.rb:136:in `launch'
/usr/share/foreman-proxy/bin/smart-proxy:6
10.0.9.183 - - [26/Jul/2015 09:39:24] "POST /192.168.101.0 HTTP/1.1" 400 39 0.0021

Actions #6

Updated by shads ap almost 9 years ago

Addition to the above update +++++++++++++++++++++++++++++++++++++++

Since the IP was not getting generated and were not allowed to proceed without an IP, we tried giving the IP "192.168.101.30" manually.

Actions #7

Updated by Dominic Cleal almost 9 years ago

Can you share your dhcpd configuration? "No Subnet detected for: "192.168.101.0" " suggests that perhaps that subnet isn't configured.

Actions #8

Updated by shads ap almost 9 years ago

Hi Dominic,

Please see the configuration below:- (Our first post included this configuration file)

==============================================================================

[root@hadoopserver ~]# cat /etc/dhcp/dhcpd.conf
ddns-update-style interim;
ignore client-updates;
authoritative;
allow booting;
allow bootp;

omapi-port 7911;
key omapi_key {
algorithm HMAC-MD5;
secret "eiflm5CVYvb5a+3P2CXvRYVjvA3Gyy2b6BR3s5A7vyiq+IDocMwkohciOEcy/tfKqznmcO/cfHBBD+deJDeElQ==";
}
omapi-key omapi_key;

subnet 192.168.101.0 netmask 255.255.255.0 {
range 192.168.101.20 192.168.101.252;
option log-servers syslog;
filename "pxelinux.0";
next-server 192.168.101.1;
default-lease-time 21600;
max-lease-time 43200;
}

====================================

[root@hadoopserver settings.d]# pwd
/etc/foreman-proxy/settings.d
[root@hadoopserver settings.d]# ls l Komapi*
-rw------
. 1 foreman-proxy foreman-proxy 118 Jul 14 12:10 Komapi_key.+157+55117.key
rw------. 1 foreman-proxy foreman-proxy 229 Jul 14 12:10 Komapi_key.+157+55117.private ====================================

Actions #9

Updated by shads ap almost 9 years ago

Just to add to the above comment:

The iptables is all flushed for testing purpose.

Foreman is installed on 10.0.9.x range. It is also available from 192.168.101.x network range.
The virtual machines(which should be the host KVM servers) are to be provisioned inside 192.168.101.x network range.

Actions #10

Updated by shads ap almost 9 years ago

[root@hadoopserver settings.d]# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.101.0 0.0.0.0 255.255.255.0 U 0 0 0 virbr1
10.0.9.0 0.0.0.0 255.255.255.0 U 0 0 0 em1
192.168.122.0 0.0.0.0 255.255.255.0 U 0 0 0 virbr0
169.254.0.0 0.0.0.0 255.255.0.0 U 1002 0 0 em1
0.0.0.0 10.0.9.1 0.0.0.0 UG 0 0 0 em1

Actions #11

Updated by Dominic Cleal almost 9 years ago

It looks like you need to add 192.168.101.0/255.255.255.0 to this config line, then restart foreman-proxy:

:dhcp_subnets: [192.168.101.20/255.255.255.0, 192.168.101.252/255.255.255.0]
Actions #12

Updated by Dominic Cleal about 8 years ago

  • Status changed from Need more information to Resolved
Actions

Also available in: Atom PDF