Failed to run gcloud command | Community
Skip to main content
Level 3
June 10, 2021
Solved

Failed to run gcloud command

  • June 10, 2021
  • 1 reply
  • 1397 views

I installed the gcloud sdk in AC server, and I can run the 'gcloud -v' by the user 'neolane' in the command console:

 

 

But it always failed to run in Adobe campaign by the execCommand method:

 

var command='gcloud -v';
try{
var res=execCommand(command,true);
} catch(e){
logError("Error: "+e);
}

logInfo(">>"+res)

 

Error logs:

 

Does anyone know reason why the command cannot be executed by the same user in the same server? thanks!

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Jonathon_wodnicki

Hi,

 

The gcloud command isn't in neolane's PATH env var.

Use the absolute path for it, e.g. /opt/gcloud/bin/gcloud (`which gcloud` to get the path), or add the path for it to customer.sh (env.sh if that's missing).

 

Thanks,

-Jon

1 reply

Jonathon_wodnicki
Community Advisor
Jonathon_wodnickiCommunity AdvisorAccepted solution
Community Advisor
June 11, 2021

Hi,

 

The gcloud command isn't in neolane's PATH env var.

Use the absolute path for it, e.g. /opt/gcloud/bin/gcloud (`which gcloud` to get the path), or add the path for it to customer.sh (env.sh if that's missing).

 

Thanks,

-Jon

Level 3
June 17, 2021
Yes, you are right. I've solved the problem in the same way