0

I've been having this issue for a while and I can't seem to find the root cause. I have done a fresh reinstall of node and npm (with nvm) but to no luck I still face the same problems.

When I run npm start on my create-react-app repo I always receive Something is already running on port <port> but it doesn't actually appear to be a port in use. In this case the port is 5056.

When running sudo lsof -i -n -P | grep TCP from this question: Who is listening on a given TCP port on Mac OS X? I get the following:

CrashPlan    48                 root   71u  IPv6 0x2c25a5583eff58c1      0t0  TCP 127.0.0.1:4244 (LISTEN)
CrashPlan    48                 root   85u  IPv6 0x2c25a5583eff3c01      0t0  TCP 127.0.0.1:4244->127.0.0.1:61721 (FIN_WAIT_2)
CrashPlan    48                 root   86u  IPv6 0x2c25a5583eff41c1      0t0  TCP 127.0.0.1:4244->127.0.0.1:53768 (ESTABLISHED)
vpnagentd    55                 root    5u  IPv4 0x2c25a5583d8b2181      0t0  TCP 127.0.0.1:29754 (LISTEN)
ciscod       58                 root    3u  IPv4 0x2c25a5583d8b2b01      0t0  TCP 127.0.0.1:1023 (LISTEN)
apsd         91                 root   13u  IPv4 0x2c25a55862e8cb01      0t0  TCP 9.240.44.255:60294->17.249.12.152:5223 (ESTABLISHED)
apsd         91                 root   15u  IPv4 0x2c25a55862e8cb01      0t0  TCP 9.240.44.255:60294->17.249.12.152:5223 (ESTABLISHED)
rapportd    462 myusername    3u  IPv4 0x2c25a5586329f481      0t0  TCP *:60276 (LISTEN)
rapportd    462 myusername    4u  IPv6 0x2c25a55861ba8301      0t0  TCP *:60276 (LISTEN)
identitys   466 myusername   32u  IPv6 0x2c25a5583eff5301      0t0  TCP [fe80:c::992:b67a:e838:6f09]:1024->[fe80:c::d5c2:7935:1b0d:c90f]:1024 (ESTABLISHED)
identitys   466 myusername   33u  IPv6 0x2c25a5583eff5301      0t0  TCP [fe80:c::992:b67a:e838:6f09]:1024->[fe80:c::d5c2:7935:1b0d:c90f]:1024 (ESTABLISHED)
identitys   466 myusername   34u  IPv6 0x2c25a5583eff2ac1      0t0  TCP [fe80:c::992:b67a:e838:6f09]:1025->[fe80:c::d5c2:7935:1b0d:c90f]:9304 (ESTABLISHED)
identitys   466 myusername   35u  IPv6 0x2c25a5583eff2ac1      0t0  TCP [fe80:c::992:b67a:e838:6f09]:1025->[fe80:c::d5c2:7935:1b0d:c90f]:9304 (ESTABLISHED)
expressvp   805                 root   11u  IPv4 0x2c25a55847c2d481      0t0  TCP 127.0.0.1:2015 (LISTEN)
expressvp   805                 root   12u  IPv4 0x2c25a5586031d481      0t0  TCP 9.240.44.255:61661->3.212.116.79:443 (CLOSE_WAIT)
expressvp   805                 root   16u  IPv4 0x2c25a55868fb3b01      0t0  TCP 9.240.44.255:61662->3.212.116.79:443 (CLOSE_WAIT)
CrashPlan   814 myusername   51u  IPv4 0x2c25a5584b21c181      0t0  TCP 127.0.0.1:53768->127.0.0.1:4244 (ESTABLISHED)
CrashPlan   814 myusername   53u  IPv4 0x2c25a558807adb01      0t0  TCP 127.0.0.1:61721->127.0.0.1:4244 (CLOSE_WAIT)
Postman   22459 myusername   59u  IPv4 0x2c25a55862309801      0t0  TCP 9.240.44.255:60336->34.224.76.239:443 (CLOSED)
Postman   22459 myusername   73u  IPv4 0x2c25a5586031c181      0t0  TCP 9.240.44.255:60337->34.224.76.239:443 (ESTABLISHED)
Discord   36658 myusername   59u  IPv4 0x2c25a5583d8b0e81      0t0  TCP 9.240.44.255:60423->104.16.60.37:443 (ESTABLISHED)
Discord   36658 myusername   67u  IPv4 0x2c25a558807ae481      0t0  TCP 9.240.44.255:61654->104.16.59.5:443 (ESTABLISHED)
Discord   36658 myusername   97u  IPv4 0x2c25a55857e86181      0t0  TCP 9.240.44.255:60359->35.186.224.47:443 (ESTABLISHED)
Discord   36664 myusername   49u  IPv4 0x2c25a5586ce46b01      0t0  TCP 127.0.0.1:6463 (LISTEN)
Slack     51840 myusername   73u  IPv4 0x2c25a5586329ce81      0t0  TCP 9.240.44.255:60383->52.37.243.173:443 (ESTABLISHED)
Slack     51840 myusername  112u  IPv4 0x2c25a5586329d801      0t0  TCP 9.240.44.255:60333->52.37.243.173:443 (ESTABLISHED)
Slack     51840 myusername  117u  IPv4 0x2c25a55847c2ae81      0t0  TCP 9.240.44.255:60339->52.37.243.173:443 (ESTABLISHED)
Slack     51840 myusername  118u  IPv4 0x2c25a5586914a181      0t0  TCP 9.240.44.255:60338->52.37.243.173:443 (ESTABLISHED)
Slack     51840 myusername  119u  IPv4 0x2c25a55854de1481      0t0  TCP 9.240.44.255:60342->52.37.243.173:443 (ESTABLISHED)
firefox   76426 myusername   95u  IPv4 0x2c25a55858abae81      0t0  TCP 9.240.44.255:60326->34.209.103.65:443 (ESTABLISHED)
firefox   76426 myusername  120u  IPv4 0x2c25a55857e87481      0t0  TCP 9.240.44.255:60361->159.203.171.189:443 (ESTABLISHED)
Google    76844 myusername   30u  IPv4 0x2c25a558807f0481      0t0  TCP 9.240.44.255:61632->104.16.28.34:443 (ESTABLISHED)
Google    76844 myusername   35u  IPv4 0x2c25a558807c7481      0t0  TCP 9.240.44.255:60837->159.203.171.189:443 (ESTABLISHED)
Google    76844 myusername   36u  IPv4 0x2c25a5588079a181      0t0  TCP 9.240.44.255:61218->192.30.253.125:443 (ESTABLISHED)
Google    76844 myusername   38u  IPv4 0x2c25a5587a432481      0t0  TCP 9.240.44.255:61724->52.207.60.84:443 (ESTABLISHED)
Google    76844 myusername   41u  IPv4 0x2c25a55880798e81      0t0  TCP 9.240.44.255:61728->192.184.69.195:443 (ESTABLISHED)
Google    76844 myusername   44u  IPv4 0x2c25a5586167c801      0t0  TCP 9.240.44.255:61651->162.247.242.21:443 (ESTABLISHED)
Google    76844 myusername   46u  IPv4 0x2c25a5583d8b1801      0t0  TCP 9.240.44.255:60305->165.160.13.20:80 (CLOSED)
Google    76844 myusername   50u  IPv4 0x2c25a55863665481      0t0  TCP 9.240.44.255:61726->52.207.32.1:443 (ESTABLISHED)
Google    76844 myusername   60u  IPv4 0x2c25a55868fb4481      0t0  TCP 9.240.44.255:60306->165.160.13.20:80 (CLOSED)
Google    76844 myusername   63u  IPv4 0x2c25a55863662e81      0t0  TCP 9.240.44.255:60308->165.160.15.20:80 (ESTABLISHED)
Google    76844 myusername   64u  IPv4 0x2c25a5586031ae81      0t0  TCP 9.240.44.255:60309->165.160.13.20:80 (ESTABLISHED)
Google    76844 myusername   66u  IPv4 0x2c25a5586329eb01      0t0  TCP 9.240.44.255:60310->165.160.13.20:80 (ESTABLISHED)
Google    76844 myusername   69u  IPv4 0x2c25a5586f554481      0t0  TCP 9.240.44.255:61646->23.222.172.234:443 (ESTABLISHED)
Google    76844 myusername   74u  IPv4 0x2c25a5588085e481      0t0  TCP 9.240.44.255:61647->23.222.172.234:443 (ESTABLISHED)
Google    76844 myusername   77u  IPv4 0x2c25a5588085be81      0t0  TCP 9.240.44.255:61706->198.252.206.25:443 (ESTABLISHED)
Google    76844 myusername   79u  IPv4 0x2c25a558807c6b01      0t0  TCP 9.240.44.255:61729->198.252.206.25:443 (ESTABLISHED)
Google    76844 myusername   81u  IPv4 0x2c25a558807c6181      0t0  TCP 9.240.44.255:61629->151.101.1.69:443 (ESTABLISHED)
Google    76844 myusername   85u  IPv4 0x2c25a55880792b01      0t0  TCP 9.240.44.255:61712->198.252.206.25:443 (ESTABLISHED)
Google    76844 myusername   86u  IPv4 0x2c25a558807d9481      0t0  TCP 9.240.44.255:61727->52.207.32.1:443 (ESTABLISHED)
Google    76844 myusername   93u  IPv4 0x2c25a558807b1e81      0t0  TCP 9.240.44.255:61630->192.0.73.2:443 (ESTABLISHED)
Google    76844 myusername  100u  IPv4 0x2c25a55863664181      0t0  TCP 9.240.44.255:61634->184.30.231.203:443 (ESTABLISHED)
Google    76844 myusername  114u  IPv4 0x2c25a55880791801      0t0  TCP 9.240.44.255:61522->151.101.41.140:443 (ESTABLISHED)
Google    76844 myusername  123u  IPv4 0x2c25a55853feab01      0t0  TCP 9.240.44.255:61544->104.244.42.200:443 (ESTABLISHED)
Google    76844 myusername  146u  IPv4 0x2c25a5586172e181      0t0  TCP 9.240.44.255:61584->151.101.40.84:443 (ESTABLISHED)
Spotify   92621 myusername   69u  IPv4 0x2c25a5588085db01      0t0  TCP *:61682 (LISTEN)
Spotify   92621 myusername   71u  IPv4 0x2c25a55847c2b801      0t0  TCP *:57621 (LISTEN)
Spotify   92621 myusername   79u  IPv4 0x2c25a5584b21b801      0t0  TCP 9.240.44.255:60556->104.199.65.177:4070 (ESTABLISHED)
Spotify   92621 myusername  112u  IPv4 0x2c25a5586167d181      0t0  TCP 9.240.44.255:60562->35.186.224.53:443 (ESTABLISHED)
Spotify   92621 myusername  139u  IPv4 0x2c25a55858abb801      0t0  TCP 9.240.44.255:60566->151.101.40.246:443 (CLOSED)
Spotify   92621 myusername  140u  IPv4 0x2c25a55858abcb01      0t0  TCP 9.240.44.255:60567->151.101.40.246:443 (CLOSED)
Spotify   92621 myusername  141u  IPv4 0x2c25a55858abd481      0t0  TCP 9.240.44.255:60568->151.101.40.246:443 (CLOSED)

I can't seem to find any use of the port and I am stuck trying to find a reason for this issue. If I force the port onto 5056 by modifying the scripts/start.js file it does load as expected, but there are then issues proxying requests so none of my state data loads from the mock API. This is also the case if I choose to run the app on another port.

I get an ETIMEDOUT error saying it failed to proxy the request.

If any one has any ideas as to what could be the cause of the issue then I'd be incredibly grateful. It's probably worth mentioning others are able to run the same repository as expected without any of the aforementioned issues.

EDIT:

When running lsof -i:5056 nothing is returned.

Running lsof -n -i4TCP:3000 | grep LISTEN also returns nothing.

Running the latest XCode update seems to have fixed the issue...

Matt Kent
  • 1,095
  • 1
  • 10
  • 26

1 Answers1

-1

This might be helpful: http://johnharbison.net/something-is-already-running-on-port-3000-mac Check if your localhost is configured correctly in /etc/hosts.

  • 1
    Please do not provide link-only answers and give a brief explanation of the contents mentioned on the linked site. Checkout the answer guidelines [here](https://stackoverflow.com/help/how-to-answer) – linus_hologram Dec 10 '19 at 20:23