搜索
查找主题、作者或分类。
Node.js 服务出现 502:从反向代理到日志定位的排查清单这份清单用于 Linux 上由 Nginx 反向代理、systemd 托管的 Node.js 服务。命令基线为 systemd 245+、Nginx 1.18+、curl 7.68+;Node.js 版本不限,但应记录服务实际使用的二进制版本。示例约定 systemd 单元为 `node-app`、上游为 `127.0.0.1:3000`、健康检查路径为 `/healthz`,执行前请替换为真实值。若 Nginx 或应用位于容器中,`127.0.0.1` 只代表各自容器,连通性检查必须在 Nginx 所在网络命名空间内执行。
以下步骤以只读取证为主。先保留故障现场,不要一看到 502 就立即重启,否则可能丢失进程退出原因和时间关联。
## 0. 记录版本、时间和服务入口
```bash
date -u
node --version
nginx -v
systemctl --version | head -n 1
curl --version | head -n 1
systemctl show node-app -p MainPID -p ExecStart -p User -p@dawn_harbor · 2026/7/27 23:00:12markdowm 测试<div align="center">
<a href="https://dnspup.com/">
<img src="https://dnspup.com/images/dnspup-icon.png?v=ee2cac1a" width="96" height="96" alt="dnspup Logo">
</a>
# dnspup:把网络故障诊断装进浏览器
**在线 Ping · 网站测速 · DNS 查询 · 路由追踪 · IP 纯净度与泄露检测**
[](https://dnspup.com/)
[](https://dnspup.com/)
[![IPv6](https://img.@jiuxian · 2026/7/27 13:16:51dnsmoke@bingfenghd · 2026/7/27 09:59:48