Skip to content
This repository has been archived by the owner on Feb 6, 2024. It is now read-only.

ERROR: (gcloud.app.deploy) Error Response: [9] #175

Closed
Jasper76 opened this issue Oct 20, 2017 · 3 comments
Closed

ERROR: (gcloud.app.deploy) Error Response: [9] #175

Jasper76 opened this issue Oct 20, 2017 · 3 comments

Comments

@Jasper76
Copy link

Jasper76 commented Oct 20, 2017

I'm trying to deploy my app using the command gradle appengineDeploy.

Deploying seems to succeed but after that I'm getting in the title of this issue.
I've tried several things by searching on the internet but the error remains. I've looked in the app engine and after deployment the app is there and when I try to start it, it doesn't work. And after a while it disappears again.

Any help would be greatly appreciated.

Here's the complete error:

Updating service [default]...
..............................................................failed.
ERROR: (gcloud.app.deploy) Error Response: [9] 
Application startup error:
Info: Limiting Java heap size to: 400M
2017-10-20 11:30:23.167:INFO::main: Logging initialized @861ms
2017-10-20 11:30:24.052:INFO:oejs.Server:main: jetty-9.3.5.v20151012
2017-10-20 11:30:24.160:INFO:oejs.AbstractNCSARequestLog:main: Opened /var/log/app_engine/request.2017_10_20.log
Oct 20, 2017 11:30:26 AM com.google.apphosting.vmruntime.VmMetadataCache getMetadata
INFO: Meta-data 'attributes/gae_affinity' path retrieval error: http://metadata/computeMetadata/v1/instance/attributes/gae_affinity
Oct 20, 2017 11:30:26 AM com.google.apphosting.vmruntime.VmMetadataCache getMetadata
INFO: Meta-data 'attributes/gae_appengine_hostname' path retrieval error: http://metadata/computeMetadata/v1/instance/attributes/gae_appengine_hostname

Here's my gradle file:

buildscript {
    repositories {
        jcenter()
        mavenCentral()
    }
    dependencies {
        classpath 'com.google.cloud.tools:appengine-gradle-plugin:1.3.3'
        classpath 'org.akhikhl.gretty:gretty:+'
    }
}

repositories {
    jcenter()
    mavenCentral()

    maven {
        url 'https://maven-central.storage.googleapis.com' 
    }
}

apply plugin: 'java'
apply plugin: 'war'
apply plugin: 'org.akhikhl.gretty'
apply plugin: 'com.google.cloud.tools.appengine'

dependencies {
    providedCompile 'javax.servlet:javax.servlet-api:3.1.0'
    providedCompile 'com.google.appengine:appengine:+'
    compile 'javax.servlet:servlet-api:2.5'
    compile 'com.google.code.gson:gson:2.4'
    compile 'com.google.cloud.sql:mysql-socket-factory:1.0.2'
    compile 'com.google.appengine:appengine:+'
    compile 'com.google.apis:google-api-services-oauth2:v1-rev136-1.23.0'
}

gretty {
    httpPort = 8080
    contextPath = '/'
    servletContainer = 'jetty9'  // What App Engine Flexible uses
}

appengine {
    deploy {   // deploy configuration
        stopPreviousVersion = false
        promote = false
    }
}

version = '7'          // Version in generated output
sourceCompatibility = 1.8
targetCompatibility = 1.8

And here's my app.yaml:

runtime: java
env: flex
version: 7
runtime_config:
  jdk: openjdk8
  server: jetty9
health_check:
  enable_health_check: False
manual_scaling:
  instances: 1
beta_settings:
      cloud_sql_instances: "xxxxxxxxxxxxxxxxxxxxx:us-central1:jigsaw"
@loosebazooka
Copy link
Contributor

@znewman01 any idea who would know?

@chanseokoh
Copy link
Contributor

chanseokoh commented Oct 20, 2017

ERROR: (gcloud.app.deploy) Error Response: [9]
Application startup error:

The error response code 9 (application startup error) is a very general error message indicating that for whatever reason, the deployed app failed to start up hence not running properly (or the VM believes so). From what you said, it looks like the app is actually deployed to the VM but after some time, the VM goes down due to the app not starting up.

Try looking at the server logs in the Cloud Console for more hints on why it's crashing.

I also see you use a rather small size of heap.

Info: Limiting Java heap size to: 400M

It is possible that your app goes down due to insufficient memory. Try adding this to your app.yaml:

resources:
  memory_gb: 2.0

However, remember that there are various reasons for your app not starting up.

@Jasper76
Copy link
Author

Jasper76 commented Oct 24, 2017

Thanks for your comment.

It turned out that I had my app.yaml in the wrong directory, so my never knew it was there. I had to place it in the main/appengine directory. I also had to delete the old appengine-web.xml. Now that my app sees the app.yaml file, it probably picked up the memory setting.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants