我用springboot创建了一个简单的微服务,并想在google云上部署,为此我创建了一个计费帐户appengine:deploy .it 显示以下错误-
[INFO] GCLOUD: ERROR: (gcloud.app.deploy) Error Response: [8] Flex operation projects/springbootmicroservices-302707/regions/asia-northeast2/operations/f958224e-d3b7-4b27-ac1d-513896ce934b error [RESOURCE_EXHAUSTED]: An internal error occurred while processing task /app-engine-flex/insert_flex_deployment/flex_create_resources>2021-01-24T07:39:53.754Z3254.hq.2: The requested amount of instances has exceeded GCE's default quota. Please see https://cloud.google.com/compute/quotas for more information on GCE resources
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 02:44 min
[INFO] Finished at: 2021-01-24T13:10:56+05:30
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.google.cloud.tools:appengine-maven-plugin:2.0.0-rc2:deploy (default-cli) on project springBoot: Flexible application deployment failed: com.google.cloud.tools.appengine.cloudsdk.process.ProcessHandlerException: com.google.cloud.tools.appengine.api.AppEngineException: Non zero exit: 1 -> [Help 1]
[ERROR] .
附录yaml
runtime: java
env: flex
runtime_config:
jdk: openjdk8
handlers:
- url: /.*
script: this field is required, but ignore.
pom.xml文件
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.4.2</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.example</groupId>
<artifactId>springBoot</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>springBoot</name>
<description>Demo project for Spring Boot</description>
<properties>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>com.google.cloud.tools</groupId>
<artifactId>appengine-maven-plugin</artifactId>
<version>2.0.0-rc2</version>
<configuration>
<deploy.projectId>springbootmicroservices-302707</deploy.projectId>
<deploy.version>03</deploy.version>
<cloudSdkHome>C:\Users\utkar\AppData\Local\Google\Cloud SDK\google-cloud-sdk</cloudSdkHome>
<cloudSdkVersion>324.0.0</cloudSdkVersion>
<!-- <appId>sample-project-vijay</appId> -->
<!-- <deployables>
<param>target/Services-0.0.1/WEB-INF/appengine-web.xml</param>
</deployables> -->
</configuration>
</plugin>
</plugins>
</build>
</project>
控制器类
@RestController
public class MainController {
@GetMapping(value = "utkarsh/details")
public Student home() {
Student s=new Student();
s.setAge(24);
s.setCompany("abc");
s.setGender("Male");
s.setLocation("Meerut");
s.setName("Utkarsh Sharma");
return s;
}
}
请解决这个问题。提前谢谢
1条答案
按热度按时间wf82jlnq1#
这是您的错误消息:
[资源\u耗尽]:处理任务/app engine flex/insert \u flex \u deployment/flex \u create \u resources>2021-01-24t07:39:53.754z3254.hq时发生内部错误。2:请求的示例数量已超过gce的默认配额。请看https://cloud.google.com/compute/quotas 有关gce资源的更多信息
我会按照这个链接,并按照步骤来检查您的配额-这将是有价值的信息,了解这个问题。