After an upgrade to 8.40 I had to renew my license and I stumbled upon an error on the license renew page (/secure/ConfirmNewInstallationWithOldLicense!default.jspa)
Static asset files failed to load (meta-all.js, jquery-min.js, metal-all.css) with a status (failed) in Chrome/Brave. In Firefox HTTP status was still 200, but Firefox said that files failed to load.
These are the relevant sections of the config files:
<Connector port="8080"
relaxedPathChars="[]|"
relaxedQueryChars="[]|{}^\`"<>"
maxThreads="150"
minSpareThreads="25"
connectionTimeout="20000"
enableLookups="false"
maxHttpHeaderSize="8192"
protocol="HTTP/1.1"
useBodyEncodingForURI="true"
redirectPort="8443"
acceptCount="100"
disableUploadTimeout="true"
bindOnInit="false"
secure="true" scheme="https"
proxyName="jira.lubica.net"
proxyPort="443"/>
upstream jira {
server 127.0.0.1:8080 fail_timeout=0;
}
server {
listen 80;
server_name jira.lubica.net;
location / {
proxy_set_header Host $host:$server_port;
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_pass http://jira;
client_max_body_size 10M;
}
access_log /var/log/nginx/jira/access.log;
error_log /var/log/nginx/jira/error.log;
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/jira.lubica.net/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/jira.lubica.net/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
resolver 8.8.8.8;
ssl_stapling on;
ssl_session_cache shared:SSL:10m;
ssl_trusted_certificate /etc/letsencrypt/live/jira.lubica.net/fullchain.pem;
ssl_dhparam /etc/nginx/dhparam.pem;
if ($scheme != "https") {
return 301 https://$host$request_uri;
} # managed by Certbot
}
If I access the files directly, nginx will serve them without any problems. I get these errors only when files are loaded subsequently when accessing ConfirmNewInstallationWithOldLicense!default.jspa
Nginx logs an error about prematurely closed connection:
2019/09/19 10:39:04 [error] 19220#19220: *7 upstream prematurely closed connection while reading upstream, client: xxx.xxx.xxx.xxx, server: jira.lubica.net, request: "GET /static-assets/jquery-min.js HTTP/2.0", upstream: "http://127.0.0.1:8080/static-assets/jquery-min.js", host: "jira.lubica.net", referrer: "https://jira.lubica.net/secure/ConfirmNewInstallationWithOldLicense!default.jspa"
I tried various different configurations and settings and nothing really works and I can't even pinpoint the problem, if it is with nginx configuration or with Jira.
I am running nginx 1.14.0 on Ubuntu 18.04.3 and everything is up to date.
Ideas?