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.
--
You received this message because you are subscribed to the Google Groups
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit
https://groups.google.com/d/msgid/google-appengine/cbd6ab99-217c-468f-866b-f7e4838b2329%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.