Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Confluence activity stream

nick_dallmann
October 24, 2017

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

0 votes
Gregory Van Den Ham
Community Champion
October 24, 2017

Lets see what you have in your nginx configuration.

Seems like proxy settings.

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

nick_dallmann
October 25, 2017

The second link did the trick for me, thanks!

nick_dallmann
October 25, 2017

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


}
}

Gregory Van Den Ham
Community Champion
October 26, 2017

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.

John
November 5, 2019

This is an issue for me too - though we are not using a proxy...

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events