Forums

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

502 PROXY ERROR when trying to login confluence

saketh-stash
Contributor
May 16, 2017

I am devops engineer at my company, and I maintain the confluence, Jira here. We are facing the below error when we are trying to login to confluence.I added the proxytimeout value to 120 seconds and restarted the httpd but it still shows the same error. Hence, could anyone of you help me solving this issue?

Error on browser:
Proxy Error
The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request GET /dashboard.action.
Error reading from remote server

Error in httpd confluence ssl error log:
[proxy_http:error] [pid 20175] (70007)The timeout specified has expired: [client ipaddress] AH01102: error reading status line from remote server confluenceserver:8090

NOTE:

Confluence is running on the server,apache is running successfully
I did "curl confluenceservername", this also give the repsonse properly.

  • steps performed:
    restarted confluence
    restarted apache
    restarted mysql
    restarted crowd
    changed the port and restarted confluence,apache.

 

please someone help me

2 answers

4 votes
Edwin Kyalangalilwa
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.
May 16, 2017

Try adding this in your httpd.conf file

Timeout 2400
ProxyTimeout 2400
ProxyBadHeader Ignore
saketh-stash
Contributor
May 18, 2017

currently timeout is 60, should i write these lines under that or inside the virtual host

Edwin Kyalangalilwa
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.
May 18, 2017

Inside the virtual host

Like Amit Chakradeo likes this
leqo12
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 22, 2018

THANK YOU!!! I lost hours trying to make this work. I found nothing about the proxy timeout on confluence's installation guide. Worst thing is, that when the proxy times out (i.e. during DB initialization), it will corrupt the whole database and confluence becomes unusable with exceptions messages like:

com.atlassian.util.concurrent.LazyReference$InitializationException: java.lang.IllegalStateException: Spring Application context has not been set
 at com.atlassian.util.concurrent.LazyReference.getInterruptibly(LazyReference.java:149)
 at com.atlassian.util.concurrent.LazyReference.get(LazyReference.java:112)

There is a TON of people complaining about this problem and a solution is nowhere. Most of them talk about read/write permissions, other propose reinitializing the DB, which when you do from behind an apache proxy, will just fail again and mess up the DB again and you can start over

Again. Kudos to you my good sir.

Like kyona likes this
Deleted user April 10, 2018

This post was really helpful.I was also getting 

Spring Application context has not been set

 error due to this.

Like kyona likes this
vtamm
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 10, 2018

THANK YOU INDEED!!!

Like Michal, I had spent hours trying to figure out why my server was throwing a proxy error during the setupdbtype.action step of the Confluence setup. As Michal said it resulted in a corrupt database and unusable Confluence, which forced me to drop the database and reinstall Confluence over and over as I was troubleshooting the problem.

Finally when I found this page and your comments it dawned on me that it was a simple timeout error. I didn't even know it was possible to set Timeout and ProxyTimeout in the virtual host configuration, but after adding those lines in the virtual host and restarting Apache the installation worked like a charm.

Without Edwins suggestion and Michals comment (which corroborated my own experience) I would probably still be tearing my hair out over this, so many thanks to you guys! 🙏

0 votes
kyona
Contributor
May 20, 2019

Very helpful answer, thank you very much.

It is also possible to provide time out values using connectiontimeout and timeout parameters (in seconds) of ProxyPass setting:

<VirtualHost *:443>
...
ProxyPass /confluence http://localhost:8095/confluence connectiontimeout=300 timeout=300
ProxyPassReverse /confluence http://localhost:8095/confluence
...
</VirtualHost>

 

Spent tons of time trying everything from this

Confluence does not start due to Spring Application context has not been set
https://confluence.atlassian.com/confkb/confluence-does-not-start-due-to-spring-application-context-has-not-been-set-218278311.html

but nothing helped.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events