Forums

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

Getting 502 error on reverse proxy JIRA

Brett Ludwig September 23, 2018

Proxy Error

The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request GET /.

Reason: Error reading from remote server

 

I think that has something to do with the vpoxy setup but I can't find any information about how to fix it. 

 

Vproxy files look like this:

SetEnv force-proxy-request-1.0 1
SetEnv proxy-nokeepalive 1
Timeout 2400
ProxyTimeout 2400
SSLProxyEngine On
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerName [server]
ProxyPreserveHost On
ProxyPass / https://localhost:8080/
ProxyPassReverse / https://localhost:8080/
Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile /etc/letsencrypt/live/[server]/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/[server]/privkey.pem
</VirtualHost>

 

 

<VirtualHost *:80>
ServerName [server]
ProxyPreserveHost Off
ProxyPass / http://localhost:8080/
ProxyPassReverse / http://localhost:8080/
</VirtualHost>

 

 

Trying to run the jira over https. 

2 answers

1 accepted

4 votes
Answer accepted
Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 25, 2018

This usually means that your Jira is not responding to the requests the proxy is making.  Start by checking that your Jira is up and running.  Ideally by trying localhost:8080 from the Jira server (A simple wget or curl of localhost:8080 should get you the html of the login page)

 However, I also notice your proxy is set up for full http to the Jira Tomcat - are you sure this is what you intended? 

A far more common set up is to have the proxy do all the ssl work, and then run Jira on plain http, but only accessible to the local machine and the proxy.  If that's what you are really aiming for, then your virtualhost *:443 is incorrect - the proxy and reverse should be going to the http://localhost, not https.

Brett Ludwig September 25, 2018

The HTTPS to HTTP fixed it, thanks.  I'm still struggling with getting an error that says I have mixed content so it blocks some HTTP requests, but I can open up another thread for that. 

Like sunny likes this
0 votes
Shannon S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 24, 2018

Hi there,

I would start by reviewing this thread:

Followed by this guide:

Let us know if you have any trouble!

Regards,

Shannon

Brett Ludwig September 24, 2018

Hi Shannon, I've read through both of those but haven't been able to get this working. 

 

This is what is appearing in my error.log:

 

204 [Mon Sep 24 09:29:51.604959 2018] [proxy_http:error] [pid 4170] (103)Software caused connection abort: [client [ip]:46968] AH01102: error reading status line from remote server localhost:8080, refe rer: https://[server]/secure/MyJiraHome.jspa

Shannon S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 5, 2018

Hi Brett,

From your comment to Nic it seems that you might have resolved the issue?

If you're getting a mixed content issue then you need to check the content on your Jira page and make sure you're only using https to serve images and other content.

If you still have trouble with the error after reviewing those pages feel free to raise a new thread.

Regards,

Shannon

Suggest an answer

Log in or Sign up to answer