Katedral Pillon
Katedral Pillon

Reputation: 14864

How do I rollback app-engine deployment

I have an Appengine connected android project (eclipse). I am trying to deploy it as I have done countless times. But this time I am getting the following error.

Unable to update app: Error posting to URL: https://appengine.google.com/api/appversion/create?app_id=myappid&version=1& 409 Conflict Another transaction by user myusername is already in progress for app: s~myappid, version: 1. That user can undo the transaction with "appcfg rollback".

See the deployment console for more details Unable to update app: Error posting to URL: https://appengine.google.com/api/appversion/create?app_id=myappid&version=1& 409 Conflict Another transaction by user myusername is already in progress for app: s~myappid, version: 1. That user can undo the transaction with "appcfg rollback".

So I open my osx terminal and navigate to the folder of my project. When I type

appcfg.py rollback .

I get a terminal error that

appcfg.py: error: Directory does not contain an app.yaml configuration file

Thanks for any direction.

Update

I think I finally found out where it is but now I am getting permission denied when I do

/Applications/eclipse/plugins/com.google.appengine.eclipse.sdkbundle_1.9.3/appengine-java-sdk-1.9.3/bin/appcfg.sh rollback war

Upvotes: 0

Views: 4127

Answers (8)

Tim Consolazio
Tim Consolazio

Reputation: 4888

Just an FYI on this: I was using the Eclipse java plugin on Mac (so otherwise didn't have the SDK anywhere), found the command file by digging into the Eclipse package there etc, but predictably enough it didn't run. So I just downloaded the appengine Java SDK, unzipped it, went into bin, ran ./appcfg rollback my/proj command as you see here.

Leave that terminal window open, do not close it, read on...

It opens a web browser and tells you in a very bare bones way to "copy a code and return to the application". I haven't had to roll back a deploy in quite some time, but I don't remember this step. Anyway, I had no idea what that meant until I happened to look at the terminal where I ran the appcfg command, which was now waiting for me to paste in that code. Then all was well.

Upvotes: 0

imbond
imbond

Reputation: 2098

For Windows user,

Syntax: "<appengine sdk bin folder path>\appcfg" rollback "<war path of your project"

Example: "C:\Users\user\.m2\repository\com\google\appengine\appengine-java-
sdk\1.9.44\appengine-java-sdk\appengine-java-sdk-1.9.44\bin\appcfg" rollback "D:\helloworld\war"

Output of the above will be something like this,

********************************************************
There is a new version of the SDK available.
-----------
Latest SDK:
Release: 1.9.49
Timestamp: Wed Jan 18 23:03:47 IST 2017
API versions: [1.0]

-----------
Your SDK:
Release: 1.9.44
Timestamp: Sat Aug 20 03:11:38 IST 2016
API versions: [1.0]

-----------
Please visit https://developers.google.com/appengine/downloads for the latest SD
K.
********************************************************
Reading application configuration data...


Beginning interaction for module default...
0% Rolling back the update.
Success.
Cleaning up temporary files for module default...

Upvotes: 0

manoz
manoz

Reputation: 91

This is for java project using app engine This happens your previous deployment not successfully deployed


go to app engine sdk

C:\Program Files (x86)\Google\appengine-java-sdk-1.9.49\bin

then add

syntax: appcfg.sh rollback your project war folder

Example: appcfg.sh rollback E:myproject\war

Enough!!!

Upvotes: 0

Ruhul Amin
Ruhul Amin

Reputation: 1775

I had the same problem. I solved it using this command on mac: python /usr/local/bin/appcfg.py -verbose --no_cookies [email protected] --passin rollback directoryname

where directoryname was the folder where the app.yaml is located. For my case, it was on dropbox folder. so firstly I went to that directory using terminal then I pasted: python /usr/local/bin/appcfg.py -verbose --no_cookies [email protected] --passin app

where app defines file name app.yaml

Upvotes: 0

Elia Weiss
Elia Weiss

Reputation: 10030

On MAC - in terminal, goto where your sdk directory - /Users/user/Desktop/eclipse/plugins/com.google.appengine.eclipse.sdkbundle_1.9.20/appengine-java-sdk-1.9.20/bin

do

chmod 777 *

run

bash appcfg.sh rollback /Users/user/Desktop/builder/war

The last parameter is the location of the war inside your project

Upvotes: 0

IanGSY
IanGSY

Reputation: 3714

You can also avoid having to specify your app directory (as it doesn't seen to work for you), by specifying your app id and version in the command itself:

appcfg.py rollback -A your_app_id -V your_app_version

If you have multiple modules then you will need to specify that too with the -M switch.

Upvotes: 1

tx802
tx802

Reputation: 3564

You will probably find you don't have execute permissions on appcfg

So, if you change to your SDK directory and run

chmod 755 appcfg.sh

Then

appcfg.sh rollback <path_to_app>/war

should work. If not, you may have a WebContent directory, in which case use the path to that. Essentially, appcfg wants to see the WEB-INF directory which contains your appengine-web.xml for the module you're rolling back.

Upvotes: 0

Andrei Volgin
Andrei Volgin

Reputation: 41100

Since you are using Mac, try

appcfg.sh rollback

Upvotes: 1

Related Questions