Neeloj
April 4, 2023, 6:39am
1
hi all,
when I try to add host group to a host I get below error:
No host found
The host test-agent does not exist or there are access permissions needed. Please contact your administrator if this issue continues.
thanks for any suggestion…
Foreman and Proxy versions: foreman 3.5.2 , foreman-proxy 3.5.2
Distribution and version: Ubuntu 20.04.4 LTS
Neeloj
April 4, 2023, 7:37am
2
when I call node.rb host liek below I get also an error:
# /etc/puppetlabs/puppet/node.rb test-agent
test-agent: During the fact upload the server responded with: 500 Internal Server Error. Error is ignored and the execution continues.
{
"error": {"message":"Internal Server Error: the server was unable to finish the request. This may be caused by unavailability of some required service, incorrect API call or a server-side bug. There may be more information in the server's logs."}
}
---
parameters:
foreman_config_groups:
- test-config-group
puppetmaster: ''
foreman_env: production
foreman_hostname: test-agent
foreman_fqdn: test-agent
hostgroup: HG-hostgroup
root_pw:
foreman_subnets: []
foreman_interfaces:
- ip: 100.13.10.23
ip6:
mac: 00:50:56:a6:1e:de
name: test-agent
attrs:
dhcp: ''
mtu: 1500
bindings:
- address: 100.13.10.23
netmask: 255.255.254.0
network: 100.13.10.0
bindings6:
- address: fe80::c4a:ec63:1c8d:b68f
netmask: 'ffff:ffff:ffff:ffff::'
network: 'fe80::'
scope6: link
netmask: 255.255.254.0
network: 10.136.160.0
netmask6: 'ffff:ffff:ffff:ffff::'
network6: 'fe80::'
scope6: link
virtual: false
link: true
identifier: Ethernet0
managed: true
primary: true
provision: true
subnet:
subnet6:
tag:
attached_to:
type: Interface
domainname:
owner_name:
owner_email:
ssh_authorized_keys: []
foreman_users:
bar:
firstname:
lastname:
mail:
description: ''
fullname:
name:
ssh_authorized_keys: []
host_packages: ''
host_registration_insights: false
host_registration_remote_execution: true
classes:
create_machine:
custom_sub:
environment: production
Neeloj
April 4, 2023, 7:51am
3
production.log:
2023-04-04T09:47:10 [I|app|fa531f4e] Rendered api/v2/errors/standard_error.json.rabl within api/v2/layouts/error_layout (Duration: 0.3ms | Allocations: 97)
2023-04-04T09:47:10 [I|app|fa531f4e] Rendered layout api/v2/layouts/error_layout.json.erb (Duration: 0.6ms | Allocations: 185)
2023-04-04T09:47:10 [I|app|fa531f4e] Completed 500 Internal Server Error in 22ms (Views: 1.5ms | ActiveRecord: 5.1ms | Allocations: 6453)
2023-04-04T09:47:10 [I|app|21cfa9e7] Started PATCH "/hosts/666" for 2.23.3.7 at 2023-04-04 09:47:10 +0200
2023-04-04T09:47:10 [I|app|21cfa9e7] Processing by HostsController#update as */*
2023-04-04T09:47:10 [I|app|21cfa9e7] Parameters: {"utf8"=>"✓", "authenticity_token"=>"f6F83/kEipf2eGvGqvk+ejcizqW9FMVc6zwSI8ojVi8RCD0KtM9kHta1YfJESI7VJc8U6laUW9fYnL8YRIn15w==", "host"=>{"name"=>"test-agent", "hostgroup_id"=>"1", "puppet_attributes"=>{"environment_id"=>"1"}, "puppet_proxy_id"=>"", "pu
ppet_ca_proxy_id"=>"", "config_group_ids"=>[""], "puppetclass_ids"=>[""], "managed"=>"false", "progress_report_id"=>"[FILTERED]", "interfaces_attributes"=>{"0"=>{"_destroy"=>"0", "mac"=>"00:50:56:a6:1e:de", "identifier"=>"Ethernet0", "name"=>"test-agent", "domain_id"=>"16", "ip"=>"10.136.160.23", "ip6"=>"", "manage
d"=>"1", "primary"=>"1", "provision"=>"1", "tag"=>"", "attached_to"=>"", "id"=>"790"}}, "is_owned_by"=>"5-Users", "enabled"=>"1", "model_id"=>"", "comment"=>"", "overwrite"=>"false"}, "id"=>"666"}
2023-04-04T09:47:11 [W|api|21cfa9e7] param host[puppetclass_*] has been deprecated in favor of host[puppet_attributes][puppetclass_*]
2023-04-04T09:47:11 [W|api|21cfa9e7] param host[config_group_*] has been deprecated in favor of host[puppet_attributes][config_group_*]
2023-04-04T09:47:11 [I|aud|21cfa9e7] Host::Base (666) update event on hostgroup_id , 1
2023-04-04T09:47:11 [I|app|21cfa9e7] Redirected to https://dev-srv/new/hosts/test-agent
2023-04-04T09:47:11 [I|app|21cfa9e7] Completed 302 Found in 73ms (ActiveRecord: 15.9ms | Allocations: 18702)
2023-04-04T09:47:11 [I|app|c84b1944] Started GET "/new/hosts/test-agent" for 2.23.3.7 at 2023-04-04 09:47:11 +0200
2023-04-04T09:47:11 [I|app|c84b1944] Processing by ReactController#index as */*
2023-04-04T09:47:11 [I|app|c84b1944] Parameters: {"id"=>"test-agent"}
2023-04-04T09:47:11 [I|app|c84b1944] Rendered react/index.html.erb within layouts/react_application (Duration: 0.1ms | Allocations: 33)
2023-04-04T09:47:11 [I|app|c84b1944] Rendered layouts/base.html.erb (Duration: 22.4ms | Allocations: 12189)
2023-04-04T09:47:11 [I|app|c84b1944] Rendered layout layouts/react_application.html.erb (Duration: 23.0ms | Allocations: 12401)
2023-04-04T09:47:11 [I|app|c84b1944] Completed 200 OK in 44ms (Views: 18.6ms | ActiveRecord: 17.7ms | Allocations: 395)
2023-04-04T09:47:11 [I|app|64987741] Started POST "/api/hosts/facts" for 195.62.121.79 at 2023-04-04 09:47:11 +0200
2023-04-04T09:47:11 [I|app|d7c30507] Started GET "/api/hosts/test-agent" for 2.23.3.7 at 2023-04-04 09:47:11 +0200
2023-04-04T09:47:11 [I|app|70812a77] Started GET "/hosts/test-agent/statuses" for 2.23.3.7 at 2023-04-04 09:47:11 +0200
2023-04-04T09:47:11 [I|app|d7c30507] Processing by Api::V2::HostsController#show as JSON
2023-04-04T09:47:11 [I|app|d7c30507] Parameters: {"apiv"=>"v2", "id"=>"test-agent"}
2023-04-04T09:47:11 [I|app|84f9381d] Started GET "/api/hosts/test-agent/power?timeout=30" for 2.23.3.7 at 2023-04-04 09:47:11 +0200
2023-04-04T09:47:11 [I|app|ef625b09] Started GET "/api/audits?search=host%3Dtest-agent&per_page=3" for 2.23.3.7 at 2023-04-04 09:47:11 +0200
2023-04-04T09:47:11 [I|app|70812a77] Processing by HostsController#statuses as JSON
2023-04-04T09:47:11 [I|app|70812a77] Parameters: {"id"=>"test-agent"}
2023-04-04T09:47:11 [I|app|84f9381d] Processing by Api::V2::HostsController#power_status as JSON
2023-04-04T09:47:11 [I|app|84f9381d] Parameters: {"timeout"=>"30", "apiv"=>"v2", "id"=>"test-agent"}
2023-04-04T09:47:11 [I|app|ef625b09] Processing by Api::V2::AuditsController#index as JSON
2023-04-04T09:47:11 [I|app|ef625b09] Parameters: {"search"=>"host=test-agent", "per_page"=>"3", "apiv"=>"v2"}
2023-04-04T09:47:11 [I|app|64987741] Import facts for 'sv01vmr2.radiologie.ranova.de' completed. Added: 0, Updated: 2, Deleted 0 facts
2023-04-04T09:47:11 [I|app|70812a77] Rendered common/404.html.erb within layouts/application (Duration: 1.8ms | Allocations: 456)
2023-04-04T09:47:11 [I|app|84f9381d] Couldn't find Host::Managed with 'id'=test-agent [WHERE "hosts"."type" = $1] (ActiveRecord::RecordNotFound)
2023-04-04T09:47:11 [I|app|84f9381d] Rendered api/v2/errors/not_found.json.rabl within api/v2/layouts/error_layout (Duration: 0.4ms | Allocations: 109)
2023-04-04T09:47:11 [I|app|84f9381d] Rendered layout api/v2/layouts/error_layout.json.erb (Duration: 0.7ms | Allocations: 197)
2023-04-04T09:47:11 [I|app|84f9381d] Completed 404 Not Found in 15ms (Views: 1.8ms | ActiveRecord: 3.8ms | Allocations: 3206)
2023-04-04T09:47:11 [I|app|70812a77] Rendered layouts/base.html.erb (Duration: 2.5ms | Allocations: 1346)
2023-04-04T09:47:11 [I|app|70812a77] Rendered layout layouts/application.html.erb (Duration: 7.1ms | Allocations: 2861)
2023-04-04T09:47:11 [I|app|70812a77] Completed 404 Not Found in 23ms (Views: 9.1ms | ActiveRecord: 1.9ms | Allocations: 5984)
2023-04-04T09:47:11 [I|app|d7c30507] Couldn't find Host::Managed with 'id'=test-agent [WHERE "hosts"."type" = $1] (ActiveRecord::RecordNotFound)
2023-04-04T09:47:11 [I|app|ef625b09] Rendered api/v2/audits/index.json.rabl within api/v2/layouts/index_layout (Duration: 6.3ms | Allocations: 1346)
2023-04-04T09:47:11 [I|app|d7c30507] Rendered api/v2/errors/not_found.json.rabl within api/v2/layouts/error_layout (Duration: 0.4ms | Allocations: 112)
2023-04-04T09:47:11 [I|app|d7c30507] Rendered layout api/v2/layouts/error_layout.json.erb (Duration: 0.8ms | Allocations: 200)
2023-04-04T09:47:11 [I|app|d7c30507] Completed 404 Not Found in 29ms (Views: 2.5ms | ActiveRecord: 8.7ms | Allocations: 3840)
2023-04-04T09:47:11 [I|app|ef625b09] Rendered layout api/v2/layouts/index_layout.json.erb (Duration: 33.5ms | Allocations: 2134)
2023-04-04T09:47:11 [I|app|ef625b09] Completed 200 OK in 47ms (Views: 9.9ms | ActiveRecord: 27.1ms | Allocations: 5051)
2023-04-04T09:47:11 [W|app|64987741] Action failed
Neeloj
April 5, 2023, 12:47pm
4
after upgrade to Foreman version 3.6 all works good.