在Intellij中运行Java应用程序,停留在:HikariPool-1-启动

时间:2019-01-29 18:30:05

标签: java docker mariadb

例如,如果我需要在Intellij中重新启动会话,我总是会卡在这里,我相信这与我的数据库有关,后者是在docker中运行的mariadb。到目前为止,唯一的解决方案是重新启动计算机,我认为这是非常严格的解决方案。

CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS                      NAMES
c54527dea5d8        mariadb             "docker-entrypoint.s…"   2 months ago        Up About an hour    127.0.0.1:3306->3306/tcp   suspicious_sinoussi

:: Spring Boot ::        (v2.0.1.RELEASE)

2019-01-29 18:19:02.921  INFO 3979 --- [           main] c.netapp.qronicle.QronicleApplicationKt  : Starting QronicleApplicationKt on jmasson-mac-0 with PID 3979 (/Users/jonma/Development/java/report-generator/target/classes started by jonma in /Users/jonma/Development/java/report-generator)
2019-01-29 18:19:02.980  INFO 3979 --- [           main] c.netapp.qronicle.QronicleApplicationKt  : No active profile set, falling back to default profiles: default
2019-01-29 18:19:03.295  INFO 3979 --- [           main] ConfigServletWebServerApplicationContext : Refreshing org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@1ed6388a: startup date [Tue Jan 29 18:19:03 GMT 2019]; root of context hierarchy
2019-01-29 18:19:07.020  INFO 3979 --- [           main] f.a.AutowiredAnnotationBeanPostProcessor : JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
2019-01-29 18:19:07.570  INFO 3979 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 9096 (http)
2019-01-29 18:19:07.601  INFO 3979 --- [           main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2019-01-29 18:19:07.601  INFO 3979 --- [           main] org.apache.catalina.core.StandardEngine  : Starting Servlet Engine: Apache Tomcat/8.5.29
2019-01-29 18:19:07.613  INFO 3979 --- [ost-startStop-1] 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: [/Users/jonma/Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:.]
2019-01-29 18:19:07.753  INFO 3979 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2019-01-29 18:19:07.753  INFO 3979 --- [ost-startStop-1] o.s.web.context.ContextLoader            : Root WebApplicationContext: initialization completed in 4459 ms
2019-01-29 18:19:08.679  INFO 3979 --- [ost-startStop-1] o.s.b.w.servlet.ServletRegistrationBean  : Servlet dispatcherServlet mapped to [/]
2019-01-29 18:19:08.684  INFO 3979 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'characterEncodingFilter' to: [/*]
2019-01-29 18:19:08.685  INFO 3979 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'httpTraceFilter' to: [/*]
2019-01-29 18:19:08.685  INFO 3979 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'webMvcMetricsFilter' to: [/*]
2019-01-29 18:19:08.747  INFO 3979 --- [           main] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Starting...

debug添加到了zaxxer.hikar

----------> Parent Classloader:
sun.misc.Launcher$AppClassLoader@18b4aac2

2019-01-29 18:45:36.680  INFO 4407 --- [ost-startStop-1] o.s.b.w.servlet.ServletRegistrationBean  : Servlet dispatcherServlet mapped to [/]
2019-01-29 18:45:36.685  INFO 4407 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'characterEncodingFilter' to: [/*]
2019-01-29 18:45:36.686  INFO 4407 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'httpTraceFilter' to: [/*]
2019-01-29 18:45:36.687  INFO 4407 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'webMvcMetricsFilter' to: [/*]
2019-01-29 18:45:36.749 DEBUG 4407 --- [           main] com.zaxxer.hikari.HikariConfig           : HikariPool-1 - configuration:
2019-01-29 18:45:36.752 DEBUG 4407 --- [           main] com.zaxxer.hikari.HikariConfig           : allowPoolSuspension.............false
2019-01-29 18:45:36.752 DEBUG 4407 --- [           main] com.zaxxer.hikari.HikariConfig           : autoCommit......................true
2019-01-29 18:45:36.752 DEBUG 4407 --- [           main] com.zaxxer.hikari.HikariConfig           : catalog.........................none
2019-01-29 18:45:36.752 DEBUG 4407 --- [           main] com.zaxxer.hikari.HikariConfig           : connectionInitSql...............none
2019-01-29 18:45:36.752 DEBUG 4407 --- [           main] com.zaxxer.hikari.HikariConfig           : connectionTestQuery.............none
2019-01-29 18:45:36.752 DEBUG 4407 --- [           main] com.zaxxer.hikari.HikariConfig           : connectionTimeout...............30000
2019-01-29 18:45:36.752 DEBUG 4407 --- [           main] com.zaxxer.hikari.HikariConfig           : dataSource......................none
2019-01-29 18:45:36.752 DEBUG 4407 --- [           main] com.zaxxer.hikari.HikariConfig           : dataSourceClassName.............none
2019-01-29 18:45:36.752 DEBUG 4407 --- [           main] com.zaxxer.hikari.HikariConfig           : dataSourceJNDI..................none
2019-01-29 18:45:36.753 DEBUG 4407 --- [           main] com.zaxxer.hikari.HikariConfig           : dataSourceProperties............{password=<masked>}
2019-01-29 18:45:36.753 DEBUG 4407 --- [           main] com.zaxxer.hikari.HikariConfig           : driverClassName................."org.mariadb.jdbc.Driver"
2019-01-29 18:45:36.753 DEBUG 4407 --- [           main] com.zaxxer.hikari.HikariConfig           : healthCheckProperties...........{}
2019-01-29 18:45:36.753 DEBUG 4407 --- [           main] com.zaxxer.hikari.HikariConfig           : healthCheckRegistry.............none
2019-01-29 18:45:36.753 DEBUG 4407 --- [           main] com.zaxxer.hikari.HikariConfig           : idleTimeout.....................600000
2019-01-29 18:45:36.754 DEBUG 4407 --- [           main] com.zaxxer.hikari.HikariConfig           : initializationFailFast..........true
2019-01-29 18:45:36.754 DEBUG 4407 --- [           main] com.zaxxer.hikari.HikariConfig           : initializationFailTimeout.......1
2019-01-29 18:45:36.754 DEBUG 4407 --- [           main] com.zaxxer.hikari.HikariConfig           : isolateInternalQueries..........false
2019-01-29 18:45:36.754 DEBUG 4407 --- [           main] com.zaxxer.hikari.HikariConfig           : jdbc4ConnectionTest.............false
2019-01-29 18:45:36.754 DEBUG 4407 --- [           main] com.zaxxer.hikari.HikariConfig           : jdbcUrl.........................jdbc:mysql://localhost/qronicle?createDatabaseIfNotExist=true
2019-01-29 18:45:36.754 DEBUG 4407 --- [           main] com.zaxxer.hikari.HikariConfig           : leakDetectionThreshold..........0
2019-01-29 18:45:36.754 DEBUG 4407 --- [           main] com.zaxxer.hikari.HikariConfig           : maxLifetime.....................1800000
2019-01-29 18:45:36.754 DEBUG 4407 --- [           main] com.zaxxer.hikari.HikariConfig           : maximumPoolSize.................10
2019-01-29 18:45:36.755 DEBUG 4407 --- [           main] com.zaxxer.hikari.HikariConfig           : metricRegistry..................none
2019-01-29 18:45:36.755 DEBUG 4407 --- [           main] com.zaxxer.hikari.HikariConfig           : metricsTrackerFactory...........com.zaxxer.hikari.metrics.micrometer.MicrometerMetricsTrackerFactory@68b366e2
2019-01-29 18:45:36.755 DEBUG 4407 --- [           main] com.zaxxer.hikari.HikariConfig           : minimumIdle.....................10
2019-01-29 18:45:36.755 DEBUG 4407 --- [           main] com.zaxxer.hikari.HikariConfig           : password........................<masked>
2019-01-29 18:45:36.755 DEBUG 4407 --- [           main] com.zaxxer.hikari.HikariConfig           : poolName........................"HikariPool-1"
2019-01-29 18:45:36.755 DEBUG 4407 --- [           main] com.zaxxer.hikari.HikariConfig           : readOnly........................false
2019-01-29 18:45:36.755 DEBUG 4407 --- [           main] com.zaxxer.hikari.HikariConfig           : registerMbeans..................false
2019-01-29 18:45:36.755 DEBUG 4407 --- [           main] com.zaxxer.hikari.HikariConfig           : scheduledExecutor...............none
2019-01-29 18:45:36.755 DEBUG 4407 --- [           main] com.zaxxer.hikari.HikariConfig           : scheduledExecutorService........internal
2019-01-29 18:45:36.755 DEBUG 4407 --- [           main] com.zaxxer.hikari.HikariConfig           : schema..........................none
2019-01-29 18:45:36.755 DEBUG 4407 --- [           main] com.zaxxer.hikari.HikariConfig           : threadFactory...................internal
2019-01-29 18:45:36.756 DEBUG 4407 --- [           main] com.zaxxer.hikari.HikariConfig           : transactionIsolation............default
2019-01-29 18:45:36.756 DEBUG 4407 --- [           main] com.zaxxer.hikari.HikariConfig           : username........................"root"
2019-01-29 18:45:36.756 DEBUG 4407 --- [           main] com.zaxxer.hikari.HikariConfig           : validationTimeout...............5000
2019-01-29 18:45:36.756  INFO 4407 --- [           main] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Starting...

1 个答案:

答案 0 :(得分:-2)

您可以重新启动docker。无需重启计算机。 新的Docker版本会出现此问题。尝试使用较旧的版本,例如18.06.1

发现了相同的问题here

有人知道如何解决此问题吗?