【nodejs问题集】EADDRINUSE如何解决?

问题重演
在node退出后,重新node server.js,出现如下报错:

[code]
events.js:66
throw arguments[1]; // Unhandled ‘error’ event
^
Error: listen EADDRINUSE
[/code]

解决办法

Actually, instead of Ctrl + z you should use Ctrl + c which will close the program correctly by sending SIGQUIT 🙂 See the wiki for further details 🙂

也就是说用要关闭node的时候用ctrl+c,而不是用ctrl+z。
此外,如果问题以及出现,可以用如下方法解决。
[code]
ps aux | grep node
kill -9 PID
[/code]

参考:http://stackoverflow.com/questions/4075287/node-express-eaddrinuse-address-already-in-use-kill-server

暂无评论

发送评论 编辑评论


				
|´・ω・)ノ
ヾ(≧∇≦*)ゝ
(☆ω☆)
(╯‵□′)╯︵┴─┴
 ̄﹃ ̄
(/ω\)
∠( ᐛ 」∠)_
(๑•̀ㅁ•́ฅ)
→_→
୧(๑•̀⌄•́๑)૭
٩(ˊᗜˋ*)و
(ノ°ο°)ノ
(´இ皿இ`)
⌇●﹏●⌇
(ฅ´ω`ฅ)
(╯°A°)╯︵○○○
φ( ̄∇ ̄o)
ヾ(´・ ・`。)ノ"
( ง ᵒ̌皿ᵒ̌)ง⁼³₌₃
(ó﹏ò。)
Σ(っ °Д °;)っ
( ,,´・ω・)ノ"(´っω・`。)
╮(╯▽╰)╭
o(*////▽////*)q
>﹏<
( ๑´•ω•) "(ㆆᴗㆆ)
😂
😀
😅
😊
🙂
🙃
😌
😍
😘
😜
😝
😏
😒
🙄
😳
😡
😔
😫
😱
😭
💩
👻
🙌
🖕
👍
👫
👬
👭
🌚
🌝
🙈
💊
😶
🙏
🍦
🍉
😣
Source: github.com/k4yt3x/flowerhd
颜文字
Emoji
小恐龙
花!
上一篇
下一篇