Google云上的Spring Boot微服务部署问题
我已经使用spring boot创建了一个简单的微服务,并希望在google云上部署,为此我创建了一个计费帐户。但是当我尝试使用appengine:deploy将微服务部署到google云时,它显示以下错误-Google云上的Spring Boot微服务部署问题,spring,spring-boot,google-app-engine,google-cloud-platform,Spring,Spring Boot,Google App Engine,Google Cloud Platform,我已经使用spring boot创建了一个简单的微服务,并希望在google云上部署,为此我创建了一个计费帐户。但是当我尝试使用appengine:deploy将微服务部署到google云时,它显示以下错误- [INFO] GCLOUD: ERROR: (gcloud.app.deploy) Error Response: [8] Flex operation projects/springbootmicroservices-302707/regions/asia-northeast2/oper
[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] .
app.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>
请解决此问题。请提前感谢这是您的错误消息: [资源耗尽]:处理任务/app engine flex/insert_flex_deployment/flex_create_resources>2021-01-24T07:39:53.754Z3254.hq时发生内部错误。2:请求的实例数量已超过GCE的默认配额。有关GCE资源的更多信息,请参阅
我将遵循该链接并遵循步骤-这将是了解问题的重要信息。这是您的错误消息: [资源耗尽]:处理任务/app engine flex/insert_flex_deployment/flex_create_resources>2021-01-24T07:39:53.754Z3254.hq时发生内部错误。2:请求的实例数量已超过GCE的默认配额。有关GCE资源的更多信息,请参阅
我将遵循该链接并遵循步骤-这将是了解问题的有价值的信息。我检查了显示极限1000和使用量0的配额。您是否尝试将
实例类:F1
添加到app.yaml以使用小型机器开始@UtkarshSharma-您对亚洲-东北2的配额是多少?我如何检查@JohnHanley@UtkarshSharma请参阅我的答案中的链接,并检查您使用的地区的地区前配额。我检查了显示限额-1000和使用率0的配额。您是否尝试将实例类:F1
添加到app.yaml以小的配额开始机器@UtkarshSharma-您对亚洲-东北2的配额是多少?我如何检查@JohnHanley@UtkarshSharma请参阅我的答案中的链接,并检查您使用的地区的地区前配额。
@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;
}
}