Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-72063

Jenkins UI does not display css styles and stuck after clicking buttons

    • Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Blocker Blocker
    • core
    • Jenkins Versions: 2.414.1 and 2.414.2
      Plugins: default new installation
      Operating System:
      Red Hat Enterprise Linux release 8.3 (Ootpa)
      WebBroser: Internet Explorer on Client
      Java: java-11-openjdk-devel
      Nginx: 1.14.1

      Jenkins stuck after clicking on creating a new user.

      Then I decided to cancel that and what I saw in landing page is that css styles did not load properly. See attached screenshot.

      Below is my /etc/nginx/conf.d/jenkins.conf

      ***********************************************************

      upstream jenkins

      {   keepalive 32;   server 127.0.0.1:8080 fail_timeout=0; }

      server

      {   listen 80;   server_name 127.0.0.1 jenkins01.devops.investran.live;   return 301 https://$host$request_uri; }
      1. Required for Jenkins websocket agents
        map $http_upgrade $connection_upgrade {   default upgrade;   '' close; }

      server

      {   # All your server and TLS/certificate settings are up here somewhere   # SSL Configuration   listen 443 ssl;   server_name jenkins01.devops.investran.live;   ssl_certificate      /etc/ssl/jenkins01devopsinvestranlive.cer;   ssl_certificate_key  /etc/ssl/jenkins01devopsinvestranlive.prv;   ssl_session_timeout  5m;   ssl_session_cache shared:SSL:50m;   access_log            /var/log/nginx/jenkins.access.log;   error_log             /var/log/nginx/jenkins.error.log;   # pass through headers from Jenkins that Nginx considers invalid   ignore_invalid_headers off;   root            /var/cache/jenkins/war/;   location ~ "^/static/[0-9a-fA-F]\{8}

      \/(.*)$"

      {     # rewrite all static files into requests to the root     # E.g /static/12345678/css/something.css will become /css/something.css     rewrite "^/static/[0-9a-fA-F]\{8}

      \/(.*)" /$1 last;
        }

        location /userContent {
          # have nginx handle all the static requests to userContent folder
          # note : This is the $JENKINS_HOME dir
          root /var/lib/jenkins/;
          if (!-f $request_filename)

      {     # this file does not exist, might be a directory or a /**view** url     rewrite (.*) /$1 last;     break;     }

          sendfile on;
        }

        location /

      {     # Convert inbound WAN requests for https://domain.tld/jenkins/ to     # local network requests for http://localhost:8080/jenkins/     proxy_pass http://127.0.0.1:8080/;     # Rewrite HTTPS requests from WAN to HTTP requests on LAN     proxy_redirect http:// https://;     # The following settings from https://wiki.jenkins-ci.org/display/JENKINS/Running+Hudson+behind+Nginx     sendfile off;     proxy_set_header   Host             $http_host;     proxy_set_header   X-Real-IP        $remote_addr;     proxy_set_header   X-Forwarded-For  $proxy_add_x_forwarded_for;     proxy_set_header   X-Forwarded-Proto $scheme;     proxy_set_header   X-Forwarded-Port 443;     proxy_max_temp_file_size 0;     # This is the maximum upload size     client_max_body_size       10m;     client_body_buffer_size    128k;     proxy_connect_timeout      90;     proxy_send_timeout         90;     proxy_read_timeout         90;     proxy_temp_file_write_size 64k;     # Required for new HTTP-based CLI     proxy_http_version 1.1;     proxy_request_buffering off;     proxy_buffering off; # Required for HTTP-based CLI to work over SSL     # Required for Jenkins websocket agents     proxy_set_header   Connection        $connection_upgrade;     proxy_set_header   Upgrade           $http_upgrade;     }

      }

      ***********************************************************

      Also I had to disable CSRF because of crumb issue in systemd:

      /etc/systemd/system/jenkins.service.d/override.conf

      *********************************************************

      [Service]

      Environment="JAVA_OPTS=-Djava.awt.headless=true -Dhudson.security.csrf.GlobalCrumbIssuerConfiguration.DISABLE_CSRF_PROTECTION=true"

      *********************************************************

      Also, I notice I cannot change the config.xml in JENKINS_HOME: /var/lib/jenkins
      I do:

      sudo systemctl stop jenkins

      Copy new file by replacing ( I wanted to disable security)

      sudo systemctl start jenkins

      And I see my changes did not persist. They were reverted.

      Please assist with that as well.

          [JENKINS-72063] Jenkins UI does not display css styles and stuck after clicking buttons

          Ronald Barrios created issue -
          Ronald Barrios made changes -
          Attachment New: jenkins.conf.txt [ 61172 ]
          Ronald Barrios made changes -
          Comment [ Jenkins.conf did not display properly. I'm pasting it again

           
          upstream jenkins {
           keepalive 32;
           server 127.0.0.1:8080 fail_timeout=0;
          }

          server {
           listen 80;
           server_name 127.0.0.1 jenkins01.devops.investran.live;
           return 301 https://$host$request_uri;
          }

          # Required for Jenkins websocket agents
          map $http_upgrade $connection_upgrade {
           default upgrade;
           '' close;
          }

          server {
           # All your server and TLS/certificate settings are up here somewhere
           # SSL Configuration
           listen 443 ssl;
           server_name jenkins01.devops.investran.live;
           ssl_certificate /etc/ssl/jenkins01devopsinvestranlive.cer;
           ssl_certificate_key /etc/ssl/jenkins01devopsinvestranlive.prv;
           ssl_session_timeout 5m;
           ssl_session_cache shared:SSL:50m;
           access_log /var/log/nginx/jenkins.access.log;
           error_log /var/log/nginx/jenkins.error.log;

           # pass through headers from Jenkins that Nginx considers invalid
           ignore_invalid_headers off;
           root /var/cache/jenkins/war/;

           location ~ "^/static/[0-9a-fA-F]\{8}\/(.*)$" {
           # rewrite all static files into requests to the root
           # E.g /static/12345678/css/something.css will become /css/something.css
           rewrite "^/static/[0-9a-fA-F]\{8}\/(.*)" /$1 last;
           }

           location /userContent {
           # have nginx handle all the static requests to userContent folder
           # note : This is the $JENKINS_HOME dir
           root /var/lib/jenkins/;
           if (!-f $request_filename){
           # this file does not exist, might be a directory or a /**view** url
           rewrite (.*) /$1 last;
           break;
           }
           sendfile on;
           }

           location / {

           # Convert inbound WAN requests for https://domain.tld/jenkins/ to
           # local network requests for http://localhost:8080/jenkins/
           proxy_pass http://127.0.0.1:8080/;

           # Rewrite HTTPS requests from WAN to HTTP requests on LAN
           proxy_redirect http:// https://;

           # The following settings from https://wiki.jenkins-ci.org/display/JENKINS/Running+Hudson+behind+Nginx
           sendfile off;

           proxy_set_header Host $http_host;
           proxy_set_header X-Real-IP $remote_addr;
           proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
           proxy_set_header X-Forwarded-Proto $scheme;
           proxy_set_header X-Forwarded-Port 443;
           proxy_max_temp_file_size 0;

           # This is the maximum upload size
           client_max_body_size 10m;
           client_body_buffer_size 128k;

           proxy_connect_timeout 90;
           proxy_send_timeout 90;
           proxy_read_timeout 90;

           proxy_temp_file_write_size 64k;

           # Required for new HTTP-based CLI
           proxy_http_version 1.1;
           proxy_request_buffering off;
           proxy_buffering off; # Required for HTTP-based CLI to work over SSL

           # Required for Jenkins websocket agents
           proxy_set_header Connection $connection_upgrade;
           proxy_set_header Upgrade $http_upgrade;
           }
          } ]

          Markus Winter added a comment -

          Internet explorer is not a supported browser for Jenkins. See https://www.jenkins.io/doc/administration/requirements/web-browsers/

          Markus Winter added a comment - Internet explorer is not a supported browser for Jenkins. See https://www.jenkins.io/doc/administration/requirements/web-browsers/
          Mark Waite made changes -
          Sprint Original: Bundles management UI Sprint [ 1 ]
          Mark Waite made changes -
          Epic Link Original: JENKINS-35755 [ 171716 ]
          Mark Waite made changes -
          Mark Waite made changes -

          Mark Waite added a comment -

          The Jenkins issue tracker is used to track bugs and enhancement requests. This looks like a request for question and answer style help with a configuration issue. Please use other locations for question and answer, like https://community.jenkins.io or the Jenkins chat channels listed at https://www.jenkins.io/chat

          Mark Waite added a comment - The Jenkins issue tracker is used to track bugs and enhancement requests. This looks like a request for question and answer style help with a configuration issue. Please use other locations for question and answer, like https://community.jenkins.io or the Jenkins chat channels listed at https://www.jenkins.io/chat
          Mark Waite made changes -
          Resolution New: Not A Defect [ 7 ]
          Status Original: Open [ 1 ] New: Closed [ 6 ]

            Unassigned Unassigned
            ronaldegmar Ronald Barrios
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: