GoogleCloudPlatform / gcloud-maven-plugin

Cloud SDK Maven Plugin for Google App Engine (Managed VMs and non Managed VMs)
Apache License 2.0
29 stars 24 forks source link

mvn gcloud:deploy failed at this step (Failed to generate quickstart-web.xml.) #39

Closed suttiwat closed 8 years ago

suttiwat commented 9 years ago

Hi

Before yesterday (17 Aug 2015), I use maven plugin version 0.9.56.v20150415a, it's okay work well since 14 April 2015. But yesterday, I can't perform mvn gcloud:deploy anymore, it told me error something. So I decide to upgrade plugin version to 2.0.9.72.v20150804 (And I also tried with latest one - same result). And I run the same procedure again to deploy to production.

It failed at this step [INFO] Running appcfg --enable_quickstart --disable_update_check -A notused stage /Users/rMBP-SUTTIWAT/Google Drive/Development/EclipseDev/wat/wat-batch/target/wat-batch-0.0.1-SNAPSHOT /var/folders/qm/bf22dtkx6hn419d6m169d0zr0000gn/T/1439866971292-0 Reading application configuration data...

(then successful to read 2 xml file)

(and stop here) Beginning interaction for module wat-batch... Unable to stage app: Failed to generate quickstart-web.xml. Please see the logs [/var/folders/qm/bf22dtkx6hn419d6m169d0zr0000gn/T/appcfg1814661144841613477.log] for further information.


And here is partial part of stacktrace ... Unable to stage: java.lang.RuntimeException: Failed to generate quickstart-web.xml. at com.google.appengine.tools.admin.Application.createQuickstartWebXml(Application.java:1330) at com.google.appengine.tools.admin.Application.populateStagingDirectory(Application.java:695) at com.google.appengine.tools.admin.Application.createStagingDirectory(Application.java:655) at com.google.appengine.tools.admin.AppAdminImpl.stageApplication(AppAdminImpl.java:532) at com.google.appengine.tools.admin.AppAdminImpl.stageApplicationWithDefaultResourceLimits(AppAdminImpl.java:485) at com.google.appengine.tools.admin.AppCfg$StagingAction.execute(AppCfg.java:2385) at com.google.appengine.tools.admin.AppCfg.executeAction(AppCfg.java:345) at com.google.appengine.tools.admin.AppCfg.(AppCfg.java:222) at com.google.appengine.tools.admin.AppCfg.(AppCfg.java:126) at com.google.appengine.tools.admin.AppCfg.main(AppCfg.java:122)


This is my gcloud info

Suttiwats-MacBook-Pro:wat-batch rMBP-SUTTIWAT$ gcloud info Google Cloud SDK [0.9.73]

Platform: [Mac OS X, x86_64] Python Version: [2.7.10 (default, Jul 14 2015, 19:46:27) [GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.39)]] Site Packages: [Disabled]

Installation Root: [/Users/rMBP-SUTTIWAT/SDK/google-cloud-sdk] Installed Components: core: [2015.08.10] app-engine-python: [1.9.24] core-nix: [2015.06.02] app: [2015.08.10] gcloud: [2015.08.10] gsutil-nix: [4.12] gsutil: [4.13] bq: [2.0.18] preview: [2015.08.10] app-engine-java: [1.9.24] bq-nix: [2.0.18] System PATH: [/Users/rMBP-SUTTIWAT/Library/Developer/Xcode/DerivedData/ServiceGenerator-euescrymvkxicqbqkdxuhxqsdtao/Build/Products/Debug:/Users/rMBP-SUTTIWAT/SDK/gae-current-bin:/Users/rMBP-SUTTIWAT/SDK/google-cloud-sdk/bin:/Users/rMBP-SUTTIWAT/SDK/apache-maven-3.2.1/bin:/Applications/Firefox.app/Contents/MacOS/:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin] Cloud SDK on PATH: [True]

Installation Properties: [/Users/rMBP-SUTTIWAT/SDK/google-cloud-sdk/properties] User Config Directory: [/Users/rMBP-SUTTIWAT/.config/gcloud] User Properties: [/Users/rMBP-SUTTIWAT/.config/gcloud/properties] Current Workspace: [None] Workspace Config Directory: [None] Workspace Properties: [None]


Remark: I've tried to use latest release by setting export CLOUDSDK_COMPONENT_MANAGER_SNAPSHOT_URL=https://dl.google.com/dl/cloudsdk/release/components-v0.9.73.json and gcloud components update . I've found at 0.9.73 but not found 0.9.74

Any suggestion to workaround on this? Thanks.

suttiwat commented 9 years ago

OK. I found the workaround by myself already.

At https://github.com/GoogleCloudPlatform/gcloud-maven-plugin/blob/master/src/main/java/com/google/appengine/gcloudapp/AbstractGcloudMojo.java Line#552-554

if (getAppEngineWebXml(appDir).getBetaSettings().containsKey("java_quickstart")) {
  arguments.add("--enable_quickstart");

It's just check that in appengine-web.xml has key 'java_quickstart' or not. If have this key, it will use option "--enable_quickstart" by default. It ignore the value of key 'java_quickstart' that I specify true or false. So if have this key, it's alway --enable_quickstart

So I remove this key 'java_quickstart' out of appengine-web.xml, now I can run mvn gcloud:deploy as usual.

But, this is just workaround to allow me put deploy to production by removing this capability.

I 'm still need you to fix the problem I described earlier -- Unable to stage app: Failed to generate quickstart-web.xml. -- I think there is something wrong in method -- createQuickstartWebXml(ApplicationProcessingOptions opts) in sourcecode: https://code.google.com/p/googleappengine/source/browse/trunk/java/src/main/com/google/appengine/tools/admin/Application.java?r=523

What do you think?

loosebazooka commented 9 years ago

Were you planning on using quickstart at all? What does the log file say when generating quickstart fails?

ludoch commented 9 years ago

Fix will be in the next release this week. We need to check for false or true, and not only the presence of the field.

suttiwat commented 9 years ago

Hi Ludoch:

In case you fixed the logic to check true|false of key 'java_quickstart' already. I think if I specified "true" , the original problem still persisted. The error message "Unable to stage app: Failed to generate quickstart-web.xml" will be found during mvn gcloud:deploy execution. What do you think?

@loosebazooka : Actually, I will not used java_quickstart. But it's in the sample config file of managed-vm. Here below is error message ...

Unable to stage: java.lang.RuntimeException: Failed to generate quickstart-web.xml.

at com.google.appengine.tools.admin.Application.createQuickstartWebXml(Application.java:1330) at com.google.appengine.tools.admin.Application.populateStagingDirectory(Application.java:695) at com.google.appengine.tools.admin.Application.createStagingDirectory(Application.java:655) at com.google.appengine.tools.admin.AppAdminImpl.stageApplication(AppAdminImpl.java:532) at com.google.appengine.tools.admin.AppAdminImpl.stageApplicationWithDefaultResourceLimits(AppAdminImpl.java:485) at com.google.appengine.tools.admin.AppCfg$StagingAction.execute(AppCfg.java:2385) at com.google.appengine.tools.admin.AppCfg.executeAction(AppCfg.java:345) at com.google.appengine.tools.admin.AppCfg.(AppCfg.java:222) at com.google.appengine.tools.admin.AppCfg.(AppCfg.java:126) at com.google.appengine.tools.admin.AppCfg.main(AppCfg.java:122)

ludoch commented 8 years ago

Fixed now.