node.js - node.js 错误:连接 EADDRINUSE 104.16.58.5:443
问题描述
完整错误:
(node:8852) UnhandledPromiseRejectionWarning: Error: connect EADDRINUSE 104.16.58.5:443
at Object._errnoException (util.js:1022:11)
at _exceptionWithHostPort (util.js:1044:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1198:14)
(node:8852) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:8852) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
我安装的节点模块:
- 帆布@下一个
- 续集
- 不和谐.js
- sqlite3
其他信息:
- 无论应用程序做什么,当有人与应用程序交互时,有时都会发生错误。
解决方案
正如错误所说的 EADDRINUSE - 意味着您的应用程序使用的端口已被其他进程使用(某些 http 服务器使用 443 作为 http 默认端口)
您可以将端口从 443 更改,或者您可以找到使用此端口的进程并验证是否需要此进程
要在 Linux 上查找进程,请运行:
netstat -an | grep :443
第二列会告诉你哪个 processId 使用这个端口
在 Windows 上:
netstat -aon | findstr 443
推荐阅读
- python - TensorFlow 2.0:急切执行训练要么返回糟糕的结果,要么根本不学习
- python - 同一页面上的不同 request.POST 导致 DeleteView 错误 Django
- python - 用颜色填充框架
- javascript - 循环使用 translate3d 制作的轮播
- mongodb - Mongodb 将字段复制到另一个数组字段类型
- ios - 加载更多后快速滚动到顶部不起作用
- azure - 使用 Puppet 将 Azure 客户端安装到所有节点
- r - dplyr & tibble - 根据列表列中的值创建一个新列
- hive - hive 可以创建一个临时表,以便我可以获取一个小表以进行进一步查询吗?
- reactjs - 反应 renderToNodeStream 和 gzip/br/deflate