I have a fresh new installed instance of Jira and Confluence behind a nginx reverse proxy and I currently got stuck with an issue concerning the activity stream for Confluence on the Jira Dashboard (Default System Dashboard, but the issue persists even if I create a new Dashboard).
My issue is quite simple: Somehow URLs (currently only seen with attachments like images or photos) are written with a double slash (like this: https://www.example.com/confluence//download/attachments/00000/Harvey-persona?version=1&modificationDate=1508845833000&api=v2) and Confluence is returning a 500 server error. The error message shows up with a NullPointerException. Anyway, if I remove the doubled slash ( // -> / ) everything works as excepted. But I have no idea where to set this URL.
I already have checked the base URL of Jira and Confluence and there is no tailing slash at all.
Here is a screenshot of the chrome developer console:
The error message if I open one of those broken links is the following:
java.lang.NullPointerException
at com.atlassian.confluence.servlet.download.AttachmentDownload.getStreamForDownload(AttachmentDownload.java:105)
Does anyone have the same problem or have any idea how to fix it?
Lets see what you have in your nginx configuration.
Seems like proxy settings.
There's also a little bit of documentation on that here.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Unfortunately, it didn't. There was a caching problem which causes the images to load after a temporary change in the source.
Here is my nginx configuration but even if I include one of those snippets the URLs in the activity stream doesn't change. Also I am facing another weird issue: If I upload a new image to Confluence to force the listing in the activity feed, the double slashes are still there. But if I remove them (only in new uploaded images and only with the following configuration) the server loops while redirecting and I get a "ERR_TOO_MANY_REDIRECTS" error. If I remove the added snippet from your linked website, I can access the images with the URL without the double slashes.
server {
listen 443 ssl;
server_name www.example.com;
ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem;
ssl on;
ssl_session_cache builtin:1000 shared:SSL:10m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers HIGH:!aNULL:!eNULL:!EXPORT:!CAMELLIA:!DES:!MD5:!PSK:!RC4;
ssl_prefer_server_ciphers on;
client_max_body_size 100m;
access_log /var/log/nginx/example.com.log;
location /jira {
proxy_set_header Host $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_pass http://localhost:8080;
proxy_read_timeout 90;
}
location /confluence {
proxy_set_header Host $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 Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_pass http://localhost:8090;
proxy_read_timeout 90;
set $clean_uri $uri$is_args$args;
if ( $clean_uri != $request_uri ) {
rewrite ^/(.*) $scheme://$host/$1 permanent;
}
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Dominic, lets take this back to the basics from the Atlassian guide. I'm actually working on a test environment that I hope to have up in the next week or so that will use a similar setup.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.