Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

本地开发运行报错,找不到问题所在 #4699

Closed
liyang9331 opened this issue Jun 23, 2021 · 4 comments
Closed

本地开发运行报错,找不到问题所在 #4699

liyang9331 opened this issue Jun 23, 2021 · 4 comments

Comments

@liyang9331
Copy link

egg-bin dev

[egg-ts-helper] create typings\app\controller\index.d.ts (6ms)
[egg-ts-helper] create typings\config\index.d.ts (62ms)
[egg-ts-helper] create typings\config\plugin.d.ts (14ms)
[egg-ts-helper] create typings\app\service\index.d.ts (5ms)
[egg-ts-helper] create typings\app\index.d.ts (2ms)
2021-06-23 16:41:09,881 INFO 23008 [master] node version v14.16.1
2021-06-23 16:41:09,882 INFO 23008 [master] egg version 2.29.4
2021-06-23 16:41:12,996 INFO 23008 [master] agent_worker#1:19788 started (3101ms)
2021-06-23 16:41:17,021 ERROR 15160 [app_worker] server got error: bind EADDRNOTAVAIL 0.0.0.1:7000, code: EADDRNOTAVAIL
[2021-06-23 16:41:17.077] [cfork:master:23008] worker:15160 disconnect (exitedAfterDisconnect: false, state: disconnected, isDead: false, worker.disableRefork: true)
[2021-06-23 16:41:17.078] [cfork:master:23008] don't fork, because worker:15160 will be kill soon
2021-06-23 16:41:17,079 INFO 23008 [master] app_worker#1:15160 disconnect, suicide: false, state: disconnected, current workers: ["1"]
2021-06-23 16:41:17,080 WARN 19788 [ClusterClient:Connection] socket is closed by other side while there were still unhandled data in the socket buffer
[2021-06-23 16:41:17.115] [cfork:master:23008] worker:15160 exit (code: 1, exitedAfterDisconnect: false, state: dead, isDead: true, isExpected: false, worker.disableRefork: true)
2021-06-23 16:41:17,121 ERROR 23008 nodejs.AppWorkerDiedError: [master] app_worker#1:15160 died (code: 1, signal: null, suicide: false, state: dead), current workers: []
at Master.onAppExit (C:\Users\Administrator\Desktop\egg-template\node_modules\egg-cluster\lib\master.js:510:21)
at Master.emit (events.js:315:20)
at Messenger.sendToMaster (C:\Users\Administrator\Desktop\egg-template\node_modules\egg-cluster\lib\utils\messenger.js:137:17)
at Messenger.send (C:\Users\Administrator\Desktop\egg-template\node_modules\egg-cluster\lib\utils\messenger.js:102:12)
at EventEmitter. (C:\Users\Administrator\Desktop\egg-template\node_modules\egg-cluster\lib\master.js:353:22)
at EventEmitter.emit (events.js:327:22)
at ChildProcess. (internal/cluster/master.js:199:13)
at Object.onceWrapper (events.js:422:26)
at ChildProcess.emit (events.js:315:20)
at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
name: "AppWorkerDiedError"
pid: 23008
hostname: 5RGO61KWQO5XCQ4

2021-06-23 16:41:17,129 ERROR 23008 [master] app_worker#1:15160 start fail, exiting with code:1
2021-06-23 16:41:17,143 ERROR 23008 [master] exit with code:1
Error: C:\Users\Administrator\Desktop\egg-template\node_modules\egg-bin\lib\start-cluster {"declarations":true,"tscompiler":"ts-node/register","workers":1,"baseDir":"C:\Users\Administrator\Desktop\egg-template","framework":"C:\Users\Administrator\Desktop\egg-template\node_modules\egg"} exit with code 1
at ChildProcess. (C:\Users\Administrator\Desktop\egg-template\node_modules\common-bin\lib\helper.js:56:21)
at Object.onceWrapper (events.js:422:26)
at ChildProcess.emit (events.js:315:20)
at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12) {
code: 1
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] dev: egg-bin dev
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! D:\nodejs\node_cache_logs\2021-06-23T08_41_17_337Z-debug.log

@egg-bot
Copy link

egg-bot commented Jun 23, 2021

Hello @liyang9331. Please provide a reproducible example following the instruction.

Issues labeled by Need Reproduce will be closed if no activities in 7 days.


@liyang9331,请根据这个说明提供最小可复现代码。

如果在 7 天内没有进展会被自动关闭。

@hyj1991
Copy link
Member

hyj1991 commented Jun 23, 2021

bind EADDRNOTAVAIL 0.0.0.1:7000

你的电脑有 0.0.0.1 这个地址?

@hyj1991
Copy link
Member

hyj1991 commented Jun 23, 2021

0.0.0.1 显然不是合法的地址,在 listen 的时候当然绑定不上去抛了 EADDRNOTAVAIL 的错误,本地要么是 0.0.0.0 要么是 127.0.0.1

@liyang9331
Copy link
Author

我去,没看到!了解了!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants