Spring Boot Actuator application won't start on Ubuntu VPS

10,052

Solution 1

localhost-startStop-1 is trying to create a new instance of SecureRandom and it's stuck trying to read data from an entropy source. This typically occurs because the source has been depleted. The default entropy source is /dev/random. It's known as a blocking source as it will block when an attempt is made to read random data and none is available. Another source on Linux is /dev/urandom. Its main benefit over /dev/random is that it's non-blocking. There's some debate over whether or not using /dev/urandom will make things less secure. This article may be of interest.

In summary, using /dev/urandom will avoid the problem you're seeing, at the possible cost of decreased security. You can configure Spring Boot's embedded Tomcat instance to use /dev/urandom via a system property:

-Djava.security.egd=file:/dev/./urandom

Solution 2

The accepted answer didn't work for me. So I found this answer which did:

Spring-boot application wont boot at startup inside docker

apt-get install haveged -y
Share:
10,052
sz4b0lcs
Author by

sz4b0lcs

I'm a mobile back-end developer at a Transylvanian mobile dev agency. I consider myself a back-end developer but I have experience in Android development as well. I'm passionate about: Spring Framework (Spring Data, RESTful, etc.) .NET and .NET Core (Entity Framework, WPF, WCF Services, Windows Services, etc.)

Updated on June 17, 2022

Comments

  • sz4b0lcs
    sz4b0lcs almost 2 years

    I have a Java backend which uses Spring Boot Actuator but it won't start on Digitalocean Ubuntu VPS. The same application runs well on my Mac and on an other Ubuntu PC.

    szabolcs@SmartUpProd:~/smartup$ java -Xmx1536m -jar build/libs/smartup-backend-0.1.0.jar 
    

    It starts the initialisation but it stops at the same point every time (no exception, just hangs). If I try to stop it at this point with ^C it won't bring the shell back.

    This is the outoput:

      .   ____          _            __ _ _
     /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
    ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
     \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
      '  |____| .__|_| |_|_| |_\__, | / / / /
     =========|_|==============|___/=/_/_/_/
     :: Spring Boot ::        (v1.1.5.RELEASE)
    
    2014-09-04 04:19:27.697  INFO 1724 --- [           main] com.smartup.SmartUpConfiguration         : Starting SmartUpConfiguration on SmartUpProd with PID 1724 (/home/szabolcs/smartup/build/libs/smartup-backend-0.1.0.jar started by szabolcs in /home/szabolcs/smartup)
    2014-09-04 04:19:27.783  INFO 1724 --- [           main] ationConfigEmbeddedWebApplicationContext : Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@464e53bb: startup date [Thu Sep 04 04:19:27 EDT 2014]; root of context hierarchy
    2014-09-04 04:19:28.911  INFO 1724 --- [           main] o.s.b.f.s.DefaultListableBeanFactory     : Overriding bean definition for bean 'beanNameViewResolver': replacing [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=org.springframework.boot.autoconfigure.web.ErrorMvcAutoConfiguration$WhitelabelErrorViewConfiguration; factoryMethodName=beanNameViewResolver; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [org/springframework/boot/autoconfigure/web/ErrorMvcAutoConfiguration$WhitelabelErrorViewConfiguration.class]] with [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=org.springframework.boot.autoconfigure.web.WebMvcAutoConfiguration$WebMvcAutoConfigurationAdapter; factoryMethodName=beanNameViewResolver; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [org/springframework/boot/autoconfigure/web/WebMvcAutoConfiguration$WebMvcAutoConfigurationAdapter.class]]
    2014-09-04 04:19:30.225  INFO 1724 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'smartUpConfiguration' of type [class com.smartup.SmartUpConfiguration$$EnhancerBySpringCGLIB$$ec37524d] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
    2014-09-04 04:19:30.254  INFO 1724 --- [           main] o.s.j.d.DriverManagerDataSource          : Loaded JDBC driver: com.mysql.jdbc.Driver
    2014-09-04 04:19:30.266  INFO 1724 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'dataSource' of type [class org.springframework.jdbc.datasource.DriverManagerDataSource] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
    2014-09-04 04:19:30.293  INFO 1724 --- [           main] j.LocalContainerEntityManagerFactoryBean : Building JPA container EntityManagerFactory for persistence unit 'default'
    2014-09-04 04:19:30.440  INFO 1724 --- [           main] o.hibernate.annotations.common.Version   : HCANN000001: Hibernate Commons Annotations {4.0.1.Final}
    2014-09-04 04:19:30.452  INFO 1724 --- [           main] org.hibernate.Version                    : HHH000412: Hibernate Core {4.0.1.Final}
    2014-09-04 04:19:30.457  INFO 1724 --- [           main] org.hibernate.cfg.Environment            : HHH000206: hibernate.properties not found
    2014-09-04 04:19:30.459  INFO 1724 --- [           main] org.hibernate.cfg.Environment            : HHH000021: Bytecode provider name : javassist
    2014-09-04 04:19:30.486  INFO 1724 --- [           main] org.hibernate.ejb.Ejb3Configuration      : HHH000204: Processing PersistenceUnitInfo [
        name: default
        ...]
    2014-09-04 04:19:30.826  INFO 1724 --- [           main] o.h.s.j.c.i.ConnectionProviderInitiator  : HHH000130: Instantiating explicit connection provider: org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider
    2014-09-04 04:19:31.175  INFO 1724 --- [           main] org.hibernate.dialect.Dialect            : HHH000400: Using dialect: org.hibernate.dialect.MySQL5InnoDBDialect
    2014-09-04 04:19:31.188  INFO 1724 --- [           main] o.h.e.jdbc.internal.LobCreatorBuilder    : HHH000423: Disabling contextual LOB creation as JDBC driver reported JDBC version [3] less than 4
    2014-09-04 04:19:31.208  INFO 1724 --- [           main] o.h.e.t.i.TransactionFactoryInitiator    : HHH000268: Transaction strategy: org.hibernate.engine.transaction.internal.jdbc.JdbcTransactionFactory
    2014-09-04 04:19:31.218  INFO 1724 --- [           main] o.h.h.i.ast.ASTQueryTranslatorFactory    : HHH000397: Using ASTQueryTranslatorFactory
    2014-09-04 04:19:31.657  INFO 1724 --- [           main] org.hibernate.tool.hbm2ddl.SchemaUpdate  : HHH000228: Running hbm2ddl schema update
    
    [...]
    2014-09-04 04:19:31.768  INFO 1724 --- [           main] org.hibernate.tool.hbm2ddl.SchemaUpdate  : HHH000232: Schema update complete
    2014-09-04 04:19:31.947  INFO 1724 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'entityManagerFactory' of type [class org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
    2014-09-04 04:19:32.092  INFO 1724 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [class org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$7460673f] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
    2014-09-04 04:19:32.119  INFO 1724 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'transactionAttributeSource' of type [class org.springframework.transaction.annotation.AnnotationTransactionAttributeSource] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
    2014-09-04 04:19:32.148  INFO 1724 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'transactionInterceptor' of type [class org.springframework.transaction.interceptor.TransactionInterceptor] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
    2014-09-04 04:19:32.167  INFO 1724 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.transaction.config.internalTransactionAdvisor' of type [class org.springframework.transaction.interceptor.BeanFactoryTransactionAttributeSourceAdvisor] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
    2014-09-04 04:19:32.574  INFO 1724 --- [           main] .t.TomcatEmbeddedServletContainerFactory : Server initialized with port: 8080
    2014-09-04 04:19:32.803  INFO 1724 --- [           main] o.apache.catalina.core.StandardService   : Starting service Tomcat
    2014-09-04 04:19:32.805  INFO 1724 --- [           main] org.apache.catalina.core.StandardEngine  : Starting Servlet Engine: Apache Tomcat/7.0.54
    2014-09-04 04:19:32.956  INFO 1724 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
    2014-09-04 04:19:32.957  INFO 1724 --- [ost-startStop-1] o.s.web.context.ContextLoader            : Root WebApplicationContext: initialization completed in 5178 ms
    2014-09-04 04:19:35.202  INFO 1724 --- [ost-startStop-1] o.s.s.web.DefaultSecurityFilterChain     : Creating filter chain: Ant [pattern='/css/**'], []
    2014-09-04 04:19:35.203  INFO 1724 --- [ost-startStop-1] o.s.s.web.DefaultSecurityFilterChain     : Creating filter chain: Ant [pattern='/js/**'], []
    2014-09-04 04:19:35.203  INFO 1724 --- [ost-startStop-1] o.s.s.web.DefaultSecurityFilterChain     : Creating filter chain: Ant [pattern='/images/**'], []
    2014-09-04 04:19:35.203  INFO 1724 --- [ost-startStop-1] o.s.s.web.DefaultSecurityFilterChain     : Creating filter chain: Ant [pattern='/**/favicon.ico'], []
    2014-09-04 04:19:35.203  INFO 1724 --- [ost-startStop-1] o.s.s.web.DefaultSecurityFilterChain     : Creating filter chain: Ant [pattern='/info'], []
    2014-09-04 04:19:35.203  INFO 1724 --- [ost-startStop-1] o.s.s.web.DefaultSecurityFilterChain     : Creating filter chain: Ant [pattern='/health'], []
    2014-09-04 04:19:35.203  INFO 1724 --- [ost-startStop-1] o.s.s.web.DefaultSecurityFilterChain     : Creating filter chain: Ant [pattern='/error'], []
    2014-09-04 04:19:35.252  INFO 1724 --- [ost-startStop-1] o.s.s.web.DefaultSecurityFilterChain     : Creating filter chain: org.springframework.security.web.util.matcher.AnyRequestMatcher@1, [org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter@5c4b8904, org.springframework.security.web.context.SecurityContextPersistenceFilter@36b59af2, org.springframework.security.web.header.HeaderWriterFilter@71880af1, org.springframework.security.web.authentication.logout.LogoutFilter@1cd26cc7, org.springframework.security.web.authentication.www.BasicAuthenticationFilter@10e5d335, org.springframework.security.web.savedrequest.RequestCacheAwareFilter@6c2a1c3a, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@5c58c840, org.springframework.security.web.authentication.AnonymousAuthenticationFilter@166e5d45, org.springframework.security.web.session.SessionManagementFilter@49040d09, org.springframework.security.web.access.ExceptionTranslationFilter@2d18c028, org.springframework.security.web.access.intercept.FilterSecurityInterceptor@5dc9dca8]
    2014-09-04 04:19:35.257  INFO 1724 --- [ost-startStop-1] o.s.s.web.DefaultSecurityFilterChain     : Creating filter chain: OrRequestMatcher [requestMatchers=[Ant [pattern='/dump'], Ant [pattern='/dump/'], Ant [pattern='/dump.*'], Ant [pattern='/env'], Ant [pattern='/env/'], Ant [pattern='/env.*'], Ant [pattern='/configprops'], Ant [pattern='/configprops/'], Ant [pattern='/configprops.*'], Ant [pattern='/autoconfig'], Ant [pattern='/autoconfig/'], Ant [pattern='/autoconfig.*'], Ant [pattern='/mappings'], Ant [pattern='/mappings/'], Ant [pattern='/mappings.*'], Ant [pattern='/trace'], Ant [pattern='/trace/'], Ant [pattern='/trace.*'], Ant [pattern='/metrics'], Ant [pattern='/metrics/'], Ant [pattern='/metrics.*'], Ant [pattern='/beans'], Ant [pattern='/beans/'], Ant [pattern='/beans.*']]], [org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter@73762e60, org.springframework.security.web.context.SecurityContextPersistenceFilter@3d8b310e, org.springframework.security.web.header.HeaderWriterFilter@5ef9f4c9, org.springframework.security.web.authentication.logout.LogoutFilter@2fa7040e, org.springframework.security.web.authentication.www.BasicAuthenticationFilter@3ae20f72, org.springframework.security.web.savedrequest.RequestCacheAwareFilter@1bd98f6, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@10736bb4, org.springframework.security.web.session.SessionManagementFilter@4bde96b2, org.springframework.security.web.access.ExceptionTranslationFilter@56ed5cfd, org.springframework.security.web.access.intercept.FilterSecurityInterceptor@2df2e9b6]
    2014-09-04 04:19:35.391  INFO 1724 --- [ost-startStop-1] o.s.b.c.e.ServletRegistrationBean        : Mapping servlet: 'dispatcherServlet' to [/]
    2014-09-04 04:19:35.395  INFO 1724 --- [ost-startStop-1] o.s.b.c.embedded.FilterRegistrationBean  : Mapping filter: 'metricFilter' to: [/*]
    2014-09-04 04:19:35.396  INFO 1724 --- [ost-startStop-1] o.s.b.c.embedded.FilterRegistrationBean  : Mapping filter: 'springSecurityFilterChain' to: [/*]
    2014-09-04 04:19:35.396  INFO 1724 --- [ost-startStop-1] o.s.b.c.embedded.FilterRegistrationBean  : Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
    2014-09-04 04:19:35.396  INFO 1724 --- [ost-startStop-1] o.s.b.c.embedded.FilterRegistrationBean  : Mapping filter: 'applicationContextIdFilter' to: [/*]
    2014-09-04 04:19:35.396  INFO 1724 --- [ost-startStop-1] o.s.b.c.embedded.FilterRegistrationBean  : Mapping filter: 'webRequestLoggingFilter' to: [/*]
    

    And this is the output after the ^C:

    ^C2014-09-04 04:34:46.560  INFO 1724 --- [       Thread-2] ationConfigEmbeddedWebApplicationContext : Closing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@464e53bb: startup date [Thu Sep 04 04:19:27 EDT 2014]; root of context hierarchy
    2014-09-04 04:34:46.573  WARN 1724 --- [       Thread-2] ationConfigEmbeddedWebApplicationContext : Exception thrown from LifecycleProcessor on context close
    
    java.lang.IllegalStateException: LifecycleProcessor not initialized - call 'refresh' before invoking lifecycle methods via the context: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@464e53bb: startup date [Thu Sep 04 04:19:27 EDT 2014]; root of context hierarchy
        at org.springframework.context.support.AbstractApplicationContext.getLifecycleProcessor(AbstractApplicationContext.java:359)
        at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:888)
        at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.doClose(EmbeddedWebApplicationContext.java:152)
        at org.springframework.context.support.AbstractApplicationContext$1.run(AbstractApplicationContext.java:809)
    
    2014-09-04 04:34:46.601  INFO 1724 --- [       Thread-2] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'default'
    

    Has someone faced the same problem? Can you guys please help me?

    Here you have the thread dump (when it's hanging):

    szabolcs@SmartUpProd:~$ jstack 2616
    2014-09-04 07:33:30
    Full thread dump Java HotSpot(TM) 64-Bit Server VM (25.20-b23 mixed mode):
    
    "Attach Listener" #14 daemon prio=9 os_prio=0 tid=0x00007fb678001000 nid=0xaae waiting on condition [0x0000000000000000]
       java.lang.Thread.State: RUNNABLE
    
    "localhost-startStop-1" #13 daemon prio=5 os_prio=0 tid=0x00007fb65000d000 nid=0xa46 runnable [0x00007fb662fec000]
       java.lang.Thread.State: RUNNABLE
        at java.io.FileInputStream.readBytes(Native Method)
        at java.io.FileInputStream.read(FileInputStream.java:246)
        at sun.security.provider.SeedGenerator$URLSeedGenerator.getSeedBytes(SeedGenerator.java:539)
        at sun.security.provider.SeedGenerator.generateSeed(SeedGenerator.java:144)
        at sun.security.provider.SecureRandom$SeederHolder.<clinit>(SecureRandom.java:192)
        at sun.security.provider.SecureRandom.engineNextBytes(SecureRandom.java:210)
        - locked <0x00000000f15173a0> (a sun.security.provider.SecureRandom)
        at java.security.SecureRandom.nextBytes(SecureRandom.java:457)
        - locked <0x00000000f15176c0> (a java.security.SecureRandom)
        at java.security.SecureRandom.next(SecureRandom.java:480)
        at java.util.Random.nextInt(Random.java:329)
        at org.apache.catalina.util.SessionIdGenerator.createSecureRandom(SessionIdGenerator.java:246)
        at org.apache.catalina.util.SessionIdGenerator.getRandomBytes(SessionIdGenerator.java:183)
        at org.apache.catalina.util.SessionIdGenerator.generateSessionId(SessionIdGenerator.java:153)
        at org.apache.catalina.session.ManagerBase.startInternal(ManagerBase.java:573)
        at org.apache.catalina.session.StandardManager.startInternal(StandardManager.java:485)
        - locked <0x00000000f1395fc0> (a org.apache.catalina.session.StandardManager)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        - locked <0x00000000f1395fc0> (a org.apache.catalina.session.StandardManager)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5476)
        - locked <0x00000000f675e1a8> (a org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedContext)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        - locked <0x00000000f675e1a8> (a org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedContext)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
    
    "Tomcat-startStop-1" #12 daemon prio=5 os_prio=0 tid=0x00007fb65f35b000 nid=0xa45 waiting on condition [0x00007fb6801d8000]
       java.lang.Thread.State: WAITING (parking)
        at sun.misc.Unsafe.park(Native Method)
        - parking to wait for  <0x00000000f675e178> (a java.util.concurrent.FutureTask)
        at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
        at java.util.concurrent.FutureTask.awaitDone(FutureTask.java:429)
        at java.util.concurrent.FutureTask.get(FutureTask.java:191)
        at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1123)
        - locked <0x00000000f6705460> (a org.apache.catalina.core.StandardHost)
        at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:799)
        - locked <0x00000000f6705460> (a org.apache.catalina.core.StandardHost)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        - locked <0x00000000f6705460> (a org.apache.catalina.core.StandardHost)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
    
    "DestroyJavaVM" #10 prio=5 os_prio=0 tid=0x00007fb6a0009800 nid=0xa39 waiting on condition [0x0000000000000000]
       java.lang.Thread.State: RUNNABLE
    
    "main" #9 prio=5 os_prio=0 tid=0x00007fb6a01cf800 nid=0xa44 waiting on condition [0x00007fb6808ef000]
       java.lang.Thread.State: WAITING (parking)
        at sun.misc.Unsafe.park(Native Method)
        - parking to wait for  <0x00000000f6705430> (a java.util.concurrent.FutureTask)
        at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
        at java.util.concurrent.FutureTask.awaitDone(FutureTask.java:429)
        at java.util.concurrent.FutureTask.get(FutureTask.java:191)
        at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1123)
        - locked <0x00000000f675c598> (a org.apache.catalina.core.StandardEngine)
        at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:300)
        - locked <0x00000000f675c598> (a org.apache.catalina.core.StandardEngine)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        - locked <0x00000000f675c598> (a org.apache.catalina.core.StandardEngine)
        at org.apache.catalina.core.StandardService.startInternal(StandardService.java:443)
        - locked <0x00000000f675c598> (a org.apache.catalina.core.StandardEngine)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        - locked <0x00000000f675bc98> (a org.apache.catalina.core.StandardService)
        at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:731)
        - locked <0x00000000f675c340> (a [Lorg.apache.catalina.Service;)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        - locked <0x00000000f675bd68> (a org.apache.catalina.core.StandardServer)
        at org.apache.catalina.startup.Tomcat.start(Tomcat.java:341)
        at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.initialize(TomcatEmbeddedServletContainer.java:85)
        - locked <0x00000000f6bbad18> (a org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer)
        at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.<init>(TomcatEmbeddedServletContainer.java:74)
        at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainerFactory.getTomcatEmbeddedServletContainer(TomcatEmbeddedServletContainerFactory.java:289)
        at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainerFactory.getEmbeddedServletContainer(TomcatEmbeddedServletContainerFactory.java:146)
        at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.createEmbeddedServletContainer(EmbeddedWebApplicationContext.java:159)
        - locked <0x00000000a0d8f098> (a org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext)
        at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:132)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:476)
        - locked <0x00000000a0d8f2c8> (a java.lang.Object)
        at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:120)
        at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:691)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:320)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:952)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:941)
        at com.smartup.SmartUpConfiguration.main(SmartUpConfiguration.java:78)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:483)
        at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:53)
        at java.lang.Thread.run(Thread.java:745)
    
    "Service Thread" #7 daemon prio=9 os_prio=0 tid=0x00007fb6a0152000 nid=0xa42 runnable [0x0000000000000000]
       java.lang.Thread.State: RUNNABLE
    
    "C1 CompilerThread1" #6 daemon prio=9 os_prio=0 tid=0x00007fb6a0132800 nid=0xa41 waiting on condition [0x0000000000000000]
       java.lang.Thread.State: RUNNABLE
    
    "C2 CompilerThread0" #5 daemon prio=9 os_prio=0 tid=0x00007fb6a012f800 nid=0xa40 waiting on condition [0x0000000000000000]
       java.lang.Thread.State: RUNNABLE
    
    "Signal Dispatcher" #4 daemon prio=9 os_prio=0 tid=0x00007fb6a012d800 nid=0xa3f runnable [0x0000000000000000]
       java.lang.Thread.State: RUNNABLE
    
    "Finalizer" #3 daemon prio=8 os_prio=0 tid=0x00007fb6a00ff000 nid=0xa3e in Object.wait() [0x00007fb69041e000]
       java.lang.Thread.State: WAITING (on object monitor)
        at java.lang.Object.wait(Native Method)
        - waiting on <0x00000000a0487660> (a java.lang.ref.ReferenceQueue$Lock)
        at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:142)
        - locked <0x00000000a0487660> (a java.lang.ref.ReferenceQueue$Lock)
        at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:158)
        at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:209)
    
    "Reference Handler" #2 daemon prio=10 os_prio=0 tid=0x00007fb6a00fd000 nid=0xa3d in Object.wait() [0x00007fb69051f000]
       java.lang.Thread.State: WAITING (on object monitor)
        at java.lang.Object.wait(Native Method)
        - waiting on <0x00000000a04876a0> (a java.lang.ref.Reference$Lock)
        at java.lang.Object.wait(Object.java:502)
        at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:157)
        - locked <0x00000000a04876a0> (a java.lang.ref.Reference$Lock)
    
    "VM Thread" os_prio=0 tid=0x00007fb6a00f6000 nid=0xa3c runnable 
    
    "GC task thread#0 (ParallelGC)" os_prio=0 tid=0x00007fb6a001f000 nid=0xa3a runnable 
    
    "GC task thread#1 (ParallelGC)" os_prio=0 tid=0x00007fb6a0020800 nid=0xa3b runnable 
    
    "VM Periodic Task Thread" os_prio=0 tid=0x00007fb6a0154000 nid=0xa43 waiting on condition 
    
    JNI global references: 48
    
  • sz4b0lcs
    sz4b0lcs over 9 years
    As I see the root of the problem now, I installed haveged and now I have the /dev/random entropy source. Many thanks!
  • igo
    igo over 9 years
    You saved my day! Just a note for others: The extra ./ is a workaround for bugs.openjdk.java.net/browse/JDK-6202721
  • RockMeetHardplace
    RockMeetHardplace over 9 years
    holy crap, no way I would have found this without the glorious internet. Thanks for saving my weekend.
  • Dmitry Polishuk
    Dmitry Polishuk almost 9 years
    Thanks a lot! It was helped me!
  • Axiom
    Axiom about 8 years
    Thank you so much. After days of headache, this finally fixed my problem.
  • Võ Quang Hòa
    Võ Quang Hòa almost 8 years
    You saved my day. Thanks a lot.
  • Isvaldo Fernandes
    Isvaldo Fernandes over 7 years
    The accepted answer didn't work for me too, Thank you so much
  • Matt D.
    Matt D. about 7 years
    This saved my weekend! Great find.