Hikari Пул данных закрывается в загрузочном приложении Spring - PullRequest
0 голосов
/ 08 сентября 2018

Мы сталкиваемся с проблемой ниже при миграции.

  • Spring Batch 4.0.x из 3.0.x
  • Spring Boot 2.0.x от 1.5.x
  • Пружинное ядро ​​5.0.x из 4.3.x

После перезапуска приложения я мог видеть, что через минуту оно выдает журналы как SpringBootJPAHikariCP - Shutdown initiated.... Но когда мы запускаем Job, Hikari запускает новые соединения и работает как положено. Но я не уверен, почему первое соединение закрывается через минуту.

Я понял, что SpringBoot2.0 использует Hikari для пула БД, но не уверен, почему я вижу отключение информационных журналов через одну минуту идеального времени.

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

2018-09-07 17:16:38,117 -0700,threadId=1,level=INFO ,logger=,msg="The following profiles are active: local" 
2018-09-07 17:16:39,495 -0700,threadId=1,level=WARN ,logger=HikariConfig.1081,msg="SpringBootJPAHikariCP - idleTimeout is close to or more than maxLifetime, disabling it." 
2018-09-07 17:16:39,495 -0700,threadId=1,level=INFO ,logger=HikariDataSource.110,msg="SpringBootJPAHikariCP - Starting..." 
Fri Sep 07 17:16:39 PDT 2018 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
2018-09-07 17:16:39,695 -0700,threadId=1,level=INFO ,logger=HikariDataSource.123,msg="SpringBootJPAHikariCP - Start completed." 
Fri Sep 07 17:16:39 PDT 2018 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
Fri Sep 07 17:16:39 PDT 2018 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
Fri Sep 07 17:16:39 PDT 2018 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
Fri Sep 07 17:16:39 PDT 2018 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
Fri Sep 07 17:16:39 PDT 2018 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
Fri Sep 07 17:16:39 PDT 2018 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
Fri Sep 07 17:16:39 PDT 2018 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
Fri Sep 07 17:16:39 PDT 2018 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
Fri Sep 07 17:16:39 PDT 2018 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
2018-09-07 17:16:40,002 -0700,threadId=1,level=INFO ,logger=Http11NioProtocol.180,msg="Initializing ProtocolHandler ["http-nio-8080"]" 
2018-09-07 17:16:40,010 -0700,threadId=1,level=INFO ,logger=StandardService.180,msg="Starting service [Tomcat]" 
2018-09-07 17:16:40,011 -0700,threadId=1,level=INFO ,logger=StandardEngine.180,msg="Starting Servlet Engine: Apache Tomcat/8.5.32" 
2018-09-07 17:16:40,014 -0700,threadId=54,level=INFO ,logger=AprLifecycleListener.180,msg="The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: [/Users/xxxxx/Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:.]" 
2018-09-07 17:16:40,117 -0700,threadId=54,level=INFO ,logger=[/].180,msg="Initializing Spring embedded WebApplicationContext" 
2018-09-07 17:16:40,310 -0700,threadId=54,level=INFO ,logger=ReceiverConfig$$EnhancerBySpringCGLIB$$8c1192a0.68,msg="creating activeMQConnectionFactory" 
2018-09-07 17:16:40,786 -0700,threadId=1,level=WARN ,logger=Flyway.53,msg="Flyway.setCallbacks(FlywayCallback) has been deprecated and will be removed in Flyway 6.0. Use Flyway.setCallbacks(Callback) instead." 
2018-09-07 17:16:40,804 -0700,threadId=1,level=INFO ,logger=VersionPrinter.49,msg="Flyway Community Edition 5.1.4 by Boxfuse" 
2018-09-07 17:16:40,807 -0700,threadId=1,level=INFO ,logger=DatabaseFactory.49,msg="Database: jdbc:mysql://127.0.0.1:3306/invoicing (MySQL 5.7)" 
2018-09-07 17:16:40,853 -0700,threadId=1,level=INFO ,logger=DbValidate.49,msg="Successfully validated 2 migrations (execution time 00:00.015s)" 
2018-09-07 17:16:40,861 -0700,threadId=1,level=INFO ,logger=DbMigrate.49,msg="Current version of schema `invoicing`: 1.0.13.1" 
2018-09-07 17:16:40,862 -0700,threadId=1,level=INFO ,logger=DbMigrate.49,msg="Schema `invoicing` is up to date. No migration necessary." 
2018-09-07 17:16:43,166 -0700,threadId=1,level=ERROR,logger=,msg="[ThreadID-1] Warning: big time skew between machina and client: service=1536365803166 client=1536365760000 diffSecs=43" 
2018-09-07 17:16:44,425 -0700,threadId=1,level=WARN ,logger=JpaBaseConfiguration$JpaWebConfiguration$JpaWebMvcConfiguration.235,msg="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" 
2018-09-07 17:16:45,814 -0700,threadId=85,level=INFO ,logger=FailoverTransport.1052,msg="Successfully connected to ssl://qal.message-preprod.a.intuit.com:61617" 
2018-09-07 17:16:46,100 -0700,threadId=1,level=INFO ,logger=Http11NioProtocol.180,msg="Starting ProtocolHandler ["http-nio-8080"]" 
2018-09-07 17:16:46,120 -0700,threadId=1,level=INFO ,logger=NioSelectorPool.180,msg="Using a shared selector for servlet write/read" 
2018-09-07 17:16:46,133 -0700,threadId=1,level=INFO ,logger=LateFeeProcessor.59,msg="Started LateFeeProcessor in 12.283 seconds (JVM running for 13.152)" 
2018-09-07 17:16:46,429 -0700,threadId=19,level=INFO ,logger=[/].180,msg="Initializing Spring FrameworkServlet 'dispatcherServlet'" 
2018-09-07 17:17:47,868 -0700,threadId=93,level=INFO ,logger=HikariDataSource.381,msg="SpringBootJPAHikariCP - Shutdown initiated..." 
2018-09-07 17:17:47,876 -0700,threadId=93,level=INFO ,logger=HikariDataSource.383,msg="SpringBootJPAHikariCP - Shutdown completed." 

1 Ответ

0 голосов
/ 09 сентября 2018

У меня есть какая-то проблема, и до сих пор я обнаружил, что каким-то образом Spring выдает команду выключения Хикари, думая, что это одноразовый боб.

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...