spring boot deployment with gradle appengine fails

211 views
Skip to first unread message

Rares Dolga

unread,
Aug 29, 2018, 3:19:24 PM8/29/18
to Google App Engine
I tried deploying my spring boot application with appengine plugin, but it fails to deploy with error: "failed to deploy in a time when the app can become healty". When I run the app on google cloud console (./gradlew build && java -Djava.security.egd=file:/dev/./urandom -jar build/libs/engine-0.0.1-SNAPSHOT.jar) everything runs fine, however I cannot deploy it.

My build.gradle:
buildscript {
    ext
{
        springBootVersion
= '2.0.4.RELEASE'
   
}
    repositories
{
        mavenCentral
()
   
}
    dependencies
{
        classpath
("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
        classpath
("com.google.cloud.tools:appengine-gradle-plugin:1.3.0") //Added for Google App Engine
   
}
}

apply plugin
: 'java'
apply plugin
: 'eclipse'
apply plugin
: 'org.springframework.boot'
apply plugin
: 'io.spring.dependency-management'
apply plugin
: 'com.google.cloud.tools.appengine' //Added for Google App Engine

group = 'com.regulaition'
version
= '0.0.1-SNAPSHOT'
sourceCompatibility
= 1.8
description
= "engine-spring"

jar
{
    baseName
= 'engine'
    version
=  '0.0.1-SNAPSHOT'
}

repositories
{
    mavenCentral
()
}


dependencies
{
    compile
('org.springframework.boot:spring-boot-starter-web')
   
    compile
('com.google.cloud.sql:postgres-socket-factory:1.0.10')
    compile
('org.springframework.boot:spring-boot-starter-data-jpa')
    compile
('org.postgresql:postgresql')
   
//runtime 'org.liquibase:liquibase-core:3.6.1'
   
    compile files
('libs/com/regulaition/jess/6.0/jess-6.0.jar')
   
    testCompile
('org.springframework.boot:spring-boot-starter-test')
}

appengine
{
    deploy
{   // deploy configuration
        stopPreviousVersion
= true  // default - stop the current version
        promote
= true              // default - & make this the current version
       
   
}

}


When I try to deploy an empty springboot app with the same dependencies it seems to work, but when I deploy my app it fails. I would put the output of the console here, but it is too long. It is strange that it has messages like:
aef-default-20180829t214027-c88v CRON[2869]: (root) CMD (/bin/bash
/usr/share/vm_runtime/vm_check_disk_space.sh | logger -t
vm_check_disk_space
.sh)


aef
-default-20180829t214027-c88v vm_runtime_init: GAE_FULL_APP_CONTAINER=eu.gcr.io/verdant-sensor-214003/appengine

while the succesfull spring-boot app ( from  the initializer) has messages in the log that are the same as when you run a spring boot app locally:

2018-08-29 18:33:21.788  INFO 1 --- [           main]
s
.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat started on port(s):
8080 (http)

My app.yml
runtime: java
env
: flex

runtime_config
:  # Optional
  jdk
: openjdk8

handlers
:
- url: /.*
  script
: this field is required, but ignored

manual_scaling
:
  instances
: 1

I thought it is because I use Tomcat not jetty or because I use an external lib, but the empty app deploys with the gradle provided and these dependencies.
I would put the entire code, but I cannot because my coleagues want it private.

Katayoon (Cloud Platform Support)

unread,
Aug 29, 2018, 8:30:10 PM8/29/18
to Google App Engine

I recommend that you take a look at this thread in Stack Overflow which seems to be a similar case.


If the issue persists, you may post your full detailed question to Stack Overflow, using the supported Cloud tags since Google Groups are reserved for general Google Cloud Platform-end product discussions and not for technical questions.
Reply all
Reply to author
Forward
0 new messages