danielbryantuk / oreilly-docker-java-shopping

Code repository for my O'Reilly "Containerizing Continuous Delivery in Java: Docker Integration for Build Pipelines and Application Architecture" minibook

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

stockmanager pod always restart

la3rence opened this issue · comments

[root@centos ~]# kubectl get pods
NAME                     READY   STATUS             RESTARTS   AGE
productcatalogue-m6j8l   1/1     Running            0          131m
shopfront-lczpd          1/1     Running            0          141m
stockmanager-b2c6s       0/1     CrashLoopBackOff   39         131m

The container log:


  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v2.1.3.RELEASE)

2020-09-21 12:41:33.643  INFO 1 --- [           main] u.c.d.d.s.StockManagerApplication        : Starting StockManagerApplication v0.0.1-SNAPSHOT on stockmanager-7w6b4 with PID 1 (/app.jar started by root in /)
2020-09-21 12:41:33.645  INFO 1 --- [           main] u.c.d.d.s.StockManagerApplication        : No active profile set, falling back to default profiles: default
2020-09-21 12:41:34.384  INFO 1 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data repositories in DEFAULT mode.
2020-09-21 12:41:34.429  INFO 1 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 39ms. Found 1 repository interfaces.
2020-09-21 12:41:34.761  INFO 1 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$b70ad3c] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2020-09-21 12:41:35.075  INFO 1 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 8030 (http)
2020-09-21 12:41:35.116  INFO 1 --- [           main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2020-09-21 12:41:35.116  INFO 1 --- [           main] org.apache.catalina.core.StandardEngine  : Starting Servlet engine: [Apache Tomcat/9.0.16]
2020-09-21 12:41:35.125  INFO 1 --- [           main] o.a.catalina.core.AprLifecycleListener   : The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: [/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib]
2020-09-21 12:41:35.227  INFO 1 --- [           main] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2020-09-21 12:41:35.227  INFO 1 --- [           main] o.s.web.context.ContextLoader            : Root WebApplicationContext: initialization completed in 1552 ms
2020-09-21 12:41:35.590  INFO 1 --- [           main] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Starting...
2020-09-21 12:41:35.711  INFO 1 --- [           main] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Start completed.
2020-09-21 12:41:35.756  INFO 1 --- [           main] o.hibernate.jpa.internal.util.LogHelper  : HHH000204: Processing PersistenceUnitInfo [
	name: default
	...]
2020-09-21 12:41:35.819  INFO 1 --- [           main] org.hibernate.Version                    : HHH000412: Hibernate Core {5.3.7.Final}
2020-09-21 12:41:35.820  INFO 1 --- [           main] org.hibernate.cfg.Environment            : HHH000206: hibernate.properties not found
2020-09-21 12:41:35.966  INFO 1 --- [           main] o.hibernate.annotations.common.Version   : HCANN000001: Hibernate Commons Annotations {5.0.4.Final}
2020-09-21 12:41:36.171  INFO 1 --- [           main] org.hibernate.dialect.Dialect            : HHH000400: Using dialect: org.hibernate.dialect.H2Dialect
2020-09-21 12:41:36.675  INFO 1 --- [           main] o.h.t.schema.internal.SchemaCreatorImpl  : HHH000476: Executing import script 'org.hibernate.tool.schema.internal.exec.ScriptSourceInputNonExistentImpl@492691d7'
2020-09-21 12:41:36.677  INFO 1 --- [           main] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default'
2020-09-21 12:41:36.853  INFO 1 --- [           main] u.c.d.d.s.config.DataGenerator           : Generating synthetic data for demonstration purposes...
2020-09-21 12:41:36.919  INFO 1 --- [           main] u.c.d.d.s.config.DataGenerator           : ... data generation complete
2020-09-21 12:41:37.155  INFO 1 --- [           main] o.s.s.concurrent.ThreadPoolTaskExecutor  : Initializing ExecutorService 'applicationTaskExecutor'
2020-09-21 12:41:37.267  WARN 1 --- [           main] aWebConfiguration$JpaWebMvcConfiguration : spring.jpa.open-in-view is enabled by default. Therefore, database queries may be performed during view rendering. Explicitly configure spring.jpa.open-in-view to disable this warning
2020-09-21 12:41:37.469  INFO 1 --- [           main] o.s.b.a.e.web.EndpointLinksResolver      : Exposing 2 endpoint(s) beneath base path '/actuator'
2020-09-21 12:41:37.516  INFO 1 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat started on port(s): 8030 (http) with context path ''
2020-09-21 12:41:37.517  INFO 1 --- [           main] u.c.d.d.s.StockManagerApplication        : Started StockManagerApplication in 4.164 seconds (JVM running for 4.499)
2020-09-21 12:42:12.676  INFO 1 --- [nio-8030-exec-1] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring DispatcherServlet 'dispatcherServlet'
2020-09-21 12:42:12.676  INFO 1 --- [nio-8030-exec-1] o.s.web.servlet.DispatcherServlet        : Initializing Servlet 'dispatcherServlet'
2020-09-21 12:42:12.683  INFO 1 --- [nio-8030-exec-1] o.s.web.servlet.DispatcherServlet        : Completed initialization in 7 ms

2020-09-21 12:42:32.650  INFO 1 --- [       Thread-5] o.s.s.concurrent.ThreadPoolTaskExecutor  : Shutting down ExecutorService 'applicationTaskExecutor'
2020-09-21 12:42:32.651  INFO 1 --- [       Thread-5] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'default'
2020-09-21 12:42:32.651  INFO 1 --- [       Thread-5] .SchemaDropperImpl$DelayedDropActionImpl : HHH000477: Starting delayed evictData of schema as part of SessionFactory shut-down'
2020-09-21 12:42:32.656  INFO 1 --- [       Thread-5] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Shutdown initiated...
2020-09-21 12:42:32.658  INFO 1 --- [       Thread-5] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Shutdown completed.

No exception. I don't know why this spring app shutdown.

livenessProbe changed. Now the path is /actuator/health.
The logs show spring exposed 2 endpoint(s) beneath base path '/actuator'. Problem solved.