I faced the following error today when logging in Salesforce Dev Hub using the CLI.
'EACCES': listen EACCES 127.0.0.1:1717
And what I did to get over it was to change that default port 1717 to something else.
The steps are as below.
- Open a
Command Prompt
window. - Go to a folder in your local machine using
cd
command. For example, in my case:cd Samples\Salesforce\my_sfdx_project
- Create a Salesforce DX project using
sfdx force:project:create
command. In my case:sfdx force:project:create -n force-proj01
- In the newly created folder
force-proj01
, opensfdx-project.json
file and add following line:"oauthLocalPort": "7717",
.
The file will eventually contain:
- Log in using the command
sfdx force:auth:web:login -d -a DevHub
. Now the browser window can open up. Fill in your user name and password to log in. - The browser now will redirect to such a link as
http://localhost:1717/OauthRedirect?code=...
, which is not existing. - Change the port in the link above from
1717
to7717
and press Enter. - Now I can log in to Dev Hub successfully.
Hello Thuc,
ReplyDeleteI have created project in Visual Code, I followed all your steps, but still failed.
Error: listen EACCES: permission denied 127.0.0.1:1717
at Server.setupListenHandle [as _listen2] (net.js:1303:21)
at listenInCluster (net.js:1368:12)
at GetAddrInfoReqWrap.doListen [as callback] (net.js:1505:7)
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:71:8) {
code: 'EACCES',
errno: -4092,
syscall: 'listen',
address: '127.0.0.1',
port: 1717
}
I got this error when run "sfdx auth:web:login -s -a conference". Even though, I changed port in the link, but no luck for me.
Could you give me any advices?
Thanks!
Thao.
salesforce online training hyderabad
ReplyDelete