1

I'm using TestCafe to test an app I'm working on. Today, when I went to run a TC test, I got the following message:

Error: listen EADDRINUSE: address already in use :::57664

I can usually handle these pretty easily: I issue the command:

lsof -i -P | grep -i "listen" or lsof -i tcp:57664

and then kill the offending task that is identified. However, in this case, that port number isn't listed so I don't know which task to kill. also,

ps aux | grep -i "TestCafe"

doesn't show anything helpful.

Any suggestions on how to identify the hung task and kill it?

Alex Skorkin
  • 4,264
  • 3
  • 25
  • 47
JESii
  • 4,678
  • 2
  • 39
  • 44
  • I've been running into this issue lately a lot as well and I haven't found a solution either. So I'm curious regarding the suggestions for this issue. In order to kill hanging node processes, `killall -9 node` was [suggested as a solution](https://stackoverflow.com/questions/4075287/node-express-eaddrinuse-address-already-in-use-kill-server). Though, this did not solve the problem in my case either. – Martin H. Oct 14 '22 at 13:35
  • 1
    @MartinH. Killing all node tasks is definitely not an option here (throwing the baby out with the bathwater, IMO). I'm running 20+ node tasks (Obsidian, neovim, Azure data studio & helper, copilot, ...). I sure don't want to restart half my work just to kill TestCafe! – JESii Oct 17 '22 at 14:20
  • 1
    yup, I definitely agree with you on that. That would only be an option if TestCafè is the only (relevant) node process running. – Martin H. Oct 17 '22 at 17:16
  • 1
    interestingly, I completely stopped experiencing this issue after upgrading my macOS from Big Sur to Monterey. – Martin H. Oct 29 '22 at 17:21

0 Answers0