faced this when using a custom connected app for linking to VSCode.

Open terminal to get the process details

lsof -i tcp:1717

Use the PID on that command and close the port

kill -9 <port#>