aws / aws-codedeploy-agent

Host Agent for AWS CodeDeploy
https://aws.amazon.com/codedeploy
Apache License 2.0
328 stars 188 forks source link

/opt/codedeploy-agent/: No such file or directory #311

Closed puni-p3 closed 2 years ago

puni-p3 commented 2 years ago

Following the aws doc instruction https://docs.aws.amazon.com/codedeploy/latest/userguide/codedeploy-agent-operations-install-linux.html

sudo ./install auto I, [2021-11-22T07:10:42.498075 #19259] INFO -- : Starting Ruby version check. I, [2021-11-22T07:10:42.498332 #19259] INFO -- : Starting update check. I, [2021-11-22T07:10:42.498432 #19259] INFO -- : Attempting to automatically detect supported package manager type for system... I, [2021-11-22T07:10:42.507083 #19259] INFO -- : Checking AWS_REGION environment variable for region information... I, [2021-11-22T07:10:42.507230 #19259] INFO -- : Checking EC2 metadata service for region information... I, [2021-11-22T07:10:42.521428 #19259] INFO -- : Checking AWS_DOMAIN environment variable for domain information... I, [2021-11-22T07:10:42.521599 #19259] INFO -- : Checking EC2 metadata service for domain information... I, [2021-11-22T07:10:42.527052 #19259] INFO -- : Downloading version file from bucket aws-codedeploy-ap-south-1 and key latest/LATEST_VERSION... I, [2021-11-22T07:10:42.527520 #19259] INFO -- : Endpoint: https://aws-codedeploy-ap-south-1.s3.ap-south-1.amazonaws.com/latest/LATEST_VERSION I, [2021-11-22T07:10:42.600149 #19259] INFO -- : Running version matches target version, skipping install I, [2021-11-22T07:10:42.600381 #19259] INFO -- : Update check complete. I, [2021-11-22T07:10:42.600480 #19259] INFO -- : Stopping updater.

sudo service codedeploy-agent status

/etc/init.d/codedeploy-agent: line 66: cd: /opt/codedeploy-agent/: No such file or directory -bash: /opt/codedeploy-agent/bin/codedeploy-agent: No such file or directory

sudo service codedeploy-agent start

Starting codedeploy-agent:/etc/init.d/codedeploy-agent: line 34: cd: /opt/codedeploy-agent/: No such file or directory

/var/log/aws/codedeploy-agent/codedeploy-agent.log

2021-11-18 14:59:22 WARN [codedeploy-agent(3526)]: Version tracking file either does not exist or cannot be read in /opt/codedeploy-agent/.version. 2021-11-18 15:00:07 INFO [codedeploy-agent(3526)]: [Aws::CodeDeployCommand::Client 200 45.415398 0 retries] poll_host_command(host_identifier:"arn:aws:ec2:ap-south-1:006748832286:instance/i-09a5b1d8a21494590")

2021-11-18 15:00:08 WARN [codedeploy-agent(3526)]: Version tracking file either does not exist or cannot be read in /opt/codedeploy-agent/.version. 2021-11-18 15:00:40 INFO [codedeploy-agent(3526)]: InstanceAgent::Plugins::CodeDeployPlugin::CommandPoller of master 3522: Received TERM - setting internal shutting down flag and possibly finishing last run 2021-11-18 15:00:40 INFO [codedeploy-agent(3526)]: InstanceAgent::Plugins::CodeDeployPlugin::CommandPoller: Gracefully shutting down agent child threads now, will wait up to 7200 seconds 2021-11-18 15:00:40 INFO [codedeploy-agent(3526)]: InstanceAgent::Plugins::CodeDeployPlugin::CommandPoller: All agent child threads have been shut down 2021-11-18 15:00:40 INFO [codedeploy-agent(3526)]: agent exiting now 2021-11-18 15:00:41 INFO [codedeploy-agent(3522)]: master 3522: Received TERM - stopping children and shutting down 2021-11-18 15:00:41 INFO [codedeploy-agent(3526)]: InstanceAgent::Plugins::CodeDeployPlugin::CommandPoller of master 3522: Received TERM - setting internal shutting down flag and possibly finishing last run 2021-11-18 15:00:41 INFO [codedeploy-agent(3526)]: InstanceAgent::Plugins::CodeDeployPlugin::CommandPoller: Gracefully shutting down agent child threads now, will wait up to 7200 seconds 2021-11-18 15:00:41 INFO [codedeploy-agent(3526)]: InstanceAgent::Plugins::CodeDeployPlugin::CommandPoller: All agent child threads have been shut down 2021-11-18 15:00:41 INFO [codedeploy-agent(3526)]: agent exiting now 2021-11-18 15:01:31 INFO [codedeploy-agent(3526)]: [Aws::CodeDeployCommand::Client 0 82.160188 3 retries] poll_host_command(host_identifier:"arn:aws:ec2:ap-south-1:006748832286:instance/i-09a5b1d8a21494590") Seahorse::Client::NetworkingError unable to connect to codedeploy-commands.ap-south-1.amazonaws.com; SocketError: getaddrinfo: Name or service not known

2021-11-18 15:01:31 ERROR [codedeploy-agent(3526)]: InstanceAgent::Plugins::CodeDeployPlugin::CommandPoller: Network error: #<Seahorse::Client::NetworkingError: unable to connect to codedeploy-commands.ap-south-1.amazonaws.com; SocketError: getaddrinfo: Name or service not known> 2021-11-18 15:01:32 INFO [codedeploy-agent(3526)]: InstanceAgent::Plugins::CodeDeployPlugin::CommandPoller of master 3522: shutting down