Register Host is giving errors

Problem:
When I try to fill out the form, I get an error: “alert:Invalid field: Activation Keys”. If I go to the Advanced tab and select an Activation Key, then fill out some other fields (hostgroup), I get a different error: " alert:There was an error while loading the data, see the logs for more information"

I’m 101% sure it’s something I’m doing wrong. Like I don’t have a correct environment or something setup. But I’m not sure how to proceed. Mainly, I want a registration link I can use that assigns a host to the correct Hostgroup when not using the native PXE build. It used to work, but I haven’t tried it in a while (probably pre-3.0 release).

Expected outcome:
Be able to create a registration link

Foreman and Proxy versions:
3.2.0 with Katello

Foreman and Proxy plugin versions:

Distribution and version:
CentOS 8 Stream

@lstejskal any thoughts?

Hi, can you upload the application log?

Which log would you need? /var/log/foreman/production.log? It doesn’t appear to produce anything when viewing the register host page.

Which log would you need? /var/log/foreman/production.log?

Yes this one

It doesn’t appear to produce anything when viewing the register host page.

There should be something when the form shows " alert:There was an error while loading the data, see the logs for more information".

So in the moment you got the error in the form you should see something in the application log.

There is nothing showing up in the production log when I navigate that page. But watching the chrome devtools, I am getting some 404 errors.

When I select the Organization, I see a successful request to:

/hosts/register/data?organization_id=1

When I then select the Location, I see a successful request to:

/hosts/register/data?organization_id=1&location_id=2

When I then select a Host group, I get 404 errors to two URLs:

/hosts/register/data?organization_id=1&location_id=2&hostgroup_id=11
/hosts/register/data?organization_id=1&location_id=2&hostgroup_id=11&operatingsystem_id=

That’s when the “There was an error while loading the data, see the logs for more information” error shows up.

Does that help at all?