502 PROXY ERROR when trying to login confluence

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

1 answer

Try adding this in your httpd.conf file

Timeout 2400
ProxyTimeout 2400
ProxyBadHeader Ignore

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

Inside the virtual host

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.

This post was really helpful.I was also getting 

Spring Application context has not been set

 error due to this.

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! 🙏

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Kesha Thillainayagam
Posted Apr 13, 2018 in Confluence

We want to hear how your non-technical teams are using Confluence!

Hi Community! Kesha (kay-sha) from the Confluence marketing team here! Can you share stories with us on how your non-technical (think Marketing, Sales, HR, legal, etc.) teams are using Confluen...

370 views 20 10
Join discussion

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you