Browser display

Problem: Browser display is formatted oddly, all detail is shown below the menu bar and not formatted as tables

Expected outcome: Return to an expected display

Foreman and Proxy versions:
foreman-3.14.0-1.el9.noarch
katello-4.16.1-1.el9.noarch

Foreman and Proxy plugin versions:

Distribution and version:
Rocky Linux 9.5 (fully patches)

Other relevant data:

I’m starting to tear my hair out. After my last upgrade go-round a month ago, my browser displays have all been very different, the detailed data is not formatted in the browser like I’m used to. I’ve gone so far as to completely reload the OS, load fresh copies of Katello and The Foreman packages, retaining the database, pulp content, and contents of /etc/foreman. Okay, a couple of other things. I see a lot of errors in production.log. Earliest is:

Backtrace for ‘unknown class AnsibleRole, ignoring’ error (NameError): uninitialized constant AnsibleRole

This is following by a lot of traceback data.

It wouldn’t be the end of the world if I had to burn it down completely and start from scratch, but I’d like to know what I’ve done, and how I can fix it in place?

Am I making any sense? What else can I supply?

1 Like

I should add that I’ve tried multiple browsers on multiple hosts, clearing cache & cookies, without any change in behavior.

1 Like

Hi @jkalchik ,

Are you able to run the foreman-installer? It should shore up your environment or error out if something is wrong.

Pasting more backtraces from your logs would be helpful, the errors within there are likely important. My best guess at this point is that one of your plugins is failing dramatically due to some config or installation issue. The UI issues may just be one symptom of a larger issue.

Does hammer (or the API) seem to work correctly?

Yes, foreman-installer runs to completion without error. My understanding is that foreman-installer will correct db schema issues along with a multitude of other sins. Hammer seems to work. Everything else, repository syncs, promotion to lifecycle environment, client host downloads, all seem to work. The only thing that I don’t see running right is page displays.

katello.log.gz (111.1 KB) (foreman-installer log)
production.log.gz (59.1 KB)

1 Like

Hi Jeff,

Thank you for sending over the installer + error logs. You’re correct that nothing seems obviously broken outside of the main AnsibleRole error. I can confirm your machine is using the same version of the activesupport gem as our end (7.0.8.7). I’m going to keep looking into this and see if I can find something more to report on.

1 Like

Figures… when I break something, I REALLY break something.

Let me know if I can supply anything else. Zoom sessions are also another possibility.

1 Like

I just sanity checked myself by installing 4.16.1 on EL 9.5. Everything seems to be okay with the RPMs.

Another interesting observation is that your screenshot is using the Satellite color scheme instead of the upstream Foreman one. Would you mind sharing any errors the Javascript console shows?

1 Like

This might just be a coincidence unless the foreman_theme_satellite gem is installed, I’ve seen my dev environment UI break in a similar manner before where the UI turned black. It was temporary though, and fixed itself on a reload.

The Backtrace for 'unknown class AnsibleVariable, ignoring' error (NameError): uninitialized constant AnsibleVariable error might be Zeitwerk related, at least I see a mention of it in the backtrace.

AnsibleVariable I believe comes from foreman_ansible, is there any chance that the plugin isn’t up to date?

@nofaralfasi, in case this isn’t just a rabbit hole, does the following start of the error (more in the production log attachement above) raise any alarm for you?

2025-05-12T13:30:13 [W|app|] unknown class AnsibleVariable, ignoring
2025-05-12T13:30:13 [I|app|] Backtrace for 'unknown class AnsibleVariable, ignoring' error (NameError): uninitialized constant AnsibleVariable
 | Did you mean?  AnsibleFactParser
 | /usr/share/gems/gems/activesupport-7.0.8.7/lib/active_support/inflector/methods.rb:278:in `constantize'
 | /usr/share/gems/gems/activesupport-7.0.8.7/lib/active_support/core_ext/string/inflections.rb:74:in `constantize'
 | /usr/share/foreman/app/models/filter.rb:86:in `get_resource_class'

Seeing logs from the web developer console should be helpful like Quinn mentioned, I’m guessing there are javascript errors.

I don’t recall ever changing the default scheme. As a rule, I tend to run with defaults where ever possible.

Javaconsole, on displaying the login page:
GET https://katello.asymptotedevelopment.com/assets/application-6eccfed….css net::ERR_ABORTED 404 (Not Found)

/assets/application-…c91577faaa25da.js:1 
GET https://katello.asymptotedevelopment.com/assets/application-c2207bb….js net::ERR_ABORTED 404 (Not Found)

And on a successful login, the same 2 errors are displayed.

Ha. First one is an apparently missing local CSS page, and the second is a missing JavaScript object. I was wondering if there was a CSS issue…

1 Like

Thanks for the errors. It looks like the css file is not being served for some reason, which is breaking your entire UI. These files I think are supposed to be bundled up as-is in the RPM. I’m not totally sure how the UI bits work, so I’ll reach out to some folks to see who can help out.

Some starter questions:

Are you running a vanilla Rocky setup? We don’t explicitly test on Rocky, but it theoretically shouldn’t be far off from Alma.

Is there any custom hardening? Could something potentially be blocking the webpack assets from being served? (no selinux denials?)

Were there any changes to the apache config? Is anything else on the server using apache?

Complete bone stock Apache setup. Nothing else on this host using Apache.
No changes to Rocky Linux, no hardening, and due to behind a reasonably secure firewall, I have disabled firewalld completely.

1 Like

Oops… meant to mention that I’ve been on Rocky Linux since early RL 8. Been running quite well.

1 Like

(1)Maybe its missing from /var/lib/foreman/public/assets, or not mapped correctly in (2)/var/lib/foreman/public/webpack/manifest.json or (3)/usr/share/foreman/public/assets/.sprockets-manifest-HASH.json
?
(4)Or just a simple cache issue where it just needs a hard refresh in the browswer

1 Like

Cache clears, cookie clears, multiple browsers and multiple hosts, most of which never had a browser session open to Katello. All appear to be exhibiting the same behavior.

1 Like

You may be on to something…

The CSS file download link is: https://katello.asymptotedevelopment.com/assets/application-6eccfed1ebb0fffe6f9c4bfb335bd6a69f46ee2bf1e26029ccbfb142baede317.css

But I don’t see it in the assets directory:

[jkalchik@katello assets]$ ll *.css
-rw-r–r–. 1 foreman foreman 442762 Mar 19 14:10 application-34cd77112d63ffea46d338e568f45f9e50b3241261eed7fe75a3f3dbe6ff2dda.css

I don’t see anything in the referenced manifest.json file that would indicate to me how to map such, there’s no application- sort of naming, nor do I see any UUID sort of values leaping out at me.

Looking at #3:

[jkalchik@katello assets]$ ls -la | grep json$
-rw-r–r–. 1 foreman foreman 368786 Nov 22 09:36 .sprockets-manifest-b0f011b6d976a25a3cc586b2087852b9.json
-rw-r–r–. 1 foreman foreman 365804 Mar 19 14:10 .sprockets-manifest-e34daa02109bc4bed13f535365bede67.json

The filename referenced in the CSS download error appears in .sprockets-manifest-b0f011b6d976a25a3cc586b2087852b9.json .

Am I supposed to have 2 of those manifests?

1 Like

And I may be on my way to answering my own question…

foreman-3.14.0-1.el9.noarch : Systems Management web application
Repo : foreman
Matched from:
Filename : /var/lib/foreman/public/assets/.sprockets-manifest-e34daa02109bc4bed13f535365bede67.json

However, /var/lib/foreman/public/assets/.sprockets-manifest-b0f011b6d976a25
a3cc586b2087852b9.json does not appear in any installed RPM.

SUCCESS

I stopped all services, moved the .sprockets* file that does not appear in the RPMs into /tmp, ran foreman-installer, and restarted services. I’m now getting the browser displays that I expect.

I really have no idea how this has happened. However, I did not format /var/lib/foreman (I’m an ancient UNIX nerd, and keep a lot of separate volumes,) when I reloaded the operating system.

Points to @MariaAga for pointing me in the right direction.

3 Likes

Glad this was solved, thanks @MariaAga !
And we appreciate the report back @jkalchik , it’ll be good to archive this one for the future.