GoogleCloudPlatform / gradle-appengine-plugin

Gradle plugin that provides tasks for uploading, running and managing Google App Engine projects
Apache License 2.0
236 stars 60 forks source link

appengineEndpointsGetClientLibs fails consistently. #252

Closed korayucar closed 8 years ago

korayucar commented 8 years ago

Endpoint client generation related tasks fail except getDiscoveryDocs task. Seems to be a http500 error from code generation server.

Here is gradle output.

./gradlew appengineEndpointsGetClientLibs --info
Connected to daemon DaemonInfo{pid=5098, address=[394442d1-42c6-43c9-9712-6957ea3ef995 port:49546, addresses:[/0:0:0:0:0:0:0:1, /127.0.0.1]], idle=true, lastBusy=1468504726549, context=DefaultDaemonContext[uid=9d5d6271-bf19-42cc-bbd6-9180c693f55b,javaHome=/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home,daemonRegistryDir=/Users/koray2/.gradle/daemon,pid=5098,idleTimeout=10800000,daemonOpts=-XX:MaxPermSize=256m,-XX:+HeapDumpOnOutOfMemoryError,-Xmx1024m,-Dfile.encoding=UTF-8,-Duser.country=US,-Duser.language=en,-Duser.variant]}. Dispatching request Build{id=6cbad4d7-d318-44fb-8853-333df5e4c434.1, currentDir=/Users/koray2/arsiv/docker/spring}.
Received result org.gradle.launcher.daemon.protocol.BuildStarted@66273fb3 from daemon DaemonInfo{pid=5098, address=[394442d1-42c6-43c9-9712-6957ea3ef995 port:49546, addresses:[/0:0:0:0:0:0:0:1, /127.0.0.1]], idle=true, lastBusy=1468504726549, context=DefaultDaemonContext[uid=9d5d6271-bf19-42cc-bbd6-9180c693f55b,javaHome=/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home,daemonRegistryDir=/Users/koray2/.gradle/daemon,pid=5098,idleTimeout=10800000,daemonOpts=-XX:MaxPermSize=256m,-XX:+HeapDumpOnOutOfMemoryError,-Xmx1024m,-Dfile.encoding=UTF-8,-Duser.country=US,-Duser.language=en,-Duser.variant]} (build should be starting).
The client will now receive all logging from the daemon (pid: 5098). The daemon log file: /Users/koray2/.gradle/daemon/2.14/daemon-5098.out.log
Starting 2nd build in daemon [uptime: 31.351 secs, performance: 100%, no major garbage collections]
Executing build with daemon context: DefaultDaemonContext[uid=9d5d6271-bf19-42cc-bbd6-9180c693f55b,javaHome=/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home,daemonRegistryDir=/Users/koray2/.gradle/daemon,pid=5098,idleTimeout=10800000,daemonOpts=-XX:MaxPermSize=256m,-XX:+HeapDumpOnOutOfMemoryError,-Xmx1024m,-Dfile.encoding=UTF-8,-Duser.country=US,-Duser.language=en,-Duser.variant]
Starting Build
Settings evaluated using settings file '/Users/koray2/arsiv/docker/spring/settings.gradle'.
Projects loaded. Root project using build file '/Users/koray2/arsiv/docker/spring/build.gradle'.
Included projects: [root project 'EduCloudMessaging']
Evaluating root project 'EduCloudMessaging' using build file '/Users/koray2/arsiv/docker/spring/build.gradle'.
Adding docker extension
Adding docker task type
Applying docker defaults to tasks of type 'Docker'
All projects evaluated.
Selected primary task 'appengineEndpointsGetClientLibs' from project :
Tasks to be executed: [task ':appengineDownloadSdk', task ':compileJava', task ':processResources', task ':classes', task ':appengineEndpointsGetClientLibs']
In-memory cache of /Users/koray2/arsiv/docker/spring/.gradle/2.14/taskArtifacts/fileHashes.bin: Size{16}, CacheStats{hitCount=0, missCount=16, loadSuccessCount=0, loadExceptionCount=0, totalLoadTime=0, evictionCount=0}
In-memory cache of /Users/koray2/arsiv/docker/spring/.gradle/2.14/taskArtifacts/treeSnapshots.bin: Size{0}, CacheStats{hitCount=0, missCount=0, loadSuccessCount=0, loadExceptionCount=0, totalLoadTime=0, evictionCount=0}
In-memory cache of /Users/koray2/arsiv/docker/spring/.gradle/2.14/taskArtifacts/treeSnapshotUsage.bin: Size{0}, CacheStats{hitCount=0, missCount=0, loadSuccessCount=0, loadExceptionCount=0, totalLoadTime=0, evictionCount=0}
In-memory cache of /Users/koray2/arsiv/docker/spring/.gradle/2.14/taskArtifacts/fileSnapshotsToTreeSnapshotsIndex.bin: Size{0}, CacheStats{hitCount=0, missCount=0, loadSuccessCount=0, loadExceptionCount=0, totalLoadTime=0, evictionCount=0}
In-memory cache of /Users/koray2/arsiv/docker/spring/.gradle/2.14/taskArtifacts/fileSnapshots.bin: Size{1}, CacheStats{hitCount=0, missCount=1, loadSuccessCount=0, loadExceptionCount=0, totalLoadTime=0, evictionCount=0}
In-memory cache of /Users/koray2/arsiv/docker/spring/.gradle/2.14/taskArtifacts/taskArtifacts.bin: Size{2}, CacheStats{hitCount=0, missCount=2, loadSuccessCount=0, loadExceptionCount=0, totalLoadTime=0, evictionCount=0}
:appengineDownloadSdk (Thread[Daemon worker,5,main]) started.
:appengineDownloadSdk
Executing task ':appengineDownloadSdk' (up-to-date check took 0.0 secs) due to:
  Task has not declared any outputs.
:appengineDownloadSdk (Thread[Daemon worker,5,main]) completed. Took 0.005 secs.
:compileJava (Thread[Daemon worker,5,main]) started.
:compileJava
Skipping task ':compileJava' as it is up-to-date (took 0.271 secs).
:compileJava UP-TO-DATE
:compileJava (Thread[Daemon worker,5,main]) completed. Took 0.273 secs.
:processResources (Thread[Daemon worker,5,main]) started.
:processResources
file or directory '/Users/koray2/arsiv/docker/spring/src/main/resources', not found
Skipping task ':processResources' as it has no source files.
:processResources UP-TO-DATE
:processResources (Thread[Daemon worker,5,main]) completed. Took 0.001 secs.
:classes (Thread[Daemon worker,5,main]) started.
:classes
Skipping task ':classes' as it has no actions.
:classes UP-TO-DATE
:classes (Thread[Daemon worker,5,main]) completed. Took 0.0 secs.
:appengineEndpointsGetClientLibs (Thread[Daemon worker,5,main]) started.
:appengineEndpointsGetClientLibs
Executing task ':appengineEndpointsGetClientLibs' (up-to-date check took 0.001 secs) due to:
  No history is available.
App Engine SDK root = /Users/koray2/.gradle/appengine-sdk/appengine-java-sdk-1.9.38
Java classpath = /Users/koray2/.gradle/wrapper/dists/gradle-2.14-all/t7wfomcrmv8dmyii9c9waem8/gradle-2.14/lib/gradle-launcher-2.14.jar:/Users/koray2/.gradle/appengine-sdk/appengine-java-sdk-1.9.38/lib/appengine-tools-api.jar
Generating Client Libraries
Running endpoints command get-client-lib
-------------- REQUEST  --------------
POST https://webapis-discovery.appspot.com/_ah/api/discovery/v1/apis/generate/rest
Accept-Encoding: gzip
User-Agent: Google-HTTP-Java-Client/1.22.0-SNAPSHOT (gzip)
Content-Type: application/json
Content-Length: 2822

curl -v --compressed -X POST -H 'Accept-Encoding: gzip' -H 'User-Agent: Google-HTTP-Java-Client/1.22.0-SNAPSHOT (gzip)' -H 'Content-Type: application/json' -d '@-' -- 'https://webapis-discovery.appspot.com/_ah/api/discovery/v1/apis/generate/rest' << $$$
Total: 2,822 bytes
{"config":"{\n  \"extends\" : \"thirdParty.api\",\n  \"abstract\" : false,\n  \"root\" : \"https://gae-educloud.appspot.com/_ah/api\",\n  \"name\" : \"messages\",\n  \"version\" : \"v1\",\n  \"description\" : \"rest endpoint regarding message delivery\",\n  \"defaultVersion\" : false,\n  \"discovery\" : [ \"PUBLIC\" ],\n  \"adapter\" : {\n    \"bns\" : \"https://gae-educloud.appspot.com/_ah/spi\",\n    \"deadline\" : 65.0,\n    \"type\" : \"lily\"\n  },\n  \"auth\" : {\n    \"allowCookieAuth\" : false\n  },\n  \"frontendLimits\" : {\n    \"unregisteredUserQps\" : -1,\n    \"unregisteredQps\" : -1,\n    \"unregisteredDaily\" : -1,\n    \"rules\" : [ ]\n  },\n  \"cacheControl\" : {\n    \"type\" : \"no-cache\",\n    \"maxAge\" : 0\n  },\n  \"ownerDomain\" : \"korayucar.xyz\",\n  \"ownerName\" : \"Koray Uçar\",\n  \"packagePath\" : \"messages\",\n  \"methods\" : {\n    \"messages.beCoosl\" : {\n      \"path\" : \"beCool/{name}\",\n      \"httpMethod\" : \"GET\",\n      \"authLevel\" : \"NONE\",\n      \"scopes\" : [ \"https://www.googleapis.com/auth/userinfo.email\" ],\n      \"audiences\" : [ ],\n      \"clientIds\" : [ \"292824132082.apps.googleusercontent.com\" ],\n      \"rosyMethod\" : \"tr.com.educloud.endpoints.MessageEndpoint.beCool\",\n      \"request\" : {\n        \"parameters\" : {\n          \"name\" : {\n            \"type\" : \"string\",\n            \"required\" : true\n          }\n        },\n        \"body\" : \"empty\"\n      },\n      \"response\" : {\n        \"body\" : \"autoTemplate(backendResponse)\"\n      }\n    },\n    \"messages.sayHi\" : {\n      \"path\" : \"sayHi/{name}\",\n      \"httpMethod\" : \"GET\",\n      \"authLevel\" : \"NONE\",\n      \"scopes\" : [ \"https://www.googleapis.com/auth/userinfo.email\" ],\n      \"audiences\" : [ ],\n      \"clientIds\" : [ \"292824132082.apps.googleusercontent.com\" ],\n      \"rosyMethod\" : \"tr.com.educloud.endpoints.MessageEndpoint.sayHi\",\n      \"request\" : {\n        \"parameters\" : {\n          \"name\" : {\n            \"type\" : \"string\",\n            \"required\" : true\n          }\n        },\n        \"body\" : \"empty\"\n      },\n      \"response\" : {\n        \"body\" : \"autoTemplate(backendResponse)\"\n      }\n    }\n  },\n  \"descriptor\" : {\n    \"schemas\" : {\n      \"Obj\" : {\n        \"id\" : \"Obj\",\n        \"type\" : \"object\",\n        \"properties\" : {\n          \"ss\" : {\n            \"type\" : \"string\"\n          }\n        }\n      }\n    },\n    \"methods\" : {\n      \"tr.com.educloud.endpoints.MessageEndpoint.beCool\" : {\n        \"response\" : {\n          \"$ref\" : \"Obj\"\n        }\n      },\n      \"tr.com.educloud.endpoints.MessageEndpoint.sayHi\" : {\n        \"response\" : {\n          \"$ref\" : \"Obj\"\n        }\n      }\n    }\n  }\n}"}
-------------- RESPONSE --------------
HTTP/1.1 200 OK
ETag: "zRMgE0l9nVDW4S28VYYcYQF9UW4/mqtrDcW_3U-712jircsvouwk608"
Expires: Mon, 01 Jan 1990 00:00:00 GMT
X-XSS-Protection: 1; mode=block
Alternate-Protocol: 443:quic
Server: GSE
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
Alt-Svc: quic=":443"; ma=2592000; v="36,35,34,33,32,31,30,29,28,27,26,25"
Date: Thu, 14 Jul 2016 13:59:18 GMT
Vary: X-Origin
Vary: Origin
Transfer-Encoding: chunked
Content-Encoding: gzip
Content-Type: application/json; charset=UTF-8

Total: 3,193 bytes
{
 "kind": "discovery#restDescription",
 "etag": "\"zRMgE0l9nVDW4S28VYYcYQF9UW4/mqtrDcW_3U-712jircsvouwk608\"",
 "discoveryVersion": "v1",
 "id": "messages:v1",
 "name": "messages",
 "version": "v1",
 "description": "rest endpoint regarding message delivery",
 "ownerDomain": "korayucar.xyz",
 "ownerName": "Koray Uçar",
 "packagePath": "messages",
 "icons": {
  "x16": "http://www.google.com/images/icons/product/search-16.gif",
  "x32": "http://www.google.com/images/icons/product/search-32.gif"
 },
 "protocol": "rest",
 "baseUrl": "https://gae-educloud.appspot.com/_ah/api/messages/v1/",
 "basePath": "/_ah/api/messages/v1/",
 "rootUrl": "https://gae-educloud.appspot.com/_ah/api/",
 "servicePath": "messages/v1/",
 "batchPath": "batch",
 "parameters": {
  "alt": {
   "type": "string",
   "description": "Data format for the response.",
   "default": "json",
   "enum": [
    "json"
   ],
   "enumDescriptions": [
    "Responses with Content-Type of application/json"
   ],
   "location": "query"
  },
  "fields": {
   "type": "string",
   "description": "Selector specifying which fields to include in a partial response.",
   "location": "query"
  },
  "key": {
   "type": "string",
   "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.",
   "location": "query"
  },
  "oauth_token": {
   "type": "string",
   "description": "OAuth 2.0 token for the current user.",
   "location": "query"
  },
  "prettyPrint": {
   "type": "boolean",
   "description": "Returns response with indentations and line breaks.",
   "default": "true",
   "location": "query"
  },
  "quotaUser": {
   "type": "string",
   "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.",
   "location": "query"
  },
  "userIp": {
   "type": "string",
   "description": "IP address of the site where the request originates. Use this if you want to enforce per-user limits.",
   "location": "query"
  }
 },
 "auth": {
  "oauth2": {
   "scopes": {
    "https://www.googleapis.com/auth/userinfo.email": {
     "description": "View your email address"
    }
   }
  }
 },
 "schemas": {
  "Obj": {
   "id": "Obj",
   "type": "object",
   "properties": {
    "ss": {
     "type": "string"
    }
   }
  }
 },
 "methods": {
  "beCoosl": {
   "id": "messages.beCoosl",
   "path": "beCool/{name}",
   "httpMethod": "GET",
   "parameters": {
    "name": {
     "type": "string",
     "required": true,
     "location": "path"
    }
   },
   "parameterOrder": [
    "name"
   ],
   "response": {
    "$ref": "Obj"
   },
   "scopes": [
    "https://www.googleapis.com/auth/userinfo.email"
   ]
  },
  "sayHi": {
   "id": "messages.sayHi",
   "path": "sayHi/{name}",
   "httpMethod": "GET",
   "parameters": {
    "name": {
     "type": "string",
     "required": true,
     "location": "path"
    }
   },
   "parameterOrder": [
    "name"
   ],
   "response": {
    "$ref": "Obj"
   },
   "scopes": [
    "https://www.googleapis.com/auth/userinfo.email"
   ]
  }
 }
}

-------------- REQUEST  --------------
POST https://google-api-client-libraries.appspot.com/generate
Accept-Encoding: gzip
User-Agent: Google-HTTP-Java-Client/1.22.0-SNAPSHOT (gzip)
Content-Type: multipart/form-data; boundary=----GoogleApisClientBoundary1468504758951
Content-Length: 3521

curl -v --compressed -X POST -H 'Accept-Encoding: gzip' -H 'User-Agent: Google-HTTP-Java-Client/1.22.0-SNAPSHOT (gzip)' -H 'Content-Type: multipart/form-data; boundary=----GoogleApisClientBoundary1468504758951' -d '@-' -- 'https://google-api-client-libraries.appspot.com/generate' << $$$
Total: 3,521 bytes
------GoogleApisClientBoundary1468504758951
Content-Disposition: form-data; name="lang"

java
------GoogleApisClientBoundary1468504758951
Content-Disposition: form-data; name="content"

{
 "kind": "discovery#restDescription",
 "etag": "\"zRMgE0l9nVDW4S28VYYcYQF9UW4/mqtrDcW_3U-712jircsvouwk608\"",
 "discoveryVersion": "v1",
 "id": "messages:v1",
 "name": "messages",
 "version": "v1",
 "description": "rest endpoint regarding message delivery",
 "ownerDomain": "korayucar.xyz",
 "ownerName": "Koray Uçar",
 "packagePath": "messages",
 "icons": {
  "x16": "http://www.google.com/images/icons/product/search-16.gif",
  "x32": "http://www.google.com/images/icons/product/search-32.gif"
 },
 "protocol": "rest",
 "baseUrl": "https://gae-educloud.appspot.com/_ah/api/messages/v1/",
 "basePath": "/_ah/api/messages/v1/",
 "rootUrl": "https://gae-educloud.appspot.com/_ah/api/",
 "servicePath": "messages/v1/",
 "batchPath": "batch",
 "parameters": {
  "alt": {
   "type": "string",
   "description": "Data format for the response.",
   "default": "json",
   "enum": [
    "json"
   ],
   "enumDescriptions": [
    "Responses with Content-Type of application/json"
   ],
   "location": "query"
  },
  "fields": {
   "type": "string",
   "description": "Selector specifying which fields to include in a partial response.",
   "location": "query"
  },
  "key": {
   "type": "string",
   "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.",
   "location": "query"
  },
  "oauth_token": {
   "type": "string",
   "description": "OAuth 2.0 token for the current user.",
   "location": "query"
  },
  "prettyPrint": {
   "type": "boolean",
   "description": "Returns response with indentations and line breaks.",
   "default": "true",
   "location": "query"
  },
  "quotaUser": {
   "type": "string",
   "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.",
   "location": "query"
  },
  "userIp": {
   "type": "string",
   "description": "IP address of the site where the request originates. Use this if you want to enforce per-user limits.",
   "location": "query"
  }
 },
 "auth": {
  "oauth2": {
   "scopes": {
    "https://www.googleapis.com/auth/userinfo.email": {
     "description": "View your email address"
    }
   }
  }
 },
 "schemas": {
  "Obj": {
   "id": "Obj",
   "type": "object",
   "properties": {
    "ss": {
     "type": "string"
    }
   }
  }
 },
 "methods": {
  "beCoosl": {
   "id": "messages.beCoosl",
   "path": "beCool/{name}",
   "httpMethod": "GET",
   "parameters": {
    "name": {
     "type": "string",
     "required": true,
     "location": "path"
    }
   },
   "parameterOrder": [
    "name"
   ],
   "response": {
    "$ref": "Obj"
   },
   "scopes": [
    "https://www.googleapis.com/auth/userinfo.email"
   ]
  },
  "sayHi": {
   "id": "messages.sayHi",
   "path": "sayHi/{name}",
   "httpMethod": "GET",
   "parameters": {
    "name": {
     "type": "string",
     "required": true,
     "location": "path"
    }
   },
   "parameterOrder": [
    "name"
   ],
   "response": {
    "$ref": "Obj"
   },
   "scopes": [
    "https://www.googleapis.com/auth/userinfo.email"
   ]
  }
 }
}

------GoogleApisClientBoundary1468504758951
Content-Disposition: form-data; name="layout"

gradle
------GoogleApisClientBoundary1468504758951
-------------- RESPONSE --------------
HTTP/1.1 500 Internal Server Error
X-Cloud-Trace-Context: da451e600727f4473e375162c9e82619
Alt-Svc: quic=":443"; ma=2592000; v="36,35,34,33,32,31,30,29,28,27,26,25"
Date: Thu, 14 Jul 2016 13:59:19 GMT
Content-Length: 0
Alternate-Protocol: 443:quic
Content-Type: text/html; charset=utf-8
Server: Google Frontend
Cache-Control: no-cache

Done running endpoints command get-client-lib
:appengineEndpointsGetClientLibs FAILED
:appengineEndpointsGetClientLibs (Thread[Daemon worker,5,main]) completed. Took 1.39 secs.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':appengineEndpointsGetClientLibs'.
> There was an error running endpoints command get-client-lib: 500 Internal Server Error

* Try:
Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output.

BUILD FAILED

Total time: 2.888 secs
Stopped 0 compiler daemon(s).
Received result Failure[value=org.gradle.initialization.ReportedException: org.gradle.internal.exceptions.LocationAwareException: Execution failed for task ':appengineEndpointsGetClientLibs'.] from daemon DaemonInfo{pid=5098, address=[394442d1-42c6-43c9-9712-6957ea3ef995 port:49546, addresses:[/0:0:0:0:0:0:0:1, /127.0.0.1]], idle=true, lastBusy=1468504726549, context=DefaultDaemonContext[uid=9d5d6271-bf19-42cc-bbd6-9180c693f55b,javaHome=/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home,daemonRegistryDir=/Users/koray2/.gradle/daemon,pid=5098,idleTimeout=10800000,daemonOpts=-XX:MaxPermSize=256m,-XX:+HeapDumpOnOutOfMemoryError,-Xmx1024m,-Dfile.encoding=UTF-8,-Duser.country=US,-Duser.language=en,-Duser.variant]} (build should be done).
loosebazooka commented 8 years ago

I tried it and it seems to be working right now. It's possible the service is/was experiencing issues?

korayucar commented 8 years ago

The error stands for me. I conclude that server does not like my input for some reason. Does the server have an issue management to your knowledge?

loosebazooka commented 8 years ago

Oh, well I can try to find someone who works on the service if this is still affecting you. You closed the issue so I assume it isn't?

korayucar commented 8 years ago

I thought this is the wrong place to keep the issue open according to your feedback.

I kind of gave up on this. Does not worth that much effort.

Thanks for the help.