Sidekiq WEB UI has blank CSS and JS files

277 views
Skip to first unread message

Cyril Duchon-Doris

unread,
Jun 5, 2020, 7:33:12 AM6/5/20
to Sidekiq
Hello, 
After a production release, I had the surprise to discover that my Sidekiq UI was completely messed up, upon closer inspection it turns out the CSS and JS files for sidekiq were missing, so I end up only with the raw HTML. The asset files do exist, but they are empty. For instance, the URL to /sidekiq/stylesheets/bootstrap.css returns an empty file (with a 200 OK)

There does not seem to be any relevant gem updates in the version that broke the CS/JS since our deployment to a staging environment with the same version is not broken and everything works as intended.

Do you have any ideas that might help me debug the problem ? How are the JS/CSS files served from the sidekiq engine ? Is there a way for me to check if the file is really in there empty ?

Cyril

Gem version : sidekiq-5.1.3

Cyril Duchon-Doris

unread,
Jun 5, 2020, 7:53:24 AM6/5/20
to Sidekiq
Some additional info : when I SSH into the server I can find the CSS files

find /websites/xx/shared/bundle/ruby/2.6.0/gems/sidekiq-5.1.3 -name "*.css"
/websites/xx/shared/bundle/ruby/2.6.0/gems/sidekiq-5.1.3/web/assets/stylesheets/application-rtl.css
/websites/xx/shared/bundle/ruby/2.6.0/gems/sidekiq-5.1.3/web/assets/stylesheets/bootstrap-rtl.min.css
/websites/xx/shared/bundle/ruby/2.6.0/gems/sidekiq-5.1.3/web/assets/stylesheets/bootstrap.css
/websites/xx/shared/bundle/ruby/2.6.0/gems/sidekiq-5.1.3/web/assets/stylesheets/application.css

And they appear to have the appropriate content. Yet the file served are empty.

I am using nginx + passenger.
Phusion Passenger 6.0.2
Ruby 2.6.3

My nginx file (which has not changed so far and I don't think the pb comes from there)

server {
  listen 80 default;
  server_name
  ;

  root /websites/xxx/current/public;
  error_page 500 502 503 504 /500.html;

  passenger_enabled on;
  passenger_app_env production;
  passenger_min_instances 2;

  passenger_set_header HOST $translated_host;

  client_max_body_size 50M;
  keepalive_timeout 10;
}

Mike Perham

unread,
Jun 5, 2020, 9:47:48 AM6/5/20
to sid...@googlegroups.com
Have you read the Problems and Troubleshooting wiki page?

On Jun 5, 2020, at 04:53, Cyril Duchon-Doris <cy...@myjobglasses.com> wrote:


--
You received this message because you are subscribed to the Google Groups "Sidekiq" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sidekiq+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sidekiq/ffcdfc29-2a3a-45af-9732-d751eaa9182eo%40googlegroups.com.

Cyril Duchon-Doris

unread,
Jun 17, 2020, 9:51:39 AM6/17/20
to Sidekiq
If you are referring to https://github.com/mperham/sidekiq/wiki/Problems-and-Troubleshooting yes this is the page that hints to go to the google groupe.

It turns out the problem most likely came from a bad deployment, although we were not able to figure out exactly what went wrong. The problem persisted even after several deployments as the blank file was somehow cached by my browser, and I had to do a hard refresh (multiple normal refresh did not work).

Sorry for the inconvenience

Message has been deleted

Cyril Duchon-Doris

unread,
Feb 18, 2021, 9:42:33 AM2/18/21
to Sidekiq
Sorry, the problem came back, we have blank CSS and JS again

I've isolated a single machine behind our load with a manual curl command

```
curl --resolve 'www.example.com:80:127.0.0.1' \
--header "X-Forwarded-Proto: https" \
--header "Host: www.example.com" \
-H 'cookie: XXX \
```

That still return an empty body

I've seen posts regarding the X-Sendfile header that may be causing problems, but I'm not too sure what to think about it, as even setting it to "nil" did not change the problem

Mike Perham

unread,
Feb 18, 2021, 10:10:20 AM2/18/21
to sid...@googlegroups.com
There is a section on nginX proxying in the Monitoring wiki page which describes the solution.

On Thu, Feb 18, 2021 at 06:41 Cyril Duchon-Doris <cy...@myjobglasses.com> wrote:
Sorry, the problem came back, we have blank CSS and JS again

I've isolated a single machine behind our load with a manual curl command

```
curl --resolve 'www.myjobglasses.com:80:127.0.0.1' \
--header "X-Forwarded-Proto: https" \
--header "Host: www.example.com" \
-H 'cookie: XXX \
```

That still return an empty body

I've seen posts regarding the X-Sendfile header that may be causing problems, but I'm not too sure what to think about it, as even setting it to "nil" did not change the problem
On Wednesday, June 17, 2020 at 3:51:39 PM UTC+2 Cyril Duchon-Doris wrote:
--
Mike Perham, CEO — Contributed Systems
Reply all
Reply to author
Forward
0 new messages