Confluence activity stream

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:

Unbenannt1.png

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?

1 answer

Lets see what you have in your nginx configuration.

Seems like proxy settings.

There's also a little bit of documentation on that here.

The second link did the trick for me, thanks!

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;
}


}
}

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.

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

2,988 views 12 18
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot