רק דף ריק מוצג בביקור ראשון

סיכום מבוסס בינה מלאכותית

A user, Der-Eddy, reports a blank page issue on their Discourse forum at first visit, which persists even after clearing the browser cache. The problem occurs despite disabling all plugins and enabling safe mode. After further investigation, Der-Eddy discovers that the issue is related to Nginx proxy cache permissions. The Nginx worker runs as www-data, but the proxy_temp directory is owned by nginx, causing permission errors. After adjusting the folder permissions, the issue appears resolved. pfaffman and fefrei contribute by suggesting safe mode and confirming the need to rebuild the app after plugin changes.

Since some months I have this weird problem:
At the first visit per day at my forum, it will only show a blank page with the background color of the current theme
this also happens if you clear my browser cache (i.e. via CTRL + F5)
after a site reload, the forum will show just fine

the browser console will show this:


(this is a screenshot after I commented every plugin out and rebuild discourse)

Some informations about my installation:
I’m always running the latest Beta version of Discourse via the recommended Docker Install Guide
Using this templates:

templates:
  - "templates/postgres.template.yml"
  - "templates/redis.template.yml"
  - "templates/web.template.yml"
  - "templates/web.ratelimited.template.yml"
  #- "templates/web.ssl.template.yml"
  #- "templates/web.letsencrypt.ssl.template.yml"
  - "templates/web.socketed.template.yml"
  - "templates/cloudflare.template.yml"

and with this plugins:

  • Docker Manager
  • Spoiler Alert
  • Staff Notes
  • Solved
  • Whos Online
  • Steam Login
  • Discourse Signatures
  • Discourse Cakeday
  • Backup to Dropbox
  • Discourse Data Explorer
  • Discourse Assign

I’m also using a Nginx Webserver on top of the Docker Image to proxy_pass Discourse:

  location / {
    proxy_pass http://unix:/var/discourse/shared/standalone/nginx.http.sock:;
    proxy_set_header Host $http_host;
    proxy_http_version 1.1;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto https;
  }

Our forum can be found at: https://www.kokoro-ko.de/

I’d start by disabling plugins. Try safe mode.

I enabled safe mode and now this happens:

I also already commented every plugin out and the same happens, so I guess it has something to do with my Nginx Proxy Pass?

Did you run ./launcher rebuild app after commenting out the plugins?

I think I found the problem, since safe-mode still shows only a blank page I checked my Nginx logs more carefully and found this:

2017/06/03 14:38:39 [crit] 21647#21647: *45150 open() "/var/cache/nginx/proxy_temp/5/44/0000002445" failed (13: Permission denied) while reading upstream, client: 84.152.193.65, server: www.kokoro-ko.de, request: "GET /assets/vendor-199fce5a9e9895329b51b04605f1f5061951acb488baa6b2ea2fc2ae36def529.js HTTP/2.0", upstream: "http://unix:/var/discourse/shared/standalone/nginx.http.sock:/assets/vendor-199fce5a9e9895329b51b04605f1f5061951acb488baa6b2ea2fc2ae36def529.js", host: "www.kokoro-ko.de", referrer: "https://www.kokoro-ko.de/"

So I checked the folder permissions for /var/cache/nginx/proxy_temp/:

drwx------ 90 www-data www-data 4096 Jun  3 14:26 0
drwx------  3 nginx    nginx    4096 Jan  8 01:44 1
drwx------  3 nginx    nginx    4096 Jan  8 01:44 2
drwx------  3 nginx    nginx    4096 Jan  8 01:44 3
drwx------  3 nginx    nginx    4096 Jan  8 01:44 4
drwx------  3 nginx    nginx    4096 Jan  8 01:44 5
drwx------ 92 www-data www-data 4096 Mai 27 23:12 6
drwx------ 92 www-data www-data 4096 Mai 25 11:04 7
drwx------ 88 www-data www-data 4096 Jun  3 14:26 8
drwx------ 88 www-data www-data 4096 Jun  3 14:26 9

While my Nginx worker uses the www-data account
I adjusted the folder permissions and now it seems to work like it should

I need further testing for this but I didn’t know about safe-mode before which leaded me to the real issue!