srikanth Gorrepati
srikanth Gorrepati

Reputation: 51

Script does not exist at specified location

"Script does not exist at specified location: /opt/codedeploy-agent/deployment-root/76b33ccc-594b-4d58-a1b8-e40d054c64b7/d-AVYMCK28I/deployment-archive/scripts/Applicationstoptest.sh"

This is the error I am getting can any one please help me how to resolve this issue

Upvotes: 5

Views: 8166

Answers (4)

Santosh
Santosh

Reputation: 3827

I had the same issue. I followed this process and it did helped me.

The ApplicationStop hook is being called from the previously installed deployment before trying to run the current deployment appspec.yml file.

In order to prevent this from happening you'll have to remove any previously installed deployment from the server.

  • Stop the code deploy agent - sudo service codedeploy-agent stop
  • clear all deployments under /opt/codedeploy-agent/deployment-root
  • Restart the code deploy agent - sudo service codedeploy-agent start

copied ans from here so don't have to open new link. Thanks @paul

Upvotes: 2

Paul Siersma
Paul Siersma

Reputation: 2206

I found my answer here: https://stackoverflow.com/a/27925591/1056283

The application stop hook uses a previous deployment to look for the script to invoke, so if the structure of your deploy package changes, there may not be a script to call at the specified location yet. The deploy fails and the script never arrives at the new location. Look in the linked answer for the steps to resolve it.

Upvotes: 0

Deblina Gupta
Deblina Gupta

Reputation: 190

The paths used in source in the AppSpec file are relative paths, starting from the root of your revision. Also please make sure the appspec.yml file and the other files in the application bundle are not wrapped inside another folder.

Upvotes: 0

ddtraveller
ddtraveller

Reputation: 1222

Make sure you're using relative paths in your appspec.yml.

Upvotes: 2

Related Questions