aws-codedeploy-agent icon indicating copy to clipboard operation
aws-codedeploy-agent copied to clipboard

InstanceAgent::LinuxUtil: Error deleting directories: 127

Open xorxeli opened this issue 4 years ago • 1 comments

ubuntu@ip-172-31-16-190:~$ cat /opt/codedeploy-agent/.version agent_version: OFFICIAL_1.3.2-1902_deb

CodeDeploy agent is up and running but once we try to execute the pipeline we are getting ERROR

"Error code UnknownError Script name Message Error deleting directories: 127"

Logs

2021-06-03 08:50:53 ERROR [codedeploy-agent(29337)]: InstanceAgent::LinuxUtil: Error deleting directories: 127
2021-06-03 08:50:53 DEBUG [codedeploy-agent(29337)]: InstanceAgent::Plugins::CodeDeployPlugin::CommandPoller: Calling PutHostCommandComplete: "Code Error" 
2021-06-03 08:50:53 INFO  [codedeploy-agent(29337)]: Version file found in /opt/codedeploy-agent/.version with agent version OFFICIAL_1.3.2-1902_deb.
2021-06-03 08:50:53 INFO  [codedeploy-agent(29337)]: [Aws::CodeDeployCommand::Client 200 0.049097 0 retries] put_host_command_complete(command_status:"Failed",diagnostics:{format:"JSON",payload:"{\"error_code\":5,\"script_name\":\"\",\"message\":\"Error deleting directories: 127\",\"log\":\"\"}"},host_command_identifier:"X==")  

Its not related to IAM Roles or Policies as same role works for other pipelines so we have double-checked it and problem is not related to IAM stuff.

xorxeli avatar Jun 03 '21 09:06 xorxeli

Could you turn on verbose logging and try again? It'll give you the command output in the agent log in addition to the status code.

https://docs.aws.amazon.com/codedeploy/latest/userguide/reference-agent-configuration.html

mwjones-aws avatar Jun 07 '21 12:06 mwjones-aws