在heroku中部署的spring boot rest api抛出应用超时错误,错误代码为h10

时间:2019-10-07 05:10:14

标签: rest spring-boot heroku

我在heroku中仅使用硬编码数据(没有数据库连接)部署了我的rest api。在本地计算机上,它可以完美运行。但是在heroku中,它只显示错误。我找不到正确的解决方案。

Alien.java

package com.altimetrik;

public class Alien {

    public int id;
    public Alien(int id, String name) {
        super();
        this.id = id;
        this.name = name;
    }
    public Alien() {
        // TODO Auto-generated constructor stub
    }
    public String name;
    public int getId() {
        return id;
    }
    public void setId(int id) {
        this.id = id;
    }
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }

}

SecondMicroService.java

package com.altimetrik;


import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/secondservice")
public class SecondMicroService {
    @GetMapping("/getAlien")
    public Alien getAlien() {
        Alien a2 = new Alien();
        a2.setId(2);
        a2.setName("pras");
        return a2;
    }
}

SecondMircroServiceApplication.java


import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;

@SpringBootApplication
public class SecondMicroServiceApplication extends SpringBootServletInitializer{

    public static void main(String[] args) {
        SpringApplication.run(SecondMicroServiceApplication.class, args);
    }

}

将上述内容部署到heroku之后,构建成功,但是在运行该应用程序时,它显示了以下错误。请帮助

错误日志:


2019-10-07T05:11:17.106739+00:00 heroku[web.1]: Starting process with command `java -Dserver.port=28103 $JAVA_OPTS -jar target/second-micro-service-0.0.1-SNAPSHOT.jar`
2019-10-07T05:11:19.588292+00:00 app[web.1]: Create a Procfile to customize the command used to run this process: https://devcenter.heroku.com/articles/procfile
2019-10-07T05:11:19.603678+00:00 app[web.1]: Setting JAVA_TOOL_OPTIONS defaults based on dyno size. Custom settings will override them.
2019-10-07T05:11:19.607618+00:00 app[web.1]: Picked up JAVA_TOOL_OPTIONS: -Xmx300m -Xss512k -XX:CICompilerCount=2 -Dfile.encoding=UTF-8 
2019-10-07T05:11:21.248076+00:00 app[web.1]: 
2019-10-07T05:11:21.248125+00:00 app[web.1]:   .   ____          _            __ _ _
2019-10-07T05:11:21.248131+00:00 app[web.1]:  /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
2019-10-07T05:11:21.248196+00:00 app[web.1]: ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
2019-10-07T05:11:21.248254+00:00 app[web.1]:  \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
2019-10-07T05:11:21.248311+00:00 app[web.1]:   '  |____| .__|_| |_|_| |_\__, | / / / /
2019-10-07T05:11:21.248368+00:00 app[web.1]:  =========|_|==============|___/=/_/_/_/
2019-10-07T05:11:21.249999+00:00 app[web.1]:  :: Spring Boot ::        (v2.1.7.RELEASE)
2019-10-07T05:11:21.250251+00:00 app[web.1]: 
2019-10-07T05:11:21.61573+00:00 app[web.1]: 2019-10-07 05:11:21.610  INFO 4 --- [           main] c.a.SecondMicroServiceApplication        : Starting SecondMicroServiceApplication v0.0.1-SNAPSHOT on 6947fb3e-52c6-4b88-9d35-d74be7d932db with PID 4 (/app/target/second-micro-service-0.0.1-SNAPSHOT.jar started by u10869 in /app)
2019-10-07T05:11:21.616412+00:00 app[web.1]: 2019-10-07 05:11:21.616  INFO 4 --- [           main] c.a.SecondMicroServiceApplication        : No active profile set, falling back to default profiles: default
2019-10-07T05:11:23.961558+00:00 app[web.1]: 2019-10-07 05:11:23.961  INFO 4 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.ws.config.annotation.DelegatingWsConfiguration' of type [org.springframework.ws.config.annotation.DelegatingWsConfiguration$$EnhancerBySpringCGLIB$$4f4a3d5c] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-10-07T05:11:24.043039+00:00 app[web.1]: 2019-10-07 05:11:24.042  INFO 4 --- [           main] .w.s.a.s.AnnotationActionEndpointMapping : Supporting [WS-Addressing August 2004, WS-Addressing 1.0]
2019-10-07T05:11:24.901431+00:00 app[web.1]: 2019-10-07 05:11:24.901  INFO 4 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 28103 (http)
2019-10-07T05:11:25.040526+00:00 app[web.1]: 2019-10-07 05:11:25.040  INFO 4 --- [           main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2019-10-07T05:11:25.041489+00:00 app[web.1]: 2019-10-07 05:11:25.041  INFO 4 --- [           main] org.apache.catalina.core.StandardEngine  : Starting Servlet engine: [Apache Tomcat/9.0.22]
2019-10-07T05:11:25.390428+00:00 app[web.1]: 2019-10-07 05:11:25.390  INFO 4 --- [           main] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2019-10-07T05:11:25.39069+00:00 app[web.1]: 2019-10-07 05:11:25.390  INFO 4 --- [           main] o.s.web.context.ContextLoader            : Root WebApplicationContext: initialization completed in 3419 ms
2019-10-07T05:11:35.069552+00:00 heroku[web.1]: source=web.1 dyno=heroku.147489641.6947fb3e-52c6-4b88-9d35-d74be7d932db sample#memory_total=246.73MB sample#memory_rss=246.70MB sample#memory_cache=0.03MB sample#memory_swap=0.00MB sample#memory_pgpgin=38487pages sample#memory_pgpgout=10582pages sample#memory_quota=512.00MB
2019-10-07T05:11:36.365123+00:00 app[web.1]: 2019-10-07 05:11:36.363 ERROR 4 --- [           main] o.a.c.c.C.[Tomcat].[localhost].[/]       : Exception sending context initialized event to listener instance of class [com.vaadin.flow.spring.VaadinServletContextInitializer$DevModeServletContextListener]
2019-10-07T05:11:36.365141+00:00 app[web.1]: 
2019-10-07T05:11:36.36515+00:00 app[web.1]: org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component class: URL [jar:file:/app/target/second-micro-service-0.0.1-SNAPSHOT.jar!/BOOT-INF/lib/atmosphere-runtime-2.4.30.slf4jvaadin1.jar!/org/atmosphere/inject/AtmosphereRequestIntrospector.class]; nested exception is java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy
2019-10-07T05:11:36.365153+00:00 app[web.1]:    at org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.scanCandidateComponents(ClassPathScanningCandidateComponentProvider.java:454) ~[spring-context-5.1.9.RELEASE.jar!/:5.1.9.RELEASE]
2019-10-07T05:11:36.365156+00:00 app[web.1]:    at org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.findCandidateComponents(ClassPathScanningCandidateComponentProvider.java:316) ~[spring-context-5.1.9.RELEASE.jar!/:5.1.9.RELEASE]
2019-10-07T05:11:36.365158+00:00 app[web.1]:    at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) ~[na:1.8.0_222-heroku]
2019-10-07T05:11:36.365161+00:00 app[web.1]:    at java.util.Collections$2.tryAdvance(Collections.java:4719) ~[na:1.8.0_222-heroku]
2019-10-07T05:11:36.365163+00:00 app[web.1]:    at java.util.Collections$2.forEachRemaining(Collections.java:4727) ~[na:1.8.0_222-heroku]
2019-10-07T05:11:36.365166+00:00 app[web.1]:    at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482) ~[na:1.8.0_222-heroku]
2019-10-07T05:11:36.365168+00:00 app[web.1]:    at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472) ~[na:1.8.0_222-heroku]
2019-10-07T05:11:36.36517+00:00 app[web.1]:     at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708) ~[na:1.8.0_222-heroku]
2019-10-07T05:11:36.365172+00:00 app[web.1]:    at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[na:1.8.0_222-heroku]
2019-10-07T05:11:36.365174+00:00 app[web.1]:    at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:566) ~[na:1.8.0_222-heroku]
2019-10-07T05:11:36.36518+00:00 app[web.1]:     at com.vaadin.flow.spring.VaadinServletContextInitializer$DevModeServletContextListener.contextInitialized(VaadinServletContextInitializer.java:292) ~[vaadin-spring-12.0.4.jar!/:na]
2019-10-07T05:11:36.365183+00:00 app[web.1]:    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4680) [tomcat-embed-core-9.0.22.jar!/:9.0.22]
2019-10-07T05:11:36.365185+00:00 app[web.1]:    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5143) [tomcat-embed-core-9.0.22.jar!/:9.0.22]
2019-10-07T05:11:36.365187+00:00 app[web.1]:    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) [tomcat-embed-core-9.0.22.jar!/:9.0.22]
2019-10-07T05:11:36.365189+00:00 app[web.1]:    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384) [tomcat-embed-core-9.0.22.jar!/:9.0.22]
2019-10-07T05:11:36.365192+00:00 app[web.1]:    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374) [tomcat-embed-core-9.0.22.jar!/:9.0.22]
2019-10-07T05:11:36.365194+00:00 app[web.1]:    at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_222-heroku]
2019-10-07T05:11:36.365197+00:00 app[web.1]:    at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) [tomcat-embed-core-9.0.22.jar!/:9.0.22]
2019-10-07T05:11:36.365199+00:00 app[web.1]:    at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134) [na:1.8.0_222-heroku]
2019-10-07T05:11:36.365201+00:00 app[web.1]:    at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909) [tomcat-embed-core-9.0.22.jar!/:9.0.22]
2019-10-07T05:11:36.365203+00:00 app[web.1]:    at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:841) [tomcat-embed-core-9.0.22.jar!/:9.0.22]
2019-10-07T05:11:36.365205+00:00 app[web.1]:    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) [tomcat-embed-core-9.0.22.jar!/:9.0.22]
2019-10-07T05:11:36.365207+00:00 app[web.1]:    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384) [tomcat-embed-core-9.0.22.jar!/:9.0.22]
2019-10-07T05:11:36.365209+00:00 app[web.1]:    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374) [tomcat-embed-core-9.0.22.jar!/:9.0.22]
2019-10-07T05:11:36.365211+00:00 app[web.1]:    at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_222-heroku]
2019-10-07T05:11:36.365213+00:00 app[web.1]:    at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) [tomcat-embed-core-9.0.22.jar!/:9.0.22]
2019-10-07T05:11:36.365216+00:00 app[web.1]:    at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134) [na:1.8.0_222-heroku]
2019-10-07T05:11:36.365217+00:00 app[web.1]:    at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909) [tomcat-embed-core-9.0.22.jar!/:9.0.22]
2019-10-07T05:11:36.365226+00:00 app[web.1]:    at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262) [tomcat-embed-core-9.0.22.jar!/:9.0.22]
2019-10-07T05:11:36.365228+00:00 app[web.1]:    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) [tomcat-embed-core-9.0.22.jar!/:9.0.22]
2019-10-07T05:11:36.36523+00:00 app[web.1]:     at org.apache.catalina.core.StandardService.startInternal(StandardService.java:421) [tomcat-embed-core-9.0.22.jar!/:9.0.22]
2019-10-07T05:11:36.365233+00:00 app[web.1]:    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) [tomcat-embed-core-9.0.22.jar!/:9.0.22]
2019-10-07T05:11:36.365235+00:00 app[web.1]:    at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:932) [tomcat-embed-core-9.0.22.jar!/:9.0.22]
2019-10-07T05:11:36.365237+00:00 app[web.1]:    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) [tomcat-embed-core-9.0.22.jar!/:9.0.22]
2019-10-07T05:11:36.365239+00:00 app[web.1]:    at org.apache.catalina.startup.Tomcat.start(Tomcat.java:456) [tomcat-embed-core-9.0.22.jar!/:9.0.22]
2019-10-07T05:11:36.365242+00:00 app[web.1]:    at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.initialize(TomcatWebServer.java:105) [spring-boot-2.1.7.RELEASE.jar!/:2.1.7.RELEASE]
2019-10-07T05:11:36.365245+00:00 app[web.1]:    at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.<init>(TomcatWebServer.java:86) [spring-boot-2.1.7.RELEASE.jar!/:2.1.7.RELEASE]
2019-10-07T05:11:36.365247+00:00 app[web.1]:    at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getTomcatWebServer(TomcatServletWebServerFactory.java:416) [spring-boot-2.1.7.RELEASE.jar!/:2.1.7.RELEASE]
2019-10-07T05:11:36.365249+00:00 app[web.1]:    at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getWebServer(TomcatServletWebServerFactory.java:180) [spring-boot-2.1.7.RELEASE.jar!/:2.1.7.RELEASE]
2019-10-07T05:11:36.365252+00:00 app[web.1]:    at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.createWebServer(ServletWebServerApplicationContext.java:180) [spring-boot-2.1.7.RELEASE.jar!/:2.1.7.RELEASE]
2019-10-07T05:11:36.365255+00:00 app[web.1]:    at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:153) [spring-boot-2.1.7.RELEASE.jar!/:2.1.7.RELEASE]
2019-10-07T05:11:36.365257+00:00 app[web.1]:    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:543) [spring-context-5.1.9.RELEASE.jar!/:5.1.9.RELEASE]
2019-10-07T05:11:36.365259+00:00 app[web.1]:    at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141) [spring-boot-2.1.7.RELEASE.jar!/:2.1.7.RELEASE]
2019-10-07T05:11:36.365262+00:00 app[web.1]:    at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:743) [spring-boot-2.1.7.RELEASE.jar!/:2.1.7.RELEASE]
2019-10-07T05:11:36.365264+00:00 app[web.1]:    at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:390) [spring-boot-2.1.7.RELEASE.jar!/:2.1.7.RELEASE]
2019-10-07T05:11:36.365266+00:00 app[web.1]:    at org.springframework.boot.SpringApplication.run(SpringApplication.java:312) [spring-boot-2.1.7.RELEASE.jar!/:2.1.7.RELEASE]
2019-10-07T05:11:36.365269+00:00 app[web.1]:    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1214) [spring-boot-2.1.7.RELEASE.jar!/:2.1.7.RELEASE]
2019-10-07T05:11:36.365271+00:00 app[web.1]:    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1203) [spring-boot-2.1.7.RELEASE.jar!/:2.1.7.RELEASE]
2019-10-07T05:11:36.365273+00:00 app[web.1]:    at com.altimetrik.SecondMicroServiceApplication.main(SecondMicroServiceApplication.java:11) [classes!/:0.0.1-SNAPSHOT]
2019-10-07T05:11:36.365275+00:00 app[web.1]:    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_222-heroku]
2019-10-07T05:11:36.365277+00:00 app[web.1]:    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_222-heroku]
2019-10-07T05:11:36.36528+00:00 app[web.1]:     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_222-heroku]
2019-10-07T05:11:36.365282+00:00 app[web.1]:    at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_222-heroku]
2019-10-07T05:11:36.365284+00:00 app[web.1]:    at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48) [second-micro-service-0.0.1-SNAPSHOT.jar:0.0.1-SNAPSHOT]
2019-10-07T05:11:36.365286+00:00 app[web.1]:    at org.springframework.boot.loader.Launcher.launch(Launcher.java:87) [second-micro-service-0.0.1-SNAPSHOT.jar:0.0.1-SNAPSHOT]
2019-10-07T05:11:36.365288+00:00 app[web.1]:    at org.springframework.boot.loader.Launcher.launch(Launcher.java:51) [second-micro-service-0.0.1-SNAPSHOT.jar:0.0.1-SNAPSHOT]
2019-10-07T05:11:36.36529+00:00 app[web.1]:     at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:52) [second-micro-service-0.0.1-SNAPSHOT.jar:0.0.1-SNAPSHOT]
2019-10-07T05:11:36.365292+00:00 app[web.1]: Caused by: java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy
2019-10-07T05:11:36.365295+00:00 app[web.1]:    at sun.reflect.annotation.AnnotationParser.parseClassArray(AnnotationParser.java:724) ~[na:1.8.0_222-heroku]
2019-10-07T05:11:36.365302+00:00 app[web.1]:    at sun.reflect.annotation.AnnotationParser.parseArray(AnnotationParser.java:531) ~[na:1.8.0_222-heroku]
2019-10-07T05:11:36.365304+00:00 app[web.1]:    at sun.reflect.annotation.AnnotationParser.parseMemberValue(AnnotationParser.java:355) ~[na:1.8.0_222-heroku]
2019-10-07T05:11:36.365306+00:00 app[web.1]:    at java.lang.reflect.Method.getDefaultValue(Method.java:606) ~[na:1.8.0_222-heroku]
2019-10-07T05:11:36.365308+00:00 app[web.1]:    at org.springframework.core.annotation.AnnotationUtils.registerDefaultValues(AnnotationUtils.java:1268) ~[spring-core-5.1.9.RELEASE.jar!/:5.1.9.RELEASE]
2019-10-07T05:11:36.36531+00:00 app[web.1]:     at org.springframework.core.type.classreading.RecursiveAnnotationAttributesVisitor.visitEnd(RecursiveAnnotationAttributesVisitor.java:46) ~[spring-core-5.1.9.RELEASE.jar!/:5.1.9.RELEASE]
2019-10-07T05:11:36.365312+00:00 app[web.1]:    at org.springframework.core.type.classreading.AnnotationAttributesReadingVisitor.visitEnd(AnnotationAttributesReadingVisitor.java:64) ~[spring-core-5.1.9.RELEASE.jar!/:5.1.9.RELEASE]
2019-10-07T05:11:36.365314+00:00 app[web.1]:    at org.springframework.asm.ClassReader.readElementValues(ClassReader.java:2769) ~[spring-core-5.1.9.RELEASE.jar!/:5.1.9.RELEASE]
2019-10-07T05:11:36.365316+00:00 app[web.1]:    at org.springframework.asm.ClassReader.accept(ClassReader.java:563) ~[spring-core-5.1.9.RELEASE.jar!/:5.1.9.RELEASE]
2019-10-07T05:11:36.365319+00:00 app[web.1]:    at org.springframework.asm.ClassReader.accept(ClassReader.java:391) ~[spring-core-5.1.9.RELEASE.jar!/:5.1.9.RELEASE]
2019-10-07T05:11:36.365321+00:00 app[web.1]:    at org.springframework.core.type.classreading.SimpleMetadataReader.<init>(SimpleMetadataReader.java:65) ~[spring-core-5.1.9.RELEASE.jar!/:5.1.9.RELEASE]
2019-10-07T05:11:36.365323+00:00 app[web.1]:    at org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(SimpleMetadataReaderFactory.java:103) ~[spring-core-5.1.9.RELEASE.jar!/:5.1.9.RELEASE]
2019-10-07T05:11:36.365325+00:00 app[web.1]:    at org.springframework.core.type.classreading.CachingMetadataReaderFactory.getMetadataReader(CachingMetadataReaderFactory.java:132) ~[spring-core-5.1.9.RELEASE.jar!/:5.1.9.RELEASE]
2019-10-07T05:11:36.365327+00:00 app[web.1]:    at org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.scanCandidateComponents(ClassPathScanningCandidateComponentProvider.java:430) ~[spring-context-5.1.9.RELEASE.jar!/:5.1.9.RELEASE]
2019-10-07T05:11:36.36533+00:00 app[web.1]:     ... 56 common frames omitted
2019-10-07T05:11:36.365332+00:00 app[web.1]: 
2019-10-07T05:11:36.373261+00:00 app[web.1]: 2019-10-07 05:11:36.373 ERROR 4 --- [           main] o.apache.catalina.core.StandardContext   : One or more listeners failed to start. Full details will be found in the appropriate container log file
2019-10-07T05:11:36.374129+00:00 app[web.1]: 2019-10-07 05:11:36.374 ERROR 4 --- [           main] o.apache.catalina.core.StandardContext   : Context [] startup failed due to previous errors
2019-10-07T05:11:36.500949+00:00 app[web.1]: 2019-10-07 05:11:36.500  INFO 4 --- [           main] o.apache.catalina.core.StandardService   : Stopping service [Tomcat]
2019-10-07T05:11:36.52621+00:00 app[web.1]: 2019-10-07 05:11:36.525  WARN 4 --- [           main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat
2019-10-07T05:11:36.580377+00:00 app[web.1]: 2019-10-07 05:11:36.580  INFO 4 --- [           main] ConditionEvaluationReportLoggingListener : 
2019-10-07T05:11:36.580387+00:00 app[web.1]: 
2019-10-07T05:11:36.58039+00:00 app[web.1]: Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2019-10-07T05:11:36.596956+00:00 app[web.1]: 2019-10-07 05:11:36.596 ERROR 4 --- [           main] o.s.boot.SpringApplication               : Application run failed
2019-10-07T05:11:36.596961+00:00 app[web.1]: 
2019-10-07T05:11:36.596964+00:00 app[web.1]: org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat
2019-10-07T05:11:36.596967+00:00 app[web.1]:    at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:156) ~[spring-boot-2.1.7.RELEASE.jar!/:2.1.7.RELEASE]
2019-10-07T05:11:36.59697+00:00 app[web.1]:     at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:543) ~[spring-context-5.1.9.RELEASE.jar!/:5.1.9.RELEASE]
2019-10-07T05:11:36.596972+00:00 app[web.1]:    at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141) ~[spring-boot-2.1.7.RELEASE.jar!/:2.1.7.RELEASE]
2019-10-07T05:11:36.596975+00:00 app[web.1]:    at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:743) [spring-boot-2.1.7.RELEASE.jar!/:2.1.7.RELEASE]
2019-10-07T05:11:36.596977+00:00 app[web.1]:    at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:390) [spring-boot-2.1.7.RELEASE.jar!/:2.1.7.RELEASE]
2019-10-07T05:11:36.596979+00:00 app[web.1]:    at org.springframework.boot.SpringApplication.run(SpringApplication.java:312) [spring-boot-2.1.7.RELEASE.jar!/:2.1.7.RELEASE]
2019-10-07T05:11:36.596982+00:00 app[web.1]:    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1214) [spring-boot-2.1.7.RELEASE.jar!/:2.1.7.RELEASE]
2019-10-07T05:11:36.596984+00:00 app[web.1]:    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1203) [spring-boot-2.1.7.RELEASE.jar!/:2.1.7.RELEASE]
2019-10-07T05:11:36.596986+00:00 app[web.1]:    at com.altimetrik.SecondMicroServiceApplication.main(SecondMicroServiceApplication.java:11) [classes!/:0.0.1-SNAPSHOT]
2019-10-07T05:11:36.596988+00:00 app[web.1]:    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_222-heroku]
2019-10-07T05:11:36.596991+00:00 app[web.1]:    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_222-heroku]
2019-10-07T05:11:36.596993+00:00 app[web.1]:    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_222-heroku]
2019-10-07T05:11:36.596996+00:00 app[web.1]:    at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_222-heroku]
2019-10-07T05:11:36.596998+00:00 app[web.1]:    at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48) [second-micro-service-0.0.1-SNAPSHOT.jar:0.0.1-SNAPSHOT]
2019-10-07T05:11:36.597+00:00 app[web.1]:   at org.springframework.boot.loader.Launcher.launch(Launcher.java:87) [second-micro-service-0.0.1-SNAPSHOT.jar:0.0.1-SNAPSHOT]
2019-10-07T05:11:36.597002+00:00 app[web.1]:    at org.springframework.boot.loader.Launcher.launch(Launcher.java:51) [second-micro-service-0.0.1-SNAPSHOT.jar:0.0.1-SNAPSHOT]
2019-10-07T05:11:36.597004+00:00 app[web.1]:    at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:52) [second-micro-service-0.0.1-SNAPSHOT.jar:0.0.1-SNAPSHOT]
2019-10-07T05:11:36.597006+00:00 app[web.1]: Caused by: org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat
2019-10-07T05:11:36.597009+00:00 app[web.1]:    at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.initialize(TomcatWebServer.java:124) ~[spring-boot-2.1.7.RELEASE.jar!/:2.1.7.RELEASE]
2019-10-07T05:11:36.597011+00:00 app[web.1]:    at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.<init>(TomcatWebServer.java:86) ~[spring-boot-2.1.7.RELEASE.jar!/:2.1.7.RELEASE]
2019-10-07T05:11:36.597013+00:00 app[web.1]:    at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getTomcatWebServer(TomcatServletWebServerFactory.java:416) ~[spring-boot-2.1.7.RELEASE.jar!/:2.1.7.RELEASE]
2019-10-07T05:11:36.597015+00:00 app[web.1]:    at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getWebServer(TomcatServletWebServerFactory.java:180) ~[spring-boot-2.1.7.RELEASE.jar!/:2.1.7.RELEASE]
2019-10-07T05:11:36.597018+00:00 app[web.1]:    at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.createWebServer(ServletWebServerApplicationContext.java:180) ~[spring-boot-2.1.7.RELEASE.jar!/:2.1.7.RELEASE]
2019-10-07T05:11:36.59702+00:00 app[web.1]:     at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:153) ~[spring-boot-2.1.7.RELEASE.jar!/:2.1.7.RELEASE]
2019-10-07T05:11:36.597022+00:00 app[web.1]:    ... 16 common frames omitted
2019-10-07T05:11:36.597024+00:00 app[web.1]: Caused by: java.lang.IllegalStateException: StandardEngine[Tomcat].StandardHost[localhost].TomcatEmbeddedContext[] failed to start
2019-10-07T05:11:36.597027+00:00 app[web.1]:    at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.rethrowDeferredStartupExceptions(TomcatWebServer.java:169) ~[spring-boot-2.1.7.RELEASE.jar!/:2.1.7.RELEASE]
2019-10-07T05:11:36.597039+00:00 app[web.1]:    at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.initialize(TomcatWebServer.java:108) ~[spring-boot-2.1.7.RELEASE.jar!/:2.1.7.RELEASE]
2019-10-07T05:11:36.597041+00:00 app[web.1]:    ... 21 common frames omitted
2019-10-07T05:11:36.597043+00:00 app[web.1]: 
2019-10-07T05:11:36.785613+00:00 heroku[web.1]: Process exited with status 1
2019-10-07T05:11:36.849782+00:00 heroku[web.1]: State changed from starting to crashed

0 个答案:

没有答案