Powered by Google App Engine

Google App Engine

 

GAEのデプロイ時のエラー

GAEのデプロイ時のエラーの対応について。GAEは謎のエラーが多く、エラー内容と実際起きている事が合わない事があります。

新サイト、tree-mapsを公開しました!!

tree-maps: 地図のWEB TOOLの事ならtree-mapsにお任せ!

地図に関するWEB TOOL専門サイトです!!

大画面で大量の緯度経度を一気にプロット、ジオコーディング、DMS<->DEGの相互変換等ができます!

◯ 広告
Compiling module test.Test
   Compiling 6 permutations
      Compiling permutation 0...
      Compiling permutation 1...
      Compiling permutation 2...
      Compiling permutation 3...
      Compiling permutation 4...
      Compiling permutation 5...
   Compile of permutations succeeded
Linking into C:\Workspaces\Personal\Test\war\test.
   Link succeeded
   Compilation succeeded -- 16.828s
Creating staging directory
Scanning for jsp files.
Scanning files on local disk.
Initiating update.
Cloning 32 static files.
Cloning 56 application files.
Uploading 0 files.
Initializing precompilation...
Deploying new version.
Will check again in 1 seconds
Will check again in 2 seconds
Will check again in 4 seconds
Will check again in 8 seconds
Will check again in 16 seconds
Will check again in 32 seconds
Will check again in 60 seconds
Will check again in 60 seconds
Will check again in 60 seconds
Will check again in 60 seconds
・・・・略・・・・
Unable to update:
java.lang.RuntimeException: Version not ready.
	at com.google.appengine.tools.admin.AppVersionUpload.commit(AppVersionUpload.java:572)
	at com.google.appengine.tools.admin.AppVersionUpload.doUpload(AppVersionUpload.java:143)
	at com.google.appengine.tools.admin.AppAdminImpl.doUpdate(AppAdminImpl.java:371)
	at com.google.appengine.tools.admin.AppAdminImpl.update(AppAdminImpl.java:53)
	at com.google.appengine.eclipse.core.proxy.AppEngineBridgeImpl.deploy(AppEngineBridgeImpl.java:433)
	at com.google.appengine.eclipse.core.deploy.DeployProjectJob.runInWorkspace(DeployProjectJob.java:148)
	at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)

何もせずひたすら待ちましょう。

経験上、何度かデプロイしてみたり、アプリのバージョンを上げてみたりしても解決しません。

GAEのデプロイサーバ上で何かしらのエラーが起きていると考えられます。

このエラーが起きると大抵1日以上待たないとデプロイできない場合が多いと感じます。

------------ Deploying frontend ------------

Preparing to deploy:
	Created staging directory at: '/var/folders/tm/vrbvlk7s67b0przw2_mdqd440000gn/T/appcfg4756939559708419611.tmp'
	Scanning for jsp files.
	Compiling jsp files.
	Scanning files on local disk.
	Scanned 250 files.
	Scanned 500 files.
	Initiating update.
com.google.appengine.tools.admin.HttpIoException: Error posting to URL: https://appengine.google.com/api/appversion/create?app_id=tree-tips&version=1&
409 Conflict
Another transaction by user treeRegist is already in progress for app: s~tree-tips, version: 1. That user can undo the transaction with "appcfg rollback".


Debugging information may be found in /private/var/folders/tm/vrbvlk7s67b0przw2_mdqd440000gn/T/appengine-deploy4614958901793916992.log
Unable to update:
com.google.appengine.tools.admin.HttpIoException: Error posting to URL: https://appengine.google.com/api/appversion/create?app_id=tree-tips&version=1&
409 Conflict
Another transaction by user treeRegist is already in progress for app: s~tree-tips, version: 1. That user can undo the transaction with "appcfg rollback".

	at com.google.appengine.tools.admin.AbstractServerConnection.send1(AbstractServerConnection.java:293)
	at com.google.appengine.tools.admin.AbstractServerConnection.send(AbstractServerConnection.java:253)
	at com.google.appengine.tools.admin.AbstractServerConnection.post(AbstractServerConnection.java:232)
	at com.google.appengine.tools.admin.AppVersionUpload.send(AppVersionUpload.java:644)
	at com.google.appengine.tools.admin.AppVersionUpload.beginTransaction(AppVersionUpload.java:449)
	at com.google.appengine.tools.admin.AppVersionUpload.doUpload(AppVersionUpload.java:124)
	at com.google.appengine.tools.admin.AppAdminImpl.doUpdate(AppAdminImpl.java:371)
	at com.google.appengine.tools.admin.AppAdminImpl.update(AppAdminImpl.java:53)
	at com.google.appengine.eclipse.core.proxy.AppEngineBridgeImpl.deploy(AppEngineBridgeImpl.java:433)
	at com.google.appengine.eclipse.core.deploy.DeployProjectJob.runInWorkspace(DeployProjectJob.java:148)
	at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)

ロールバックコマンドを実行する必要があります。ロールバックするまでデプロイは成功しません。

appcfg.sh(windosの場合はappcfg.bat)の引数にrollbackとwarパスを指定します。

なお、appcfg.shに実行権限がついていないので、chmod +x *.shしましょう

appcfg.shは深い階層に配置されているので、ロールバック用のスクリプトを作成しておくと便利です。

本サイトtree-tipsでは以下のようにロールバックスクリプトを用意しています。

#!/bin/sh
APPENGINE_BIN_DIR=/Applications/eclipse/plugins/com.google.appengine.eclipse.sdkbundle_1.7.4/appengine-java-sdk-1.7.4/bin
WAR_DIR=/Applications/eclipse/workspace/tree-tips/war/
cd $APPENGINE_BIN_DIR
./appcfg.sh rollback $WAR_DIR
cd -

ロールバックを実行すると、以下のようなメッセージが表示されます。

tree-macpro:lib tree$ ./rollback_appengine_tree-tips.sh 
Reading application configuration data...
2013/02/03 23:40:46 com.google.apphosting.utils.config.AppEngineWebXmlReader readAppEngineWebXml
???: Successfully processed /Applications/eclipse/workspace/tree-tips/war/WEB-INF/appengine-web.xml
2013/02/03 23:40:46 com.google.apphosting.utils.config.AbstractConfigXmlReader readConfigXml
???: Successfully processed /Applications/eclipse/workspace/tree-tips/war/WEB-INF/web.xml
2013/02/03 23:40:46 com.google.apphosting.utils.config.AbstractConfigXmlReader readConfigXml
???: Successfully processed /Applications/eclipse/workspace/tree-tips/war/WEB-INF/queue.xml
2013/02/03 23:40:46 com.google.apphosting.utils.config.IndexesXmlReader readConfigXml
???: Successfully processed /Applications/eclipse/workspace/tree-tips/war/WEB-INF/appengine-generated/datastore-indexes-auto.xml
Beginning server interaction for tree-tips...
0%  on backend null.
Email: GAEのメールアドレス
Password for GAEのメールアドレス: GAEのパスワード
Success.
Cleaning up temporary files...
◯ 広告