Failed to run gcloud command

Avatar

Avatar
Give Back
Level 2
felixsongfei
Level 2

Likes

11 likes

Total Posts

34 posts

Correct reply

2 solutions
Top badges earned
Give Back
Ignite 3
Ignite 1
Validate 10
Validate 1
View profile

Avatar
Give Back
Level 2
felixsongfei
Level 2

Likes

11 likes

Total Posts

34 posts

Correct reply

2 solutions
Top badges earned
Give Back
Ignite 3
Ignite 1
Validate 10
Validate 1
View profile
felixsongfei
Level 2

09-06-2021

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

 

felixsongfei_0-1623307056579.png

 

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:

felixsongfei_1-1623307126459.png

 

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

View Entire Topic

Avatar

Avatar
Establish
MVP
wodnicki
MVP

Likes

977 likes

Total Posts

1,097 posts

Correct reply

516 solutions
Top badges earned
Establish
Affirm 500
Contributor
Shape 1
Give Back 100
View profile

Avatar
Establish
MVP
wodnicki
MVP

Likes

977 likes

Total Posts

1,097 posts

Correct reply

516 solutions
Top badges earned
Establish
Affirm 500
Contributor
Shape 1
Give Back 100
View profile
wodnicki
MVP

11-06-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