在nodejs pm2中遇到问题

fsi0uk1n  于 2023-01-01  发布在  Node.js
关注(0)|答案(1)|浏览(353)

Facing an issue in nodejs app
Error: listen EADDRINUSE: address already in use :::8000 at Server.setupListenHandle [as _listen2] (node:net:1463:16) at listenInCluster (node:net:1511:12) at Server.listen (node:net:1599:7) at Object. (/root/wa_server/app.js:209:11) at Module._compile (node:internal/modules/cjs/loader:1165:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1219:10) at Module.load (node:internal/modules/cjs/loader:1043:32) at Function.Module._load (node:internal/modules/cjs/loader:878:12) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) at node:internal/main/run_main_module:22:47 Emitted 'error' event on Server instance at: at emitErrorNT (node:net:1490:8) at processTicksAndRejections (node:internal/process/task_queues:83:21) { code: 'EADDRINUSE', errno: -98, syscall: 'listen', address: '::', port: 8000 }
sudo killall -9 node

5uzkadbs

5uzkadbs1#

系统中的一个程序已经在运行并且正在使用你的8000端口。你必须先停止或杀死它。在你的情况下,它很可能是一个NodeJS进程,正在某个地方运行(在后台,如果不是前台的话)。你可以杀死nodejs进程来释放被占用的端口。

相关问题