Build error.... error 500

Problem:
trying to build a new server, when clicking on build, all check green,
then this error :
“request failed with status code 500”

Expected outcome:
a server in build phase…
Foreman and Proxy versions:
3.3

Distribution and version:
RHEL8
Other relevant data:

don’t know where to look for the error and/or better debug info ?.

Hi,
enable debug logs:

foreman-installer --foreman-logging-level "debug" --foreman-proxy-log-level "DEBUG"

And then please upload logs from the foreman:

/var/log/foreman/production.log

and smart proxy:

/var/log/foreman-proxy/proxy.log

here is /var/log/foreman/production.log

2023-03-22T10:03:15 [I|app|beb7c553] Processing by HostsController#setBuild as JSON
2023-03-22T10:03:15 [I|app|beb7c553] Parameters: {“id”=>“ypstor008s.foreman-install.worldline.com”, “host”=>{}}
2023-03-22T10:03:15 [W|app|beb7c553] Not queueing Host::Managed: [“Root password should be 8 characters or more”, “Root password should not be blank - consider setting a global or host group default”]
2023-03-22T10:03:15 [W|app|beb7c553] Not queueing Host::Managed: [“Root password should be 8 characters or more”, “Root password should not be blank - consider setting a global or host group default”]
2023-03-22T10:03:15 [W|app|beb7c553] Not queueing Host::Managed: [“Root password should be 8 characters or more”, “Root password should not be blank - consider setting a global or host group default”]
2023-03-22T10:03:15 [I|app|beb7c553] Fetching DHCP reservation ypstor008s.foreman-install.worldline.com for ypstor008s.foreman-install.worldline.com-b0:26:28:4e:6f:2a/10.28.236.177
2023-03-22T10:03:15 [W|app|beb7c553] Not queueing Nic::Managed: [“Root password should be 8 characters or more”, “Root password should not be blank - consider setting a global or host group default”]
2023-03-22T10:03:15 [W|app|beb7c553] Not queueing Discovery reboot: Root password should be 8 characters or more and Root password should not be blank - consider setting a global or host group default
2023-03-22T10:03:15 [W|app|beb7c553] Set build failed: #<ActiveModel::Errors:0x0000557ebff284b8 @base=#<Host::Managed id: 68, name: “ypstor008s.foreman-install.worldline.com”, last_compile: nil, last_report: nil, updated_at: “2023-03-21 15:42:07”, created_at: “2023-03-21 14:36:01”, root_pass: nil, architecture_id: 1, operatingsystem_id: 7, ptable_id: 145, medium_id: 26, build: true, comment: “”, disk: “”, installed_at: nil, model_id: nil, hostgroup_id: nil, owner_id: 19, owner_type: “User”, enabled: true, puppet_ca_proxy_id: nil, managed: true, use_image: nil, image_file: nil, uuid: nil, compute_resource_id: nil, puppet_proxy_id: nil, certname: nil, image_id: nil, organization_id: 1, location_id: 2, type: “Host::Managed”, otp: nil, realm_id: nil, compute_profile_id: nil, provision_method: “build”, grub_pass: “$5$H2fPceJnMX7k2rso$/tOeq/Sf3MyNika66y0Na8uw1wKsih…”, global_status: 0, lookup_value_matcher: [FILTERED], pxe_loader: “PXELinux BIOS”, initiated_at: “2023-03-22 09:03:15”, build_errors: nil, discovery_rule_id: nil>, @messages={:root_pass=>[“should be 8 characters or more”, “should not be blank - consider setting a global or host group default”]}, @details={:root_pass=>[{:error=>:too_short, :count=>8}, {:error=>:blank}]}>
2023-03-22T10:03:15 [I|app|beb7c553] Completed 500 Internal Server Error in 452ms (Views: 0.2ms | ActiveRecord: 33.9ms | Allocations: 72415)
2023-03-22T10:03:21 [I|app|91dd6a0e] Started GET “/notification_recipients” for 10.26.239.235 at 2023-03-22 10:03:21 +0100
2023-03-22T10:03:21 [I|app|91dd6a0e] Processing by NotificationRecipientsController#index as JSON
2023-03-22T10:03:21 [I|app|91dd6a0e] Completed 200 OK in 6ms (Views: 0.1ms | ActiveRecord: 1.5ms | Allocations: 1600)
2023-03-22T10:03:31 [I|app|ee29bedd] Started GET “/notification_recipients” for 10.26.239.235 at 2023-03-22 10:03:31 +0100
2023-03-22T10:03:31 [I|app|ee29bedd] Processing by NotificationRecipientsController#index as JSON
2023-03-22T10:03:31 [I|app|ee29bedd] Completed 200 OK in 6ms (Views: 0.1ms | ActiveRecord: 1.5ms | Allocations: 1600)

after, looking at it, I change my root password and now, no more errors !!
seems, there is missing something in error messages ?

Interesting, I can’t reproduce the issue on latest Foreman version, when the password is empty or has less than eight characters, I’ll get an error in the form with selected password field.

That same goes for the password inherited from the host group, if it is empty I’ll get an error, and I can’t set password on host group that is less than eight characters, there is an validation for it.