Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

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

Jira8 behind Nginx proxy - gadget.common.error.500

image.png

 

catalina.out

17-Feb-2019 15:40:50.258 WARNING [http-nio-8082-exec-4] com.sun.jersey.spi.container.servlet.WebComponent.filterFormParameters A servlet request, to the URI https://mydomain.com/rest/activity-stream/1.0/preferences?_=1550418046548, contains form parameters in the request body but the request body has been consumed by the servlet or a servlet filter accessing the request parameters. Only resource methods using @FormParam will work as expected. Resource methods consuming the request body by other means will not work as expected.

 

 

 

1 answer

0 votes
Shannon Atlassian Team Feb 19, 2019

Hello,

Your base URL in Jira needs to have the URL that the proxy listens to. Could you confirm that? 

Proxies. If you are running behind a proxy, ensure that the proxy name matches the base URL.  For example: proxyName="foobar.com" proxyPort="443" scheme="https". This will make sure we are passing the information correctly.

In addition, I would recommend you review the following article to resolve the issue:

Let me know if you have any trouble.

Shannon

Hi Shannon,

I tried and found a problem when using a subdomain has number character, for example, jira8.foobar.com

<Connector port="8082" relaxedPathChars="[]|" relaxedQueryChars="[]|{}^&#x5c;&#x60;&quot;&lt;&gt;"
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="jira8.foobar.com" proxyPort="443"/>

if only use the letter in a subdomain, for example, jira.foobar.com then this is ok

Do you have any way to fix it?

Shannon Atlassian Team Mar 01, 2019

Thanh,

Can you confirm then that jira8.foobar.com matches your base URL as well? It needs to match exactly.

Regards,
Shannon

Yes, it matches exactly, I tried many times,

image.pngimage.png

Shannon Atlassian Team Mar 04, 2019

Thank you for confirming. 

Next step would be for us to take a look at the the conf file for your NGINX server that's creating the proxy.

Could you please share that information? You can block out any sensitive details.

Regards,

Shannon

yes of course, 

upstream jirastreamv8https {
server x.x.x.x:8082;
}

server {

listen jira8.foobar.com:80;
server_name jira8.foobar.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://jirastreamv8https;
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
proxy_redirect off;

client_max_body_size 10M;

}

return 301 https://$server_name$request_uri;

}


server {

listen jira8.foobar.com:443 ssl;
server_name jira8.foobar.com;

ssl on;
ssl_certificate /etc/letsencrypt/live/foobar.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/foobar.com/privkey.pem;

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://jirastreamv8https;
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
proxy_redirect off;

client_max_body_size 10M;

}

}

Thanh,

Thank you!

So it looks like the following section is what's causing your gadget error:

Screen Shot 2019-03-06 at 2.48.23 PM.png

You want to remove the location block and redirect to serve on 80. Essentially you're allowing requests to be shared at http:// and Jira is only writing URLs at https://. This is two separate URLs technically, so it's causing the issue.

Give that a try and let me know if you have any trouble.

Regards,

Shannon

i have the same issue. i did what you suggested but it still does not work. any help?

Shannon Atlassian Team Apr 04, 2019

Hamza,

Thank you for reaching out! This was very particular to Thanh's configuration. The case is that you might also have a misconfiguration in your conf file.

I would recommend that you either raise a Support Request or a new question here on Community and share the details of your conf file, and we can have a look for you.

Regards,

Shannon

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Jira

Admins, notify your Jira instance of system-wide changes with the new admin announcement banner

Hi All! We’re excited to share the launch of an announcement banner that lets Jira site administrators communicate directly to their users across their  Jira Cloud instance.  ...

449 views 14 15
Read article

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