Skip to main content
Level 3
Jun 10, 2021 6:40 AM UTC
Solved

Failed to run gcloud command

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.
Jonathon_wodnicki
Jonathon_wodnickiAccepted solution
Community Advisor
Jun 11, 2021 7:04 PM UTC

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

2 replies

Jonathon_wodnicki
Community Advisor
Jonathon_wodnickiCommunity AdvisorAccepted solution
Community Advisor
Jun 11, 2021 7:04 PM UTC

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

Translate
Level 3
Jun 17, 2021 2:49 AM UTC
Yes, you are right. I've solved the problem in the same way
Translate