Reputation: 1172
I'm trying to make a rollback due a deploy failed, my server code is on java, and also i'm using App Engine Eclipse PlugIn for. my appcfg.sh file is located at /Applications/eclipse/plugins/com.google.appengine.eclipse.sdkbundle_1.7.5/appengine-java-sdk-1.7.5/bin/appcfg.sh
but i get "Command not Found" when i try this sudo /Applications/eclipse/plugins/com.google.appengine.eclipse.sdkbundle_1.7.5/appengine-java-sdk-1.7.5/bin/appcfg.sh rollback /Documents/workspace/server_side/war
I can't realize what's wrong. i don`t know if is the right appcfg, because there is appcfg.cmd and appcfg.sh, i'm using an imac(Unix enviro) so i use the appcfg.sh to made the rollback. i've tried in several different ways. and nothing good happen. maybe i'm missing something. thanks!
Upvotes: 3
Views: 3450
Reputation: 2560
Use the following commands on OSX. Note the appcfg.sh doesn't have execute permission by default so you need to add it via chmod.
cd /Users/Labuser/Downloads/appengine-java-sdk-1.9.22/bin
chmod 755 appcfg.sh
sh appcfg.sh rollback /Users/Labuser/Ducuments/AndroidWS/AndroidStudioProjects/AndroidProject/modulebackend/src/main/webapp/
Upvotes: 0
Reputation: 51
I also encountered the same problem as the original poster of this question, but I still got a permission denied error when attempting to rollback, even after changing the permissions of the appcfg.sh file.
It turned out I also needed to chmod 755 run_java.sh (located in the same directory as appcfg.sh), and then I was able to rollback without problems.
I thought I would post this in case anyone encountered the same set of issues that I did.
Upvotes: 5
Reputation: 53
Maybe you made the same silly oversight as me and left out "sh" at the beginning? i.e.
sh /Applications/eclipse/plugins/com.google.appengine.eclipse.sdkbundle_1.7.5/appengine-java-sdk-1.7.5/bin/appcfg.sh rollback /Documents/workspace/server_side/war
Upvotes: 1
Reputation: 326
For anyone else who stumbles upon this and wants more detail...
In Terminal go to GAE-SDK-PATH/bin (where appcfg.sh is located) for instance:
/Applications/Eclipse/plugins/com.google.appengine.eclipse.sdkbundle_1.8.3/appengine-java-sdk-1.8.3/bin
You may not have enabled permissions with appcfg.sh, so do what @yorkw suggested if you are getting 'Permission Denied', in the bin directory type:
chmod 755 appcfg.sh
then to rollback type
./appcfg.sh --email=PROJECT_EMAIL --passin rollback ROOT_PROJECT_FOLDER/war
You will be prompted to enter the password for the project email, and then it should work! Google doc: https://developers.google.com/appengine/docs/java/tools/uploadinganapp
Upvotes: 2
Reputation: 41126
It does not have execute permission by default:
-rw-r--r-- 1 yorkw staff 558 11 Dec 06:01 appcfg.sh
Run chmod 755 appcfg.sh
to change the permission:
-rwxr-xr-x 1 yorkw staff 558 11 Dec 06:01 appcfg.sh
Then you should be able to run it in terminal.
Upvotes: 10