The port #xxx is occupied by an other process

Hi Everybody,
I execute my iOS test automation with using Appium. But in my last 2 executions I always get the same error which is …sessionNotCreatedException: Unable to create a new remote session. Please check the server log for more details. Original error: An unknown server-side error occurred while processing the command. Original error: The port #4724 is occupied by an other process. You can either quit that process or select another free port. I try to kill processID which is used this port and also other ports I stop and re-start Appium. However my issue is still continue. Please help me immediately.

I use latest Appium version : 1.18.0-2
xcode version: 12.4

Thanks for your help

I bet the old Appium process is still running. Try this command from terminal:

ps aux | grep appium

And then quit any remaining Appium processes that this reveals.

Here’s a tutorial on killing a process from the terminal on OS X: