3

I am using Appium version V1.15.0 and have already start the server successfully with the default Host: 0.0.0.0 and Port: 4723

But now when i try to start the server it shows me this error "Error Starting Appium server: listen EADDRINUSE 0.0.0.0:4723"

I have tried to solve this issue by changing the port but could not find any solution.

Suggest me if you guys have any better solution.

tahmina
  • 83
  • 1
  • 9

4 Answers4

3

I have found the solution. After restarting my computer, i could successfully run the Appium server. If anyone face the same problem. Please follow below steps: 1. Check if the port is listening to any other services. Open command prompt: Type netstat -a -b

  1. Either kill that service or try with different port.
  2. If both not working then restart your machine.

This way i have solved this problem.

tahmina
  • 83
  • 1
  • 9
3

If EADDRINUSE, Address already in use is the issue,

do

ps aux | grep node to get the process ids.

Then:

kill -9 PID

Doing the -9 on kill sends a SIGKILL.

Nithin Mohan
  • 372
  • 1
  • 9
3

That because port 4723 has been used.

We gonna find which process using it

sudo lsof -i :4723

input your Mac user password, press Enter and the result will similar to

COMMAND   PID     USER   FD   TYPE             DEVICE SIZE/OFF NODE NAME
AppX     68286   huyck   65u  IPv4 0x31233f2022a17f56      0t0  TCP *:4723 (LISTEN)

that mean AppX with PID 68286 is using this port

And we are gonna kill it (replace 68286 with your PID)

sudo kill -9 68286

Another easier way, restart the machine could solve this problem Hope this helps!

Huy Hóm Hỉnh
  • 597
  • 7
  • 18
  • This works for me, but the port is immediately re-occupied by something. Any suggestions? – Kreidol Jan 21 '22 at 21:41
  • @Kreidol so let check which app occupied this port by first command again. and try to force stop it. Port 4723 not very popular, it could be Appium Desktop or Appium start by npm. Or u can change default to 4724, 4725... but remember to change port on your code/your inspector – Huy Hóm Hỉnh Jan 22 '22 at 08:45
0

The following solution on windows worked for me C:\Users\username> taskkill /F /IM node.exe SUCCESS: The process “node.exe” with PID 13992 has been terminated.