
Estoy intentando ejecutar webpack-dev-server y no importa qué puerto use, obtengo EADDRINUSE
. Si lsof
no veo nada, parece estar usando el puerto.
¿Alguna idea de cuál podría ser el problema aquí? ¿Es necesaria algún tipo de configuración para alojar cosas localmente en una Mac? ..Tengo esto funcionando tanto en CentOS como en Windows 7 sin problemas.
Project is running at http://0.0.0.0:4040/
webpack output is served from /
events.js:160
throw er; // Unhandled 'error' event
^
Error: listen EADDRINUSE 0.0.0.0:4040
at Object.exports._errnoException (util.js:1020:11)
at exports._exceptionWithHostPort (util.js:1043:20)
at Server._listen2 (net.js:1258:14)
at listen (net.js:1294:10)
at net.js:1404:9
at _combinedTickCallback (internal/process/next_tick.js:83:11)
at process._tickCallback (internal/process/next_tick.js:104:9)
at Module.runMain (module.js:606:11)
at run (bootstrap_node.js:389:7)
at startup (bootstrap_node.js:149:9)
OSXDT8BDY3Hs-Mac-mini:cell-feature-search brandon$ lsof -Pn -i4
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
UserEvent 294 brandon 4u IPv4 0x30b113a2f9275acf 0t0 UDP *:*
identitys 314 brandon 20u IPv4 0x30b113a2f9274eef 0t0 UDP *:*
sharingd 331 brandon 4u IPv4 0x30b113a2f9f5e60f 0t0 UDP *:*
sharingd 331 brandon 8u IPv4 0x30b113a2f9f5d30f 0t0 UDP *:*
sharingd 331 brandon 9u IPv4 0x30b113a2f9f5eacf 0t0 UDP *:*
sharingd 331 brandon 10u IPv4 0x30b113a2f9f5ce4f 0t0 UDP *:*
sharingd 331 brandon 11u IPv4 0x30b113a2f9f5f1ef 0t0 UDP *:*
SystemUIS 730 brandon 11u IPv4 0x30b113a2f927644f 0t0 UDP *:*
SystemUIS 730 brandon 12u IPv4 0x30b113a2f9274a2f 0t0 UDP *:*
SystemUIS 730 brandon 15u IPv4 0x30b113a2f927456f 0t0 UDP *:62631
SystemUIS 730 brandon 16u IPv4 0x30b113a2f927702f 0t0 UDP *:*
SystemUIS 730 brandon 18u IPv4 0x30b113a2ebc8fe6f 0t0 UDP *:*
Finder 731 brandon 17u IPv4 0x30b113a2ebc8b26f 0t0 UDP *:*
WiFiProxy 750 brandon 5u IPv4 0x30b113a2ebc9032f 0t0 UDP *:*
WiFiAgent 797 brandon 5u IPv4 0x30b113a2f9275d2f 0t0 UDP *:*
eapolclie 890 brandon 3u IPv4 0x30b113a2f9f5c72f 0t0 UDP *:*
ARDAgent 1245 brandon 8u IPv4 0x30b113a2ebc8f02f 0t0 UDP *:3283
Google 2139 brandon 60u IPv4 0x30b113a2ebc8fc0f 0t0 UDP *:*
Google 2139 brandon 121u IPv4 0x30b113a2edad67e7 0t0 TCP 10.128.202.154:50991->151.101.65.69:443 (ESTABLISHED)
Google 2139 brandon 125u IPv4 0x30b113a2eeec89d7 0t0 TCP 10.128.202.154:51219->63.251.109.83:443 (CLOSED)
Google 2139 brandon 129u IPv4 0x30b113a2ef0202cf 0t0 TCP 10.128.202.154:51220->198.252.206.25:443 (ESTABLISHED)
Google 2139 brandon 130u IPv4 0x30b113a2f85847e7 0t0 TCP 10.128.202.154:50944->10.128.200.65:8009 (ESTABLISHED)
Google 2139 brandon 144u IPv4 0x30b113a2edad79d7 0t0 TCP 10.128.202.154:50994->23.44.160.143:443 (ESTABLISHED)
Google 2139 brandon 148u IPv4 0x30b113a2ed2f7bc7 0t0 TCP 10.128.202.154:50997->23.44.160.143:443 (ESTABLISHED)
Google 2139 brandon 150u IPv4 0x30b113a2ed2e5db7 0t0 TCP 10.128.202.154:50996->54.225.188.155:443 (CLOSED)
Google 2139 brandon 156u IPv4 0x30b113a2eeec9bc7 0t0 TCP 10.128.202.154:51187->12.129.210.52:443 (CLOSED)
Google 2139 brandon 169u IPv4 0x30b113a2ef0ca0df 0t0 TCP 10.128.202.154:51180->54.209.13.204:443 (CLOSED)
Google 2139 brandon 174u IPv4 0x30b113a2ed2652cf 0t0 TCP 10.128.202.154:51000->104.125.212.239:443 (ESTABLISHED)
Google 2139 brandon 182u IPv4 0x30b113a2ec77c2cf 0t0 TCP 10.128.202.154:51006->104.16.2.9:443 (ESTABLISHED)
Google 2139 brandon 183u IPv4 0x30b113a2ed2f57e7 0t0 TCP 10.128.202.154:51008->23.44.160.11:443 (ESTABLISHED)
Google 2139 brandon 185u IPv4 0x30b113a2ec77cbc7 0t0 TCP 10.128.202.154:51009->23.44.160.11:443 (ESTABLISHED)
Google 2139 brandon 187u IPv4 0x30b113a2ef0cbbc7 0t0 TCP 10.128.202.154:51068->172.217.3.206:80 (CLOSED)
Google 2139 brandon 188u IPv4 0x30b113a2eeeb6bc7 0t0 TCP 10.128.202.154:51069->173.194.56.244:80 (CLOSED)
Google 2139 brandon 190u IPv4 0x30b113a2eeeb59d7 0t0 TCP 10.128.202.154:51016->74.121.133.33:443 (ESTABLISHED)
Google 2139 brandon 193u IPv4 0x30b113a2eeeb47e7 0t0 TCP 10.128.202.154:51070->173.194.56.119:80 (CLOSED)
Google 2139 brandon 197u IPv4 0x30b113a2f7aa8db7 0t0 TCP 10.128.202.154:51149->104.16.112.18:443 (ESTABLISHED)
Google 2139 brandon 215u IPv4 0x30b113a2ed2e27e7 0t0 TCP 10.128.202.154:51091->23.21.52.164:443 (CLOSED)
Respuesta1
Tengo un par de ideas, pero son sólo conjeturas fundamentadas. Intente cambiar la dirección IP por otra. Con los extraños pasos de seguridad que le gusta tomar a Mac OS, podría marcar la diferencia configurarlo en 127.0.0.1 en lugar de 0.0.0.0.
Su comando lsof solo analiza IPv4, verifique también las conexiones IPv6. Creo que Mac OS X tiene el comando ss:
ss -l src :4040
Lo último que me queda es intentar ver qué sucede cuando intentas hacer telnet en ese puerto. Una respuesta de cualquier tipo te dice que hay algo escuchando, pero con suerte responde con más pistas.
Respuesta2
La "dirección" que está en uso probablemente sea el número de puerto, no la dirección IPv4. Y probablemente esté en uso por root o por otro usuario. Olvidaste sudo
tu lsof
así que solo te muestra tus propios procesos. Tal vez usted inició o inició algo webpack-dev-server
como algún otro usuario real o cuenta del sistema, por lo que ahora hay una copia ejecutándose que no está viendo root
y mantiene un oyente abierto en *:4040/TCP.nobody
_www