Google App Engine | appcfg rollback - Effective ways to Undo the transaction with appcfg rollback

Published

Did you ever felt problems while deploying my code to google Appengine ,and Deploying interrupted by power problem or connection problems?

If you are a google appengine user and using google app engine application in your computer,its the time to make a bookmark to this page. because in any time you will need to use this rollback function in google appengine.


Below is the demo of the error message you will get after you trying to deploy your code to google appengine with appcfg.py or programme.



2013-01-01 01:00:00 Running command: "['C:\\Python27\\pythonw.exe', '-u', 'C:\\Program Files\\Google\\google_appengine\\appcfg.py', '--no_cookies', u'--email=your.mail@gmail.com', '--passin', 'update', 'C:\\your-app-container-parent\\your-app-container']" 04:03 PM Host: appengine.google.com 04:03 PM Application: your-app-name; version: 1 04:03 PM Starting update of app: your-app-name, version: 1 04:03 PM Getting current resource limits. Password for your-email@gmail.com: 04:03 PM Scanning files on local disk. Error 409: --- begin server output --- Another transaction by user your-email is already in progress for app: s~your-app-name, version: 1. That user can undo the transaction with "appcfg rollback". --- end server output --- 2013-03-13 16:03:30 (Process exited with code 1) You can close this window now.
So what you will do after getting this error? probably you will open your command prompt and type "appcfg rollback".

But unfortunately,thats not enough.
Here is the solution that works.

First of all...
CHECK TIME AND DATE OF YOUR MACHINE and if it set to incorrect date, it will cause problems.


To rollback changes for google app engine in  Windows OS

Open Command prompt
To open command prompt in windows,
Windows- RUN 
OR 
Start - All programs -Accessories - Command prompt.


Copy and paste below line to command prompt

CD C:/Program Files/Google/google_appengine

and hit Enter. Command prompt will be inside the Google_appengine folder.

(To paste to command line, you can use the menu at the top left side of command prompt and select edit -> paste)

Now,  Paste below line.

appcfg.py rollback F:/way-to-/your-app-folder-/where-app.yaml-exist/

Change F:/way-to-/your-app-folder-/where-app.yaml-exist/ with the folder path where your app exist.


It will ask for your email and password. please note that it will not show your password nor *'s while you type your password. just go on with typing.

If everything is done well, it will rollback your update to GAE.
Good luck.

What about next time it happens?

If the above method worked, then I Recommend you to bookmark this page, in case if you have the same problem again, then you can just open this page from bookmarks.

If there any alternate methods available?


Yes there is. follow below steps.

Open your notepad.

Copy and paste below code to the notepad.

C:\Program Files\Google\google_appengine>appcfg.py rollback C:\your-app-container-parent\your-app-container\

Remember to type this in one line. And replace "C:\Program Files\Google\google_appengine>appcfg.py" with the path to your appcfg.py file in your computer and C:\your-app-container-parent\your-app-container\ and with the path to your App container folder.
Now Save this file as a .bat file. which will be opened in command prompt.

Double click that file once.

You are done.
From now, whenever you get the same problem by power problems or connetion problems, just double click the file.

To rollback changes for google app engine in  linux platform

Use this code in command prompt


C:\Program Files\eclipse\plugins\com.google.appengine.eclipse.sdkbundle_1.2.5.v200909021031\appengine-java-sdk-1.2.5\bin\appcfg" rollback war


Here,If you are using any other version than this, Don't forget to change the path as in your drive.


If this didn't help, please let know what have worked for you.

Comments

Post a Comment