Cookies
This website uses cookies to improve the user experience, more information on the legal information path.
Notas
0
anos
0
meses
0
días
0
horas
0
minus
0
segus
Sáb.16Mar.20:16
Esta é a imaxe de fondo
1

Error: listen EADDRINUSE: address already in use 0.0.0.0:XXXX

luns, 2 de xan. de 2023

Se tenta iniciar un servidor nun porto que xa está a ser utilizado por outro programa, obterá o seguinte erro:


MAKINOTE$ yarn start
yarn run v1.22.19
$ next start
Error: listen EADDRINUSE: address already in use 0.0.0.0:3000
at Server.setupListenHandle [as _listen2] (node:net:1432:16)
at listenInCluster (node:net:1480:12)
at doListen (node:net:1629:7)
at processTicksAndRejections (node:internal/process/task_queues:84:21) {
code: 'EADDRINUSE',
errno: -48,
syscall: 'listen',
address: '0.0.0.0',
port: 3000
}

Atopa o proceso que está a usar o porto


MAKINOTE$ lsof -i :3000
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
node 38091 xabier.lameirocardam 24u IPv6 0xee02297dd086ebc1 0t0 TCP *:hbci (LISTEN)

Mata o proceso


MAKINOTE$ kill -9 38091