Questions tagged [502]

HTTP Error 502 Bad gateway

Filter by
Sorted by
Tagged with
0 votes
1 answer
120 views

HAProxy always returns 502 Bad Gateway but the backend responds

I have a HAProxy 2.8.4 which is used to proxy multiple HTTPS services on multiple URL paths and several different backends, and also a PostgreSQL cluster over TCP. This is the full haproxy -vvv output:...
Gábor Major's user avatar
0 votes
0 answers
100 views

Nginx 502 Bad Gateway DotNet App

I am using NopCommerce 4.60.5 , with Ubuntu 23 , Nginx as Reverse proxy to upstream .net app. Site is up and running with some minor issues that im working on. however, issue starts when I have ...
tonysar's user avatar
0 votes
0 answers
474 views

Configuring Nginx Reverse Proxy: Resolving Bad Gateway Issue

I am attempting to set up an Nginx reverse proxy that should be accessible from another server. The purpose is to redirect requests to an upstream test environment. The connection necessitates a ...
Radoslav Enev's user avatar
0 votes
1 answer
604 views

nginx error logging generates upstream sent too big header while reading response header from upstream

When i add error_log('what ever') in my php scripts and there are to many in one script, it generates a 502 error with "upstream sent too big header while reading response header from upstream&...
user3166817's user avatar
0 votes
0 answers
236 views

kubernetes responding with 502

I have a cluster running 2 deployments and an ingress (caddy). One of my deployments is working fine, its a golang image listening on 80. The other deployment is a php-fpm image listening on 9000, ...
wcb's user avatar
  • 1
1 vote
1 answer
581 views

Google AppEngine - 502 Bad Gateway

I'm running a Python Flask endpoint locally and it all works fine, but when I deploy it in GCP AppEngine, I get a 502 Bad Gateway. It seems to fail at about 200 reads of 2290 bytes each. I've ...
Irfaan Sulaiman's user avatar
0 votes
1 answer
275 views

Nginx Bad gateway error code 502 archivematica

hey everyone I am a new to Linux. I have installed archivematica on my VM using VMware Workstation. I have followed the guide below, but when i try to access this machine using its IP address which is ...
Azizesawi's user avatar
4 votes
0 answers
4k views

NGINX 502 Bad Gateway error inside Docker container

I haven't had any issues with my Docker container or NGINX until today where I am getting a random unexpected 502 Bad Gateway error even though I have made no changes to my configuration files, Docker ...
CrashV24232's user avatar
0 votes
0 answers
2k views

Error 502: Deploy Django application with Gunicorn and Nginx

I have developed a web application with Django and I am trying to publish it in a virtual machine created with Azure. To do that I'm using the following software stack: Ubuntu (20.04) Django (3.0.7) ...
El_Merendero's user avatar
0 votes
0 answers
11k views

nginx always serves 502 Bad Gateway

I am trying to run a proxy with Nginx and I implemented the following tutorial as preparation. I did exactly as instructed here and I was served a 502 Bad Gateway result when I entered http://develop....
Mnemosyne's user avatar
  • 131
1 vote
0 answers
162 views

Why would TLS version in one config cause another to break?

I have an Apache proxy that has several VHosts. Some of these are legacy configs that were before my time. Long story short, I removed some .crt files on the server that had expired, and forgot to ...
DevOpsSauce's user avatar
0 votes
1 answer
3k views

AWS Load Balancer 502 Bad Gateway

I have multiple node web servers hosted on EC2 with a Load Balancer, and some users are getting a 502 even before the request reaches the server. I don't have the logs of those requests inside the ...
soltex's user avatar
  • 101
1 vote
1 answer
1k views

Installing Matomo on Nginx returns 502 Bad Gateway Error

I'm in the process of installing the Matomo Analytics platform on my Debian 10 server, running Nginx and using the Cloudflare DNS and CDN. Unfortunately I get a 502 Bad Gateway error when trying to ...
Andy Sukowski-Bang's user avatar
0 votes
0 answers
246 views

apache web server 502 error proxy error when direct to an image url

Good day, I have an Apache web server, and I configure ProxyPass it to my application server. Everything is work unless the connection to the image in application server. I will hit 502 for the ...
Panadol Chong's user avatar
0 votes
2 answers
3k views

nginx proxy server 502 Bad Gateway

First of all, forgive me if I say something stupid, I have no experience with server administration but I've been assigned this task. For our webapp we want to set up a proxy server so that clients ...
dabadaba's user avatar
  • 101
0 votes
2 answers
88 views

After Ubuntu 14.04 -> 16.04 upgrade, pypMyAdmin retuns 502 error on nginx

So I just upgraded my VPS from 14.04 to 16.04, the upgrade went well for most parts, but MySQL failed to update. I needed to manually remove mariadb-client first, and then I was able to install MySQL ...
LBandy's user avatar
  • 9
1 vote
1 answer
3k views

Change error page for 502 Bad Gateway error Nginx not working

I have researched online for a means to change the error page when running into a 502 Bad Gateway error. I have tried all the methods given to no avail. I looked in the nginx.conf file and saw that it ...
Seth Boland's user avatar
0 votes
1 answer
685 views

nginx reverse proxy SSL [duplicate]

Goals: Have a single nginx reverse proxy for all sub-sites (running on other ports). BLOCK all direct connections, and instead; route through nginx. Problem(s): 502 gateway errors when trying to ...
Umesh .A Bhat's user avatar
1 vote
0 answers
15 views

nginx 502 bad gateway with nodejs [duplicate]

i am an student who is working on a nodejs + nginx project taht i didn't start, so im not sure what is going on.... when i try accessing to my website, i am recibing a 502 Bad Gateway nginx/1.12.2 ...
Nacho's user avatar
  • 11
3 votes
1 answer
37k views

failed (111: Connection refused) while connecting to upstream python [duplicate]

I am experiencing 502 Bad Gateway errors after deploying a python flask application using dokku on digital ocean. I followed this tutorial to deploy my app on digital ocean using dokku. 2018/10/23 07:...
Deschant Kounou's user avatar
0 votes
1 answer
2k views

502 Bad Gateway on localhost Apache

I'm trying to run a Drupal 7 multi-site install on my Mac (10.12.6). My directory setup: ~/Sites/index.html ~/Sites/drupal/docroot/sites/site1 ~/Sites/drupal/docroot/sites/site2 My /etc/hosts: 127....
OrdinaryHuman's user avatar
0 votes
1 answer
2k views

Almost all the http APIs return a 502 bad gateway error after adding a CDN

I just added my website to a CDN provider https://www.qiniu.com/en. Then I realised that almost all my http APIs (https://www.funfun.ink/httpOnly...) returned a 502 bad gateway error. Additionally, ...
Thomas's user avatar
  • 223
0 votes
1 answer
873 views

502 error returned from nginx reverse proxy rewrite on some networks

I am getting connection timed out - 502 when connecting from one Internet connection (wifi 4g connection tried with different devices and browsers) while the server works perfectly on VPN, and ...
Ajay Singh's user avatar
0 votes
1 answer
439 views

Nginx 502 error after updating Ubuntu 12.10 to 14.04?

I had a particularly outdated ubuntu distribution (12.10) and was beginning the process to update sequentially to 16.04. Yesterday, I successfully updated from 12.10->13.10->14.04 using the Ubuntu old ...
Wesleying's user avatar
0 votes
0 answers
791 views

HTTP 502 (Bad Gateway), niginx connect() to 127.0.0.1:8889 failed (99: Cannot assign requested address) while connecting to upstream

We have a server application running behind nginx, and the client side will keep getting and writing data to it through HTTP request but should return really fast. After running sometime, client side ...
gogog22510's user avatar
1 vote
1 answer
5k views

Nginx CentOS 7 PHP-FPM 7 502 Bad Gateway

I have configured Nginx, PHP-FPM 7 on CentOS 7. I am now having a 502 error. In www.conf: user and group are nginx. listen = /var/run/php-fpm.sock listen.owner = nginx listen.group = nginx listen....
freddyk's user avatar
  • 11
1 vote
1 answer
1k views

502 error when wordpress site hosted on AWS, but not Google cloud

I've got a problem with my wordpress site that means I get a 502 bad gateway error. The site is hosted on AWS (EC2 instance). I migrated the site to a google cloud instance to test if that would ...
Lisa's user avatar
  • 21
-1 votes
0 answers
1k views

centOS 7 nginx 502 bad gateway error [closed]

im using VPS with 2 cores 3GB ram 1.5GB swap i been using nginx for more than year and i have not had any problem, nginx only uses between 300 to 700MB ram only my website is not so busy i get between ...
cezar's user avatar
  • 1
0 votes
1 answer
2k views

Nginx Error 502 when uploading large images

The environment: Fresh install of Ubuntu 16.04 on a 256MB VPS LEMP stack with PHP 7.1 Latest WordPress install with Avada theme & associated plugins only. At least 75MB of RAM free when not ...
Titan's user avatar
  • 3
3 votes
1 answer
12k views

Nexus returns error 502 (Bad Gateway) when publishing artifacts

I've just completed the installation of Sonatype Nexus 3.2.1-01 and I'm trying to publish some artifacts using a Jenkins job and the Nexus Artifact Uploader 2.9 plugin. The upload starts fine: 100 % ...
Tedi's user avatar
  • 161
1 vote
1 answer
15k views

502 bad gateway nginx and apache servers

Hello there can you please help me im trying to setup apache and nginx server on my ubuntu 16.04 server, but when i try to visit localhost/info.php fo example im getting 502 Bad Gateway nginx/1.9....
Dimitar's user avatar
  • 123
1 vote
1 answer
3k views

Recurrent 502, 504 errors despite low cpu and memory usage

I'm struggling with this problem since quite a while. I have t2.site instance on AWS hosting a very low traffic personal website built with wordpress, nothing extraordinary. I first used Apache2, and ...
Xenophiliac's user avatar
0 votes
0 answers
1k views

Multiple Gunicorn daemons for Django projects with Nginx result in 502 Bad Gateway for one

I want to run two Django applications on the same server, with Nginx and Gunicorn. I can run them separately, but not both at the same time: When I try, one is OK, but for the other one I receive 502. ...
Hasan Can Saral's user avatar
1 vote
1 answer
2k views

nginx - 502 Bad Gateway ubuntu 14.04 aws ec2 django project + gunicorn

I'm trying to get my django project up and running on an aws ec2 instance. I'm using gunicorn with nginx, and I'm not really sure how I can tackle this problem. I've spent a couple hours on it already,...
pyramidface's user avatar
1 vote
2 answers
3k views

UWSGI Bad Gateway - Connection refused while connecting to upstream

Trying to get a basic Django app running on nginx using UWSGI. I keep getting a 502 error with the error in the subject line. I am doing all of this as root, which I know is bad practice, but I am ...
HectorOfTroy407's user avatar
-2 votes
1 answer
2k views

nginx (latest) is not working together with spawn-fcgi

My OS: Debian 7 (latest) x64 My Domain: www.DeadalusHD.com My nginx-vhost: server { listen 80; ## listen for ipv4; this line is default and implied listen [::]:80 default_server ipv6only=on; ## ...
Aebian's user avatar
  • 23
1 vote
0 answers
360 views

Openshift proxy timeout

I have an application hosted with Openshift and I need it to generate some Excel reports. The report generation process can take a long time (over 5 minutes). This causes the the client to see a 502 ...
Varaghar's user avatar
-1 votes
1 answer
2k views

502 bad gateway after upgrading PHP5-FPM

I just upgraded php-fpm and my server has gone away with a 502 bad gateway I've been searching for solutions and came across some like this: https://stackoverflow.com/a/10470827/1612432 and this ...
Alejandro Alcalde's user avatar
-1 votes
1 answer
2k views

Facebook error parsing input URL error 502 Bad Gateway

Any time when someone shares my website link onto facebook or twitter they get 502 Bad Gate way. I check the nginx error log to see whats going on and I got this. error1615#0: *2375 connect() failed ...
Pablo Lopez's user avatar
0 votes
2 answers
3k views

502 bad gateway when trying to log out through nginx reverse proxy

When I try to log out my php application, the nginx reverse proxy throws a 502 bad gateway error. The error log shows this error: [error] 20284#0: *1 upstream sent too big header while reading ...
James Kirkby's user avatar
3 votes
3 answers
9k views

NGINX Proxy Pass to NodeJS App: Returning 502 error

I'm trying to setup NGINX as the frontend of my NodeJS app, which is live on 127.0.0.1:3000, but i can't resolve this 502 error. NGINX is locally reachable at http://55.55.55.5/ or http://dev.example ...
Jack's user avatar
  • 31
2 votes
1 answer
8k views

Nginx + PHP-FPM on Centos 6.5 gives me 502 Bad Gateway (fpm error: unable to read what child say: Bad file descriptor)

I am setting up a standard LEMP stack. My current setup is giving me the following error: 502 Bad Gateway This is what is currently installed on my server: Here's the configurations I've created/...
Latheesan's user avatar
  • 357
1 vote
2 answers
5k views

502 Bad Gateway Nginx

When I try to view my website homepage I get the following error dislayed: 502 Bad Gateway Nginx The error log found at /var/log/nginx shows the message: *2014/04/21 10:30:39 [error] 3807#0: 228 ...
Tignor's user avatar
  • 31
24 votes
3 answers
114k views

nginx : no live upstreams while connecting to upstream

502 bad gateway error displayed when switching between site pages and some times on home page but not for the first request on the home page it is only when another page redirect to it. and it happens ...
Mohammad Jolani's user avatar
-3 votes
1 answer
1k views

nginx with php-fpm got 502 bad gateway on ubuntu server 12.04 [closed]

I just don't know why i got a 502 error. Please help. you can visit here http://upliu.net/phpinfo.php phpinfo.php just has one line code: phpinfo(); but i got a 502 bad gateway error someone can help ?...
user1968677's user avatar
4 votes
2 answers
17k views

Nginx 502 bad gateway runing django in uwsgi

I tryed to restart a project in production and it stoped working. This is a django==1.5.1 and django-cms==2.4.1 project. I restarted because I've updated the project from django==1.4.1 to django==1.5....
Mauricio's user avatar
  • 243
5 votes
1 answer
6k views

nginx+ uwsgi gives 502 Bad Gateway

I used this guide to set it up and it was working to server my django app for a while, but after adding a new django module, without touching any of the nginx or uwsgi configs, now the server leads to ...
alfish's user avatar
  • 3,147
2 votes
3 answers
8k views

Custom page on 502 Bad Gateway error

I want to use Nginx as a simple reverse proxy, but if the server behind Nginx is down I just was to display a blank page. For some reason this configuration isn't displaying a blank page on error 502 ...
user avatar
3 votes
3 answers
4k views

NginX & PHP-FPM, random 502

2010/09/19 14:52:07 [error] 1419#0: *10220 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: [...], server: [...], request: "POST /[...] HTTP/1.1", ...
pestaa's user avatar
  • 477
8 votes
1 answer
14k views

Simulate 502 & 504 on nginx

Is there any way to simulate these errors? I created some custom files for it, but I want to be sure that are displayed correctly. I made different message for every vhost. Thank you in advance.
MihaiM's user avatar
  • 738