You need to sign in to do that
Don't have an account?
Lakshya Kanchan
Issue in running the same bat file twice
Hi
I have a bat file which contains SFDX CLI commands to fulfill my business scenarios.
I have a business scenario wherein the bat file is opened twice at the same time.
I am getting the "Kill the process running on port 1717 or use a custom connected app and update OauthLocalPort in the sfdx-project.json file." error in the 2nd cmd window that is opened.
I checked through the articles and found that we need to kill the 1st cmd window to open the 2nd cmd window.
Is there a way to make the sfdx cli chose any open port if one port is busy?
Regards,
Lakshya
I have a bat file which contains SFDX CLI commands to fulfill my business scenarios.
I have a business scenario wherein the bat file is opened twice at the same time.
I am getting the "Kill the process running on port 1717 or use a custom connected app and update OauthLocalPort in the sfdx-project.json file." error in the 2nd cmd window that is opened.
I checked through the articles and found that we need to kill the 1st cmd window to open the 2nd cmd window.
Is there a way to make the sfdx cli chose any open port if one port is busy?
Regards,
Lakshya
You can configure the SFDX CLI to use a random available port instead of a fixed port. To do this, you need to update the "OauthLocalPort" property in the sfdx-project.json file.
You can set this property to "0" which will instruct the SFDX CLI to choose a random available port when starting the OAuth server. Here's an example:
Once you've made this change, you should be able to open multiple instances of the bat file without encountering the "Kill the process running on port 1717" error.
References -> https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_intro.htm
https://developer.salesforce.com/forums/?id=9062I000000IDtcQAG
If it helps please mark this as Best Answer.
Thank you.