GoogleCloudPlatform / getting-started-java

https://cloud.google.com/java
Apache License 2.0
480 stars 522 forks source link

"error [13]" unable to deploy spring-boot example app #281

Closed binarygamura closed 7 years ago

binarygamura commented 7 years ago

Hi,

me and some friends just tried the spring-boot example app. But none of us were successful. I can compile and run the spring boot application locally, but when it comes to deploying to google cloud the following error appears.

[INFO] GCLOUD: latest: digest: sha256:b0715b06dbc4f5798d3849ec88d10b0f74401c33bbc3098f8e9f77405b02c7ce size: 2416 [INFO] GCLOUD: DONE [INFO] GCLOUD: -------------------------------------------------------------------------------- [INFO] GCLOUD: [INFO] GCLOUD: Updating service [default]... [INFO] GCLOUD: .....................failed. [INFO] GCLOUD: ERROR: (gcloud.app.deploy) Error Response: [13] Unexpected Error. () [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 01:00 min [INFO] Finished at: 2017-09-04T16:11:06+02:00 [INFO] Final Memory: 29M/322M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal com.google.cloud.tools:appengine-maven-plugin:1.3.1:deploy (default-cli) on project helloworld-springboot: Execution default-cli of goal com.google.cloud.tools:appengine-maven-plugin:1.3.1: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

I tried upgrading and downgrading the spring-boot version, installed a new version of maven (mine was outdated) but the error remains. Billing is enabled, the google sdk is the newst one. But the error is always the same.

Can you help me figure out, what I am doing wrong?

Thanks in advance,

Gamura

grzzboot commented 7 years ago

Hello! Having the exact same problem! Worked fine about a week ago and today I can't deploy even the getting-started-java/helloworld-servlet: https://github.com/GoogleCloudPlatform/getting-started-java/tree/master/helloworld-servlet

Using the latest Cloud SDK (169.0.0) and the latest appengine-maven-plugin (1.3.1).

[INFO] GCLOUD: ==== request start ==== [INFO] GCLOUD: uri: https://appengine.googleapis.com/v1/apps/ticksterimportexport/operations/36fa603b-7719-4582-967e-e65e85263d33?alt=json [INFO] GCLOUD: method: GET [INFO] GCLOUD: == headers start == [INFO] GCLOUD: Authorization: Bearer ya29.Gly9BEJMIR4laXGqP9_Xl9agt9N1eTJRFYipYyqqZE3_vdfdrivgysATwsLLuvCsroCZw-2xTXcyvukVGjWQXI6voilnV_df6xjp1rEuUuM5j_B6n2oJaeSfA5ngWw [INFO] GCLOUD: accept: application/json [INFO] GCLOUD: accept-encoding: gzip, deflate [INFO] GCLOUD: content-length: 0 [INFO] GCLOUD: user-agent: google-cloud-sdk x_Tw5K8nnjoRAqULM9PFAC2b gcloud/169.0.0 command/gcloud.app.deploy invocation-id/820def8ed71b44e092aab7cdaf02e1e0 environment/appengine-maven-plugin environment-version/1.3.1 interactive/False python/2.7.13 (Windows NT 6.1.7601) [INFO] GCLOUD: == headers end == [INFO] GCLOUD: == body start == [INFO] GCLOUD: [INFO] GCLOUD: == body end == [INFO] GCLOUD: ==== request end ==== [INFO] GCLOUD: ---- response start ---- [INFO] GCLOUD: -- headers start -- [INFO] GCLOUD: -content-encoding: gzip [INFO] GCLOUD: alt-svc: quic=":443"; ma=2592000; v="39,38,37,35" [INFO] GCLOUD: cache-control: private [INFO] GCLOUD: content-length: 588 [INFO] GCLOUD: content-location: https://appengine.googleapis.com/v1/apps/ticksterimportexport/operations/36fa603b-7719-4582-967e-e65e85263d33?alt=json [INFO] GCLOUD: content-type: application/json; charset=UTF-8 [INFO] GCLOUD: date: Tue, 05 Sep 2017 10:27:14 GMT [INFO] GCLOUD: server: ESF [INFO] GCLOUD: status: 200 [INFO] GCLOUD: transfer-encoding: chunked [INFO] GCLOUD: vary: Origin, X-Origin, Referer [INFO] GCLOUD: x-content-type-options: nosniff [INFO] GCLOUD: x-frame-options: SAMEORIGIN [INFO] GCLOUD: x-xss-protection: 1; mode=block [INFO] GCLOUD: -- headers end -- [INFO] GCLOUD: -- body start -- [INFO] GCLOUD: { [INFO] GCLOUD: "name": "apps/ticksterimportexport/operations/36fa603b-7719-4582-967e-e65e85263d33", [INFO] GCLOUD: "metadata": { [INFO] GCLOUD: "@type": "type.googleapis.com/google.appengine.v1.OperationMetadataV1", [INFO] GCLOUD: "method": "google.appengine.v1.Versions.CreateVersion", [INFO] GCLOUD: "insertTime": "2017-09-05T10:26:55.508Z", [INFO] GCLOUD: "user": "produktion@atg.se", [INFO] GCLOUD: "target": "apps/ticksterimportexport/services/default/versions/20170905t122634", [INFO] GCLOUD: "ephemeralMessage": "Deployment failed. Attempting to cleanup deployment artifacts." [INFO] GCLOUD: }, [INFO] GCLOUD: "done": true, [INFO] GCLOUD: "error": { [INFO] GCLOUD: "code": 13, [INFO] GCLOUD: "message": "Unexpected Error. ()" [INFO] GCLOUD: } [INFO] GCLOUD: } [INFO] GCLOUD: [INFO] GCLOUD: -- body end -- [INFO] GCLOUD: total round trip time (request+response): 0.185 secs [INFO] GCLOUD: ---- response end ---- [INFO] GCLOUD: ---------------------- [INFO] GCLOUD: failed. [INFO] GCLOUD: ERROR: (gcloud.app.deploy) Error Response: [13] Unexpected Error. ()

lesv commented 7 years ago

Thanks - I'll look into this today.

JoshWidzer commented 7 years ago

My issue is similar, it would always fail when gcloud got to the 'Updating service [default]' step with error 13. As suggested in one of the stack overflow conversations, I ran with verbosity turned to debug. Here's what I got at the end:

Updating service [default]...failed. DEBUG: (gcloud.app.deploy) Error Response: [13] Unexpected Error. () Traceback (most recent call last): File "C:\Users\j\AppData\Local\Google\Cloud SDK\lib\googlecloudsdk\calliope\cli.py", line 789, in Execute resources = args.calliope_command.Run(cli=self, args=args) File "C:\Users\j\AppData\Local\Google\Cloud SDK\lib\googlecloudsdk\calliope\backend.py", line 754, in Run resources = command_instance.Run(args) File "C:\Users\j\AppData\Local\Google\Cloud SDK\lib\surface\app\deploy.py", line 64, in Run parallel_build=False) File "C:\Users\j\AppData\Local\Google\Cloud SDK\lib\googlecloudsdk\command_lib\app\deploy_util.py", line 611, in RunDeploy flex_image_build_option=flex_image_build_option) File "C:\Users\j\AppData\Local\Google\Cloud SDK\lib\googlecloudsdk\command_lib\app\deploy_util.py", line 410, in Deploy endpoints_info) File "C:\Users\j\AppData\Local\Google\Cloud SDK\lib\googlecloudsdk\api_lib\app\appengine_api_client.py", line 171, in DeployService message=message) File "C:\Users\j\AppData\Local\Google\Cloud SDK\lib\googlecloudsdk\api_lib\app\operations_util.py", line 206, in WaitForOperation sleep_ms=retry_interval) File "C:\Users\j\AppData\Local\Google\Cloud SDK\lib\googlecloudsdk\api_lib\util\waiter.py", line 266, in WaitFor sleep_ms=sleep_ms) File "C:\Users\j\AppData\Local\Google\Cloud SDK\lib\googlecloudsdk\core\util\retry.py", line 222, in RetryOnResult if not should_retry(result, state): File "C:\Users\j\AppData\Local\Google\Cloud SDK\lib\googlecloudsdk\api_lib\util\waiter.py", line 260, in _IsNotDone return not poller.IsDone(operation) File "C:\Users\j\AppData\Local\Google\Cloud SDK\lib\googlecloudsdk\api_lib\app\operations_util.py", line 131, in IsDone encoding.MessageToPyValue(operation.error))) OperationError: Error Response: [13] Unexpected Error. () ERROR: (gcloud.app.deploy) Error Response: [13] Unexpected Error. ()

aug70 commented 7 years ago

FWIW, I logged the same problem here https://github.com/googlecodelabs/feedback/issues/263 You can get the whole log file from that ticket.

asalasOW commented 7 years ago

Hello! I have the same problem! :( any ideas about of a resolution? Thanks

aronipani commented 7 years ago

Ran into the same issue, any update on the resolution.. thanks

victormlzone commented 7 years ago

Hello ... same issue for any of the Flexible Java Apps. Flexible Python apps works fine.

Your help is really appreciated.

Thanks.

SuppieRK commented 7 years ago

Can confirm, ran into this issue as well.

aronipani commented 7 years ago

Any update or workaround suggestion to get the deployment working? Thanks and regards

On Sun, Sep 10, 2017 at 11:46 PM Roman Khlebnov notifications@github.com wrote:

Can confirm, ran into this issue as well.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/GoogleCloudPlatform/getting-started-java/issues/281#issuecomment-328432520, or mute the thread https://github.com/notifications/unsubscribe-auth/ACVT8lsJGFQT19M5nLhmiW-PQZQkrVrTks5shNdHgaJpZM4PL_Dx .

-- Sent from Gmail Mobile

hanaarmi commented 7 years ago

any update? i've been really suffering due to this issue.

ankitkinra commented 7 years ago

In order to workaround this issue, please set use_deprecated_preparation using the following command: $ gcloud config set app/use_deprecated_preparation True Once the above property is set, please retry deployment.

victormlzone commented 7 years ago

Awesome. That works for me 👍 ..Thanks !

aug70 commented 7 years ago

Worked for me too! Thanks

aronipani commented 7 years ago

Worked for me too !! Thank you.

SuppieRK commented 7 years ago

Can confirm that WA worked for me as well.

binarygamura commented 7 years ago

Thanks alot! That workaround just saved my day.

binarygamura commented 7 years ago

Hm, this is weird. The deployment seems to work now even without setting the property. Can someone confirm this?

ghost commented 7 years ago

The W/A is still failing for me: gcloud config list app/use_deprecated_preparation [app] use_deprecated_preparation = True

mvn appengine:deploy [INFO] GCLOUD: ERROR: (gcloud.app.deploy) Error Response: [13] Unexpected Error. ()

victormlzone commented 7 years ago

@bcidxx , your command is wrong. It should be:

gcloud config set app/use_deprecated_preparation True

ghost commented 7 years ago

@victormlzone - sorry, i was just listing it to verify I did in fact set that property and still have troubles.

victormlzone commented 7 years ago

@bcidxx , are you running the spring-boot example?...it works for me. Also try running without the WA..some users are reporting no WA is needed anymore.

Regards

jabubake commented 7 years ago

Hi if you are using the latest gcloud version : https://cloud.google.com/sdk/docs/#install_the_latest_cloud_tools_version_cloudsdk_current_version you should n't need this workaround. Please re-open if you run into issues.

chrisjenx commented 7 years ago

I'm having issues today trying to deploy with this exact issue. Even if it doesn't throw the above error the instance never responds. @jabubake

jabubake commented 7 years ago

Have you looked at the Logs via the Google Cloud Console ? Can you post the errors you are receiving on trying to access your service ?

DanPride commented 6 years ago

I am getting this error non stop, config set app/use_deprecated_preparation True did not work, and I am on version 183.0.0 beta 15 config set app/use_deprecated_preparation True Did not work

Updating service [default]...failed.                                           
ERROR: (gcloud.app.deploy) Error Response: [13] An internal error occurred.
david-pc:Solomon dp$ gcloud -v
Google Cloud SDK 183.0.0
beta 2017.09.15
bq 2.0.27
core 2017.12.08
gsutil 4.28
baole commented 6 years ago

Latest SDK doesn't help

gcloud version


Google Cloud SDK 186.0.0
app-engine-java 1.9.60
app-engine-python 1.9.65
bq 2.0.28
core 2018.01.22
gsutil 4.28
kubectl 

Updating service [default] (this may take several minutes)... ....................failed. ERROR: (gcloud.app.deploy) Error Response: [13] Error creating Deployment Manager deployment, status: 1, error: Couldn't write to the url [https://storage.googleapis.com/[redacted].appspot.com/us-central1_aef-default-j01--2e23f74.metadata] :appengineDeploy FAILED

FAILURE: Build failed with an exception.

manuca commented 6 years ago

Same issue here:

gcloud version:

Google Cloud SDK 188.0.1
alpha 2017.09.15
beta 2017.09.15
bq 2.0.28
core 2018.02.08
gcloud 
gsutil 4.28
kubectl 
Updating service [default] (this may take several minutes)...failed.                                                                                                             
ERROR: (gcloud.app.deploy) Error Response: [13] An internal error occurred during deployment.
dustedrob commented 6 years ago

Just ran into the same issue. Cannot deploy. The workaround doesn't work. Edit: Fixed it by correcting an incorrect servlet mapping.

econdie commented 6 years ago

This just started happening to me in the last hour, while it was working fine for me this morning. ERROR: (gcloud.app.deploy) Error Response: [13] An internal error occurred.

I was on 188.0.1 and tried upgrading to 189.0.0 to see if that would help but it doesn't. It has been happening to me for the last hour 100% of the time.

Edit: google just posted a status saying they are having issues so my problem is likely related to that: https://status.cloud.google.com/incident/appengine/18003

dustedrob commented 6 years ago

@econdie several Google Cloud services seem to be down right now https://status.cloud.google.com/ BTW it seems that this is a pretty generic error code. I managed to fix it in my deploy by changing an incorrect servlet mapping. Hope that helps.

dzlier-gcp commented 6 years ago

Just tried recreating and was able to deploy successfully using

Google Cloud SDK 189.0.0
app-engine-java 1.9.62
app-engine-python 1.9.66
beta 2017.09.15
bq 2.0.29
core 2018.02.12
gsutil 4.28
kubectl

I will investigate further to see what might be going on.

dzlier-gcp commented 6 years ago

Those GCloud service outages seem to have been resolved around 2:00 PST. Please try again and comment if you are still having issues.

calebjmatthews commented 6 years ago

I'm running into this issue now, with:

Google Cloud SDK 189.0.0
beta 2017.09.15
bq 2.0.29
core 2018.02.12
gsutil 4.28
dzlier-gcp commented 6 years ago

@calebjmatthews What operating system are you on, and what version of Maven are you using?

Thanks, DZ

calebjmatthews commented 6 years ago

Apologies if I'm posting to the wrong thread; I'm using Windows 10, but I don't believe I'm using Maven at all. The error I'm seeing is:

Updating service [default] (this may take several minutes)...failed.
ERROR: (gcloud.app.deploy) Error Response: [13] An internal error occurred during deployment.
dzlier-gcp commented 6 years ago

What is the command or process you use to deploy the application?

calebjmatthews commented 6 years ago

I use gcloud app deploy. My app.yaml is as follows:

runtime: nodejs
env: flex

env_variables:
  NODE_ENV: 'production'
  DATA_BACKEND: 'cloudsql'
  MYSQL_USER: [ROOT]
  MYSQL_PASSWORD: [MYSQL PASSWORD]
  DB_NAME: [DB NAME]
  DEV_HOST: '127.0.0.1'
  PROD_HOST: 'localhost'
  DIALECT: 'mysql'
  GOOGLE_APPLICATION_CREDENTIALS: [PATH TO KEY]
  SCRIPT: 'dist/server/app.js'

health_check:
  enable_health_check: True
  check_interval_sec: 10
  timeout_sec: 8
  unhealthy_threshold: 3
  healthy_threshold: 2

beta_settings:
 cloud_sql_instances: writer-ly:us-central1:writerly=tcp:3306

The parameters in [BRACKETS] are filled in appropriately in the actual file.

dzlier-gcp commented 6 years ago

gcloud app works for other languages, but currently the practice to deploy java apps is to use the Maven plugin with mvn appengine:deploy. Please try that and let me know if it works.

calebjmatthews commented 6 years ago

The app I'm trying to deploy is actually written in node, rather than Java.

dzlier-gcp commented 6 years ago

Ah, in that case gcloud app should work, but this is definitely the wrong issue and repository. Please take a look at the issues in GoogleCloudPlatform/nodejs-getting-started, and if there isn't one relevant to what you're seeing, create a new one.

Thanks DZ

calebjmatthews commented 6 years ago

Apologies for posting in the wrong place, and thank you for the help!

dsignr commented 6 years ago

I was hit by this issue today, pulled my hair out for straight six hours. I got a different error message, albeit with the same code:

Updating service [default] (this may take several minutes)...failed.           
ERROR: (gcloud.app.deploy) Error Response: [13] App Engine Flex failed to configure resources.

I can confirm that the following command is what did the trick for me.

gcloud config set app/use_deprecated_preparation True

In addition, I had to remove these entries from my app.yaml:

manual_scaling:
  instances: 1

I also had to remove entries that disabled health checks to get it to work, but I can't confirm yet if this is also really a cause.

Solutions tried, but didn't work:

  1. Updated gcloud cli components as mentioned in this thread.
  2. Enabled billing (converted to a paid account).
  3. Tried creating a new project.

Funny thing is, I just had it enough with AWS's Elastic Beanstalk and switched to GCloud, and was hit with this..for straight 6 hours. (Still, I think the experience is far superior).

If it helps, I'm deploying a Elixir/Phoenix application with the Elixir runtime.

dzlier-gcp commented 6 years ago

Hi @dsignr, sorry to hear about the difficulties in getting set up. I had a similar experience with my own app on GCP (also migrating from AWS) before I even joined Google, so I know what it's like.

Strange that you still needed to set the app/use_deprecated_preparation config value even with up-to-date gcloud cli. I will follow up with @jabubake to see what she knows about this.

I also believe I read that the manual_scaling setting is being phased out, but let me confirm that.

Let us know if you have any further difficulties.

Best, DZ

azariah001 commented 6 years ago

This is still an issue. Updated gcloud cli today and am using the "fix": gcloud config set app/use_deprecated_preparation True. About to try removing the manual instance scaling as suggested by @dsignr.

hlolli commented 6 years ago

I got this error, previously deploying worked and I changed no config.

File upload done.
Updating service [default]...failed.                                   
ERROR: (gcloud.app.deploy) Error Response: [13] An internal error occurred.

Annoying is that, this error tells me nothing what went wrong. Version:

Google Cloud SDK 206.0.0
bq 2.0.34
core 2018.06.18
gsutil 4.32
dsignr commented 6 years ago

@hlolli I believe this may be a temporary bug as I was also hit with this yesterday briefly and subsequent deploys succeeded.

@dzlier-gcp Thank you!

hlolli commented 6 years ago

Yes, I noticed that it actually deploys despite the error. Just had to click migrate traffic myself in the webconsole to activate the new deployment.

andrewcashmore commented 6 years ago

Getting ERROR: (gcloud.app.deploy) Error Response: [13] An internal error occurred. whilst trying to setup a new deploy today...literally at a dead end now and frustrated

chrisjenx commented 6 years ago

@andrewcashmore try running with --debug or --stacktrace

andrewcashmore commented 6 years ago

Thanks Chris, doing that now!