17

上传项目时,网络出现故障,我不得不停止,上传过程仅完成 31%。现在,当我单击将应用程序部署到谷歌应用引擎时,会产生以下消息:

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

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

我打开我的 shell 提示符并在那里输入,appcfg rollback但我收到一条消息,提示找不到此命令。我已将谷歌应用程序引擎安装为 netbeans 的插件。

我保存谷歌应用引擎罐子的路径:/home/non-admin/appengine-java-sdk-1.6.6/lib/

请告诉我应该怎么做才能回滚以前的过程?我非常需要上传战争文件。!

4

11 回答 11

26

你想要appcfg.sh rollback(在 中path_to_your_app_engine_sdk/bin/)。appcfg每种运行时类型(Python、Java、Go)都有不同的变体,因此建议的命令有点通用。

如果出于某种原因,您无法轻松访问项目的整个 war 目录(例如,如果您的 IDE 只为您提供 .war 文件),您可以执行以下操作:

  1. 创建一个名为war.
  2. war文件夹中创建另一个目录并将其命名为WEB-INF.
  3. 在文件夹中WEB-INF放置两个 xml 文件,即web.xmlappengine-web.xml. 这些应该分别具有您部署的内容web.xmlappengine-web.xml文件的内容。

然后运行以下 shell 命令(假设您从binApp Engine Java SDK 的目录执行它):

[non-admin@user bin]$ ./appcfg.sh rollback /home/non-admin/NetBeansProjects/PersonalSite/web/war

If you are using the Go appengine tools, then you'll need to run:

$ cd [your go_appengine directory]
$ ./appcfg.py rollback [your app directory with app.yaml in it]
于 2012-07-26T18:28:32.270 回答
18

If you are using windows, follow the same steps given above and run command in DOS prompt..

C:\eclipse-jee-helios-win32\eclipse\plugins\com.google.appengine.eclipse.sdkbund le_1.7.3\appengine-java-sdk-1.7.3\bin> appcfg.cmd rollback "C:\home\myweb\war"

于 2013-01-16T08:58:08.447 回答
13

Another easy way is given below:

  1. to change the version number in app.yaml...
  2. then deploy new version,
  3. and finally delete the old version via google app engine webform

Edit:

to answer dg99's question: the version code you need to change is up to you (it is the version of your application)

于 2014-01-17T16:46:48.417 回答
2

This works for me!! (Win OS)

C:\eclipse-jee-helios-win32\eclipse\plugins\com.google.appengine.eclipse.sdkbund le_1.7.3\appengine-java-sdk-1.7.3\bin> appcfg.cmd rollback C:\home\myweb\war

于 2013-02-15T13:55:57.023 回答
2

If you are using eclipse & maven build envrioment, maybe you are uploading application by maven command, appengine:update, right ?

Then, when you have a problem like that "409 Conflict". You can use maven command on eclipse->project->run as->maven build...-> "appengine:rollback"

Try this. I solved problem by this way

于 2015-04-19T01:54:21.243 回答
1

After trying to rollback for a while without any success (I was prompted for user/pass endlessly ) I thought It might be because of my two phase/factor authentication,

So the following way solved it all:

  1. open command prompt (cmd.exe) in D:\Java\eclipse\plugins\com.google.appengine.eclipse.sdkbundle_1.8.3\appengine-java-sdk-1.8.3\bin> (or look for the location of your appcfg.cmd somewhere else)

  2. type in: appcfg.cmd --oauth2 rollback D:/Java/workspace/my_app/war

  3. Then I was prompted with oauth2 token in my browser , did copy and got back to the cmd than paste

  4. That's it! Deploy to App Engine works again!

于 2013-11-19T21:32:00.473 回答
1

Use this for backends developed in Android Studio:

cd project_path/project_name/module_name/src/main
appcfg.sh rollback webapp
于 2015-01-15T17:45:27.783 回答
1

For me the following worked fine out of the development directory where my app.yaml was located.

appcfg.py rollback .

I'm using the Python SDK though, might be different for Java since the <app-directory> is called <war-location> there.

于 2015-02-24T10:52:15.157 回答
0

Here are the steps to be followed for rollback in windows 7 using command prompt:

1) first set the environment variale for python.(so that command "python" is accepted by the command prompt).

2) then type: "python" give_space "path to appcfg.py file" give_space "rollback" give_space "path to your project".(PLease note you should specify your paths within inverted commas).

于 2014-06-01T14:56:15.503 回答
0

When you are using Maven then appengine:rollback command works. This works even when it is an Eclipse Maven project.

To roll back in Eclipse Maven follow this process -

Run -> Build -> Goals (appengine:rollback) -> Apply -> Run

于 2016-05-11T17:38:12.457 回答
0

Can confirm as some of the answers clarified above.

If you use mvn appengine:update to deploy, you can use mvn appengine:rollback to do the rollback.

于 2016-09-13T11:48:25.997 回答