GAE / Java8 trial (Part 6: "Deployment failure")

theme

When I tried to deploy to GAE after a long time, it failed. The cause is simple, because I disabled the GAE application in the settings, but for the time being, I will leave it as a memorandum. There are various reasons why mvn appengine: deploy fails (I encountered this case and when I was writing an empty deployment yaml), and some of the causes are difficult to understand from the error message. So, I think it's better to keep the ones that I was particularly addicted to and took time to solve. I'm glad that this case was at a level where I could immediately see the error message. .. ..

GAE Trial Index

-GAE / Java8 trial (No. 0: "About App Engine") -GAE / Java8 trial (Part 1: "Create and deploy a web application with Java8") -GAE / Java8 trial (Part 2: "Java application explanation") -GAE / Java8 trial (Part 3: "Java application test code explanation") -GAE / Java8 trial (4: "Access logic to Datastore") -GAE / Java8 trial (5: "console for local development")

Development environment

OS

$ cat /etc/os-release 
NAME="Ubuntu"
VERSION="17.10 (Artful Aardvark)"

Java

$ java -version
java version "1.8.0_181"
Java(TM) SE Runtime Environment (build 1.8.0_181-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.181-b13, mixed mode)

IDE

Everyone loves IntelliJ IDEA

Main subject

Deployment failed

$ mvn appengine:deploy
[INFO] Scanning for projects...
[WARNING] The project com.example.sky0621:sky0621:war:1.0-SNAPSHOT uses prerequisites which is only intended for maven-plugin projects but not for non maven-plugin projects. For such purposes you should use the maven-enforcer-plugin. See https://maven.apache.org/enforcer/enforcer-rules/requireMavenVersion.html
[INFO] 
[INFO] ------------------------------------------------------------------------
[INFO] Building sky0621 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] >>> appengine-maven-plugin:1.3.2:deploy (default-cli) > package @ sky0621 >>>
[INFO] 
[INFO] --- maven-enforcer-plugin:1.4.1:enforce (enforce-maven) @ sky0621 ---
[INFO] 

・
・
・

[INFO] GCLOUD: Temporary staging for module default directory left in /work/src/java/github.com/sky0621/java-webapi-for-gae-study/sky0621/target/appengine-staging
11 01, 2018 9:07:38 am com.google.cloud.tools.appengine.cloudsdk.CloudSdk logCommand
information: submitting command: /home/koge/download/google-cloud-sdk/bin/gcloud app deploy
[INFO] GCLOUD: ERROR: (gcloud.app.deploy) Unable to deploy to application [[Deployment project ID]] with status [USER_DISABLED]: Deploying to stopped apps is not allowed.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 12.753 s
[INFO] Finished at: 2018-11-01T09:07:41+09:00
[INFO] Final Memory: 22M/261M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.google.cloud.tools:appengine-maven-plugin:1.3.2:deploy (default-cli) on project sky0621: Execution default-cli of goal com.google.cloud.tools:appengine-maven-plugin:1.3.2:deploy failed: Non zero exit: 1 -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException

[INFO] GCLOUD: ERROR: (gcloud.app.deploy) Unable to deploy to application [[Deployment destination project ID]] with status [USER_DISABLED]: Deploying to stopped apps is not allowed. So, it is said that it is in a state where it can not be deployed to GAE with (own) settings.

GAE app activation

It was disabled, so try "Enable in Settings".

screenshot-console.cloud.google.com-2018-11-01-09-18-08-530.png screenshot-console.cloud.google.com-2018-11-01-09-21-52-059.png screenshot-console.cloud.google.com-2018-11-01-09-22-44-523.png

Yes, resurrection.

screenshot-console.cloud.google.com-2018-11-01-09-23-48-078.png

Redeploy

When you run mvn appengine: deploy again, the deployment is successful as shown in ↓.

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 33.471 s
[INFO] Finished at: 2018-11-01T09:24:51+09:00
[INFO] Final Memory: 22M/261M
[INFO] ------------------------------------------------------------------------

Confirm that the GAE app is also set to distribute traffic to the service.

screenshot-console.cloud.google.com-2018-11-01-09-28-34-840.png

Recommended Posts

GAE / Java8 trial (Part 6: "Deployment failure")
GAE / Java8 trial (Part 5: "Console for local development")
java practice part 1
Studying Java ~ Part 8 ~ Cast
Express failure in Java
45 Java Performance Optimization Techniques (Part 1)
Java and Iterator Part 1 External Iterator
Apache Hadoop and Java 9 (Part 1)