邮递员连接ECONNREFUSED 127.0.0.1:8080

时间:2020-09-23 13:36:42

标签: api postman

尝试测试API端点并收到此错误。可以是我的要求正文吗?还是网络问题?也许我需要更改我的代理设置?

POST http://localhost:8080/v1/collections
Error: connect ECONNREFUSED 127.0.0.1:8080
Proxy
authenticate: false
disabled: false
host: "127.0.0.1"
id: "smth"
match: {…}
port: 8080
tunnel: false
Request Headers
Test: check-headers
x-ads-token-data: {stuff}
x-ads-gateway-secret: test1
Content-Type: application/json
User-Agent: PostmanRuntime/7.26.5
Accept: */*
Postman-Token: xxxx
Host: localhost:8080
Accept-Encoding: gzip, deflate, br
Connection: keep-alive

1 个答案:

答案 0 :(得分:1)

econnrefused意味着您很可能尚未在端口8080上启动服务器。

看看nodejs文档here

ECONNREFUSED(连接被拒绝):由于目标计算机主动拒绝连接,因此无法建立连接。这通常是由于尝试连接到外部主机上处于非活动状态的服务引起的。