Proxy Error the proxy server received an invalid response from an upstream server

0 votes

I configured Haproxy server in my system, but I am getting this below error from my Haproxy server.

Proxy Error the proxy server received an invalid response from an upstream server.

How can I solve this error?

Apr 22, 2020 in Linux Administration by akhtar
• 38,260 points
4,009 views

1 answer to this question.

0 votes

Hi@akhtar,

I think you did not configure your haproxy.conf file. So try to configure backend part in this file properly.

frontend  main *:5000
    acl url_static       path_beg       -i /static /images /javascript /stylesheets
    acl url_static       path_end       -i .jpg .gif .png .css .js

    use_backend static          if url_static
    default_backend             app
#---------------------------------------------------------------------
# static backend for serving up images, stylesheets and such
#---------------------------------------------------------------------
backend static
    balance     roundrobin
    server      static 127.0.0.1:4331 check
#---------------------------------------------------------------------
# round robin balancing between the various backends
#---------------------------------------------------------------------
backend app
    balance     roundrobin
    server  app1 127.0.0.1:5001 check
    server  app2 127.0.0.1:5002 check
    server  app3 127.0.0.1:5003 check
    server  app4 127.0.0.1:5004 check


Here you have to set your ip properly.

answered Apr 22, 2020 by MD
• 95,460 points

Related Questions In Linux Administration

0 votes
0 answers

Error while enabling the official puppet

I'm trying to enable the official puppet lab ...READ MORE

Feb 27, 2019 in Linux Administration by mytamhuyet
• 120 points

edited Apr 10, 2019 by mytamhuyet 740 views
0 votes
1 answer

Downloading file using SSH from a server without web access

Run this command in  your terminal: scp your_username@remotehost.edu:foobar.txt ...READ MORE

answered Mar 5, 2019 in Linux Administration by ajs3033
• 7,300 points
1,049 views
0 votes
1 answer

Error saying " Invalid operation uninstall" on sudo apt uninstall apache2

Try this: sudo apt-get cpufrequtils is missing a mandatory ...READ MORE

answered May 14, 2019 in Linux Administration by Yesha
14,825 views
0 votes
1 answer
0 votes
1 answer

How do I set variable if a specific package version is installed in CFEngine?

Here is what you can do.Just use packagesmatching to ...READ MORE

answered Jul 12, 2018 in Other DevOps Questions by Atul
• 10,240 points
1,180 views
0 votes
2 answers

Install postgreSQL on Ubuntu

Follow the below commands to install PostgreSQL (PSQL) ...READ MORE

answered Nov 12, 2020 in Database by Prachi
• 140 points
1,266 views
0 votes
1 answer

Access progrs prompt without switching accounts

Use the following to get the postgres prompt ...READ MORE

answered Mar 22, 2019 in Database by Mahi
843 views
0 votes
1 answer

How to run GUI program in SSH server from remote desktop?

Hi@akhtar, First you have to configure SSH server ...READ MORE

answered Mar 31, 2020 in Linux Administration by MD
• 95,460 points
4,456 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP