The HyperText Transfer Protocol (HTTP) 502 Bad Gateway the server error is generated when an invalid response is received from a server. “502 Bad Gateway” is an HTTP status code that is defined and standardized with RFC. The “502 Bad Gateway” status code is defined in RFC 10.5.3.
当从服务器接收到无效响应时, HyperText Transfer Protocol (HTTP) 502 Bad Gateway服务器错误生成。 “ 502 Bad Gateway”是使用RFC定义和标准化的HTTP状态代码。 “ 502 Bad Gateway”状态代码在RFC 10.5.3中定义。
什么是“ HTTP 502错误网关”错误? (What Is “HTTP 502 Bad Gateway” Error?)
HTTP uses status codes in order to provide information about the HTTP request between client and servers. Every HTTP request will return a HTTP status code like successful, failed, warning etc. The web is complex where some servers can make HTTP request to other servers too. “HTTP 502 Bad Gateway” is a status code is mainly returned from a server where this server make some request to other server and can not get information and “HTTP 502 Bad Gateway” is returned to the user.
“ HTTP 502错误网关”表达式 (“HTTP 502 Bad Gateway” Expressions)
Even the canonical name for the “HTTP 502 Bad Gateway” is used to express the error but there are other expressions to show this error. The following errors are generally used for the web.
502 Server Error: The server encountered a temporary error and could not complete your request502服务器错误:服务器遇到临时错误,无法完成您的请求
HTTP 502HTTP 502
502. That’s an error502.那是一个错误
Bad Gateway: The proxy server received an invalid response from an upstream server错误的网关:代理服务器收到来自上游服务器的无效响应
HTTP Error 502 – Bad GatewayHTTP错误502 –错误的网关
502 Bad Gateway NGINX502错误的网关NGINX
A blank white screen黑屏
Also other than different applications, software, operating systems uses the web for different purposes and can get “HTTP 502 Bad Gateway” error and print in different forms.
Windows Update requires to access th update servers which uses HTTP protocol to get information. The following error is returned which is related with the “HTTP 502 Bad Gateway” status code.
Windows Update需要访问使用HTTP协议获取信息的更新服务器。 返回以下错误,该错误与“ HTTP 502错误网关”状态代码相关。
0x80244021 error code or the message WU_E_PT_HTTP_STATUS_BAD_GATEWAY
Google provides a lot of web related services like Gmail, Google Search, Google Cloud, Google Drive Google Map etc. These service may return the “HTTP 502 Bad Gateway” error like below.
Google提供了许多与Web相关的服务,例如Gmail,Google搜索,Google Cloud,Google Drive Google Map等。这些服务可能会返回“ HTTP 502 Bad Gateway”错误,如下所示。
Linux Package Management command named “apt-get” uses HTTP in order to get recent package information and issue an “Error 502 Bad Gateway” error.
名为“ apt-get”Linux软件包管理命令使用HTTP来获取最新的软件包信息并发出“错误502 Bad Gateway”错误。
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/trusty-security/main/source/Sources 502 Bad Gateway [IP: 91.189.91.13 80]
Linux Yum is another package manager for RPM based distributions and the HTTP 502 Error is expressed like below.
Linux Yum是另一个用于基于RPM的发行版的程序包管理器,并且HTTP 502错误表示如下。
error was [Errno 14] HTTP Error 502: Bad Gateway
是什么原因导致“ HTTP 502错误的网关”错误?(What Cause “HTTP 502 Bad Gateway” Error?)
“HTTP 502 Bad Gateway” error is mainly related to the communication problems between intermediate servers. This means we have no control over this error.
Microsoft IIS“ HTTP 502错误的网关”子状态信息(Microsoft IIS “HTTP 502 Bad Gateway” SubStatus Information)
Microsoft IIS version 7.0 and later provides more detailed information about the “HTTP 502 Bad Gateway” error. It provides sub status code like “502.1”, “502.2” where every sub status code provides a specific case. This sub status information is not standard and only provided by the Microsoft IIS server.
Microsoft IIS 7.0和更高版本提供了有关“ HTTP 502错误网关”错误的更多详细信息。 它提供子状态代码,如“ 502.1”,“ 502.2”,其中每个子状态代码都提供了特定的情况。 此子状态信息不是标准的,仅由Microsoft IIS服务器提供。
如何修复/解决“ HTTP 502错误的网关”错误?(How To Fix /Solve “HTTP 502 Bad Gateway” Error?)
The “HTTP 502 Bad Gateway” error can be solved in different ways. Event the error is mainly related with the remote server or network there are some basic checks in order to fix or overcome this error.
Reload URL is the first and most practical way to solve this error. “F5” or refresh button of the web browser can be used. Actually this will not fix the problem directly but just make a check if the problem continue or not.
Start New Session is another quick fix where previous sessions garbage will be omitted.
Start New Session是另一种快速修复方法,其中将忽略先前的会话垃圾。
Clear your browser cache where outdated or corrupted files that are stored in the browser will be removed which can cause “HTTP 502 Bad Gateway” error.
Clear your browser cache ,将删除其中存储在浏览Clear your browser cache中的过时或损坏的文件,这可能导致“ HTTP 502 Bad Gateway”错误。
Delete Cookies because previosuly stored cookies will use old values for an HTTP connection which can be cause of the “502 Bad Gateway” error.
Delete Cookies因为以前存储的Cookie将对HTTP连接使用旧值,这可能是“ 502 Bad Gateway”错误的原因。
Start Browsers in Safe/Private Mode which will omit previously craeted sessions and site preferences and prevent “502 Error”.
Start Browsers in Safe/Private Mode该Start Browsers in Safe/Private Mode将忽略以前创建的会话和网站首选项,并防止出现“ 502错误”。
Try Different Browser where current browser may have problems. Try different browser like Google Chrome, Mozilla Firefox, Microsoft Edge, Opera, Internet Explorer, Safari etc.
在当前浏览器可能存在问题的地方Try Different Browser器”。 尝试使用其他浏览器,例如Google Chrome,Mozilla Firefox,Microsoft Edge,Opera,Internet Explorer,Safari等。
Disable Security Softwarewhere security software can block suspicious even legitimate action. Security software like Microsoft Defender, Kaspersky Endpoint Protection, Microsoft Forefront, TrendMicro Endpoint Protection etc. generally monitors network traffic and stops suspicious connections.
Restart Computer because some temporary configuration may prevent access to network and create “HTTP 502 Bad Gateway” error.
Restart Computer因为某些临时配置可能会阻止访问网络并产生“ HTTP 502 Bad Gateway”错误。
Restart Network Devices because they provide access to the internet and problem related with these devices will interrupt internet access which will cause “Bad Gateway Error”.
Contact website owner is responsible for the website you want to access. The problem may be related with the website architecture where you can contact website owner for the problem.
Contact ISP because the internet connection is provided by the ISP where it can be responsible for the “502 Bad Gateway” error.
Contact ISP因为Internet连接是由ISP提供的,它可能导致“ 502 Bad Gateway”错误。
Check origin server where it can be down for the CDN architecture.
Check origin server在哪里可以关闭CDN体系结构。
Check Firewall Configuration and Logswhere server firewall can prevent some transfer between client or servers which will cause “HTTP 502 Bad Gateway” error.
Check Firewall Configuration and Logs ,其中服务器防火墙可以阻止客户端之间或服务器之间的某些传输,这将导致“ HTTP 502 Bad Gateway”错误。
Check Server Software where it may provide faulty responses or create unnecessary overload.
Check Server Software ,它可能会提供错误的响应或造成不必要的过载。
Check Server Services where services may be unreliable. If it is possible to restart the services and look for configuration changes.
Check Server Services服务可能不可靠的Check Server Services 。 如果可以重新启动服务并查找配置更改。
Check Database Server because slow queries slowdown the websites and cause sow responses which will end with timeout and “HTTP 502 Bad Gateway” error.