easyeda / easyeda/easyeda-api-skill

Windows 环境启动 bridge‑server 报 EACCES 权限错误,端口49620被系统保留

Open Beginner friendly
#15 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
699
Forks
60
PR merge metrics
No merged PRs in 30d

Description

```markdown
## Bug 描述
在 Windows 系统执行 `npm run server` 启动桥接服务时抛出 `EACCES: permission denied 127.0.0.1:49620`。

端口 **49620** 落在 Windows TCP 系统排除端口段 `49552‑49651` 内,该段由系统/Hyper‑V预留,**即使使用管理员权限也无法绑定监听**。

项目硬编码写死端口49620,在 Linux / macOS 可以正常运行,但 Windows 环境直接启动失败。

## 复现步骤
1. Windows 环境克隆仓库
2. 执行 `npm install`
3. 执行 `npm run server`

## 错误日志
```
PS D:\easyeda-api-skill> npm run server
> [easyeda-api@1.1.28](mailto:easyeda-api@1.1.28) server
> node scripts/bridge-server.mjs
node:events:496
throw er; // Unhandled 'error' event
^
Error: listen EACCES: permission denied 127.0.0.1:49620
at Server.setupListenHandle [as _listen2] (node:net:1918:21)
at listenInCluster (node:net:1997:12)
at node:net:2206:7
at process.processTicksAndRejections (node:internal/process/task_queues:90:21)
Emitted 'error' event on WebSocketServer instance at:
at Server.emit (node:events:530:35)
at emitErrorNT (node:net:1976:8)
at process.processTicksAndRejections (node:internal/process/task_queues:90:21) {
code: 'EACCES',
errno: -4092,
syscall: 'listen',
address: '127.0.0.1',
port: 49620
}
Node.js v22.17.0
```

## 排查信息
执行命令查看 Windows 系统排除端口列表:
```powershell
netsh int ipv4 show excludedportrange protocol=tcp
```
输出片段:
```
开始端口 结束端口
---------- --------
49552 49651
```
> 49620 处于 `49552‑49651` 系统排除区间,用户态程序无法监听该端口。
> 注意:该报错不是端口被占用(EADDRINUSE),是系统直接禁止绑定。

```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with scripts/bridge-server.mjs and the npm server script shown in the reproduction, then trace how the WebSocket server selects port 49620. Verify the change by running npm run server on Windows, including when 49620 is in the excluded port range; done means the bridge starts without the EACCES bind failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
backend, networking
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.