It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

When using reverse proxy, gedget in dashboard failed to display

Hello Team,

 

We plan to use Nginx reverse proxy to forward 80 port traffic to Jira's port 8080. Configuration has been done. we can access Jira via 80 of most functions. but we found certain gedget in dashboard failed to display. When investigate, we found the gadget is still requestiong to 8080 port directly, and it is not allowed in browser, while main page use 80 port.

 

Any solution to fix it?

Thank you!

Ryan

1 answer

0 votes
Nic Brough Community Leader Jul 20, 2018

That sounds like the gadget has a bug, or has a configuration item that allows for a broken url.

Which gadget is it?

In my case,  currently, 2 gadget of 'Time to SLA' add on, which is SLA status Pie chat, TTS - Periodic Met vs Exceeded SlA,

Anther is build in Activity stream.

 

I see either below error under my dashboard,

We've detected a potential problem with JIRA's Dashboard configuration. Hide Close

Dashboard Diagnostics: Mismatched URL Port

JIRA is reporting that it is running on the port '8080', which does not match the hostname used to run these diagnostics, '80'. This is known to cause JIRA to construct URLs using the incorrect port, which will result in errors in the dashboard, among other issues.

The most common cause of this is the use of a reverse-proxy HTTP server (often Apache or IIS) in front of the application server running JIRA. While this configuration is supported, some additional setup might be necessary in order to ensure that JIRA detects the correct port.

The following articles describe the issue and the steps you should take to ensure that your web server and app server are configured correctly:

If you believe this diagnosis is in error, or you have any other questions, please contact Atlassian Support.

Detailed Error

Click here to learn more

Nic Brough Community Leader Jul 20, 2018

Ahh, so you've not configured the proxy correctly.  I am sorry, the question suggested it was just one gadget having a problem.

First, can you check the basics:

  • Your base url is set to the place the users will be using (i.e. the proxy front end, not Jira's 8080 based url)
  • The context is correct (if you are using one at all)
  • Jira's server.xml has the right proxyport, proxyname and scheme settings in the connector
  • The proxy has the matching context and proxypass settings

Hello Nic Brough,

 

Thank you for your reply,

 

In fact, I was following this guide https://confluence.atlassian.com/jirakb/integrating-jira-with-nginx-426115340.html to config the reverse proxy using nginx.

  • The base url is exactly the front URL of nginx http://sd.softtekchina.com
  • The context is  <Context path="" docBase="${catalina.home}/atlassian-jira" reloadable="false" useHttpOnly="true">
  • Jira server.xml reverse proxy section is set as:

<Connector port="8080" maxThreads="150" minSpareThreads="25" connectionTimeout="20000" enableLookups="false"

maxHttpHeaderSize="8192" protocol="HTTP/1.1" useBodyEncodingForURI="true" redirectPort="8443"

acceptCount="100" disableUploadTimeout="true" bindOnInit="false" scheme="http"

proxyName="sd.softtekchina.com" proxyPort="80"/>

  • The proxy is matched with server.xml

server {

listen 80;

server_name sd.softtekchina.com;

location / {

proxy_set_header X-Forwarded-Host $host;

proxy_set_header X-Forwarded-Server $host;

proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

proxy_pass http://sd.softtekchina.com:8080/;

client_max_body_size 10M;

}

}

 

The rest of functions work well, only some gadget.

 

Thank you

Ryan

Nic Brough Community Leader Jul 25, 2018

The only unusual thing I would worry about is that the proxypass should be pointing to where the Jira is actually running, not the proxy.  If they really are running on the same server, then try changing it to the ip address or localhost

Hello Nic,

 

Thank you for reply!

But It's still not work.

The thing is, when browser requesting gadget, the ones that not work, it's requesting http://ip:8080/plugins/serverlet/xxxx, which I'm afraid after apply reverse proxy, the address didn't get updated. individual request to http://ip:8080 should word. but it doesn't while be a part of body under the main page which is http://url on 80 port.

How can I get gadget address updated.

 

Thank you!

Ryan

Nic Brough Community Leader Jul 25, 2018

The gadgets take their url from the base url, there's nothing in the gadgets to change.

Hello Nic,

 

Then, something is not work as expected. base url is correct

jira-base-url.png

gadget request url as below

gadget-request.png

If I put 8080 into the url. them all works well. but it's not desired style, due to some end user can not access 8080 inside of company, due to their network limitation.

 

Thank you!

Ryan

That suggests your proxy is not directing the data correctly then.  The body of the request looks like it is being remapped somewhere, to the old url with 8080 in it

The proxy works as expected, any request goes to 80, direct to 8080. but the gadget request didn't go to 80. why it go to 8080 port. this is my question.

Nic Brough Community Leader Aug 01, 2018

The problem is that the pie chart will be making requests on the base url.  I've got the code (because I've hacked it for people a couple of times), and it simply does not use anything else when it goes out to the network.  That means there is something on your network changing that request.

The base url used to be http://x.x.x.x:8080/jira. but right now, it's http://domainName/ now.  I guessit might be cached old url in somewhere.

I'm sure our network doesn't have any special setting against those gadget. neither jira instant itself.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted in Jira Core

How to manage many similar workflows?

I have multiple projects that use variations of the same base workflow. The variations depend on the requirements of the project or issue type. The variations mostly come in the form of new statuses ...

948 views 7 0
Join discussion

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you