Forums

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

Jira + Apache error = Error 503 service

Marcin Beczynski
Contributor
July 16, 2018

Hey,
I try to set up Jira on a subdomain using a reverse proxy, using following KB https://confluence.atlassian.com/kb/proxying-atlassian-server-applications-with-apache-http-server-mod_proxy_http-806032611.html

 

but stuck with error 503 do you know what could be a root cause of that ??

from log, I can discover an error with connection refuse 

 

bellow my setting 

 

org.apache.http.conn.HttpHostConnectException: Connect to 167.99.142.104:8080 [/167.99.142.104] failed: Connection refused
at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:159)
at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:373)
at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:381)
at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:237)
at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:185)
at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89)
at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:111)
at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:108)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:56)
at com.atlassian.troubleshooting.jira.healthcheck.support.GadgetFeedUrlHealthCheck.check(GadgetFeedUrlHealthCheck.java:56)
at com.atlassian.troubleshooting.healthcheck.impl.PluginSuppliedSupportHealthCheck.check(PluginSuppliedSupportHealthCheck.java:49)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at org.apache.http.conn.socket.PlainConnectionSocketFactory.connectSocket(PlainConnectionSocketFactory.java:75)
at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:142)
... 16 more


<VirtualHost jira.example.com:80>
ServerName www.jira.example.com
ServerAlias jira.example.com
DocumentRoot /opt/atlassian/jira
ErrorLog /var/log/httpd/jira_error.log
CustomLog /var/log/httpd/jira_requests.log combinedi
# otherwise act as a proxy to jira which is running on port 8080
#<Proxy *>
# Order deny,allow
# Allow from all
#</Proxy>
ProxyRequests Off
ProxyPreserveHost Off
#ProxyRequests Off
#ProxyVia Off

<Proxy *>
Require all granted
</Proxy>
ProxyPass / http://jira.example.com:8080/
ProxyPassReverse / http://jira.example.com:8080/
</VirtualHost>

 


<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="jira.example.com" proxyPort="80"/>

 

2 answers

0 votes
Mona Sood October 5, 2018

Hi Daniel,

I am facing similar kind of issue , but I have Jira installed on EC2 behind ELB(classic load balancer). I have tried many ways but unfortunately no result.

I am facing two issues:

1. gadget feed dashboard issue

2. hipchat-jira connectivity with connection refuse.

Note: i have moved my instance from http to https and getting all these error.

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

Hey Mona!

I'd suggest using a straight reverse proxy instead of ELB if you're not in need of a load balancer (for instance, if you were using Jira Data Center).

But more importantly - let's open a new question for you! It's easier if we can troubleshoot in a dedicated question/answer post focused just on you. You can use the "Ask the community +" button up in the top banner to create a new question.

Thanks!
Daniel

0 votes
Daniel Eads
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 18, 2018

Hi Ivan,

I noticed you're running Jira on a publicly-addressed server (open to the internet). For security purposes, please consider using HTTPS on your reverse proxy and disabling external access to 8080.

We have a document for setting up nginx as a reverse proxy - in my opinion it's easier to configure nginx with HTTPS than Apache. I think you'll be pleasantly surprised at how much simpler the nginx configuration file is. A few things to keep in mind when setting up HTTPS:

  • You can get a free SSL certificate from Let's Encrypt if you're not interested in going through a paid Certificate Authority
  • The server.xml needs to have proxyPort="443" and scheme="https" when using https
  • Jira's base URL will need to be updated to include https://

The article mentions this, but using Mozilla's TLS configuration tool is also a great way to get secure and moving quickly when setting up a reverse proxy with HTTPS.

Cheers,
Daniel

Suggest an answer

Log in or Sign up to answer