You need to sign in to do that
Don't have an account?
Rohit Goyal 5
Getting Error : Cannot start the OAuth redirect server on port PortInUseAction : while login Devhub
When I'm trying to use
> sfdx force:auth:web:login -d -a DevHubGetting Error -
ERROR running force:auth:web:login: Cannot start the OAuth redirect server on port PortInUseAction. Try this: Kill the process running on port 1717 or use a custom connected app and update OauthLocalPort in the sfdx-project.json file.
All Answers
"Restarting the terminal"--what it means Terminal here.Restarting VSCode or System/Laptop?
After restarting "Error: spawn cmd ENOENT" this kind of issue is displaying
macOS or Linux
To recover from a failed org authorization on macOS or Linux, use a terminal to kill the process running on port 1717.
1. From a terminal, run: 2. In the results, find the ID for the process that’s using the port.
3. Run:
Windows
To recover from a failed org authorization on Windows, use the Task Manager to end the Node process.
1. Press Ctrl+Alt+Delete, then click Task Manager.
2. Select the Process tab.
3. Find the process named Node.
4. Select the process that you want to end, and then click End Process.
Reference : https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_troubleshoot_cancel_auth.htm
c:\Jack> netstat -oan
con este comando busco que aplicacion esta usando el puerto 1717, una vez que obtengo el PID (por ejemplo 18480), se elimina el proceso con el siguiente comando
c:\Jack> tasklist /svc /FI "PID eq 18480" -- Obtengo el nombre de la aplicacion
c:\Jack> taskkill /F /PID 18480-- Elimino la aplicacion que esta usando ese PID