我试图在我的本地Debian10机器上运行Acrarium--只是为了测试它--通过运行docker-compose up
命令和这个compose文件:
version: '3.7'
services:
database:
image: mysql
container_name: database
environment:
MYSQL_ROOT_PASSWORD: 4f3g2h1j
MYSQL_DATABASE: acrariumdb
MYSQL_USER: acrariumuser
MYSQL_PASSWORD: a1b2c3d4
MYSQL_ROOT_HOST: '%'
expose:
- '3306'
volumes:
- 'acrarium_data:/var/lib/mysql'
acrarium:
image: 'f43nd1r/acrarium:latest'
container_name: acrarium
depends_on:
- database
ports:
- '8080:8080'
environment:
SPRING_DATASOURCE_URL: jdbc:mysql://database:3306/acrariumdb?useSSL=false&allowPublicKeyRetrieval=true&useLegacyDatetimeCode=false&serverTimezone=UTC
SPRING_DATASOURCE_USERNAME: acrariumuser
SPRING_DATASOURCE_PASSWORD: a1b2c3d4
SPRING_DATASOURCE_PLATFORM: org.hibernate.dialect.MySQL57Dialect
SPRING_JPA_DATABASE-PLATFORM: org.hibernate.dialect.MySQL57Dialect
volumes:
acrarium_data: null
数据库成功运行,但当运行acrarium时,我在TERMINAL中遇到以下错误:
HikariPool-1-池初始化期间出现异常。com.mysql.cj.jdbc.exceptions.CommunicationsException:通信链接失败上次成功发送到服务器的数据包是0毫秒前。驱动程序没有从服务器接收到任何数据包。
在docker-compose中,一切看起来都很正常,谷歌没有给出任何新的参数或值来在compose文件中使用。你知道我错过了什么吗?提前道谢。
附注。以下是运行docker-compose up
时Terminal的完整输出:
Starting database ... done
Starting acrarium ... done
Attaching to database, acrarium
database | 2021-01-08 18:53:07+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.22-1debian10 started.
database | 2021-01-08 18:53:07+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
database | 2021-01-08 18:53:07+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.22-1debian10 started.
database | 2021-01-08T18:53:07.648889Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.22) starting as process 1
database | 2021-01-08T18:53:07.657956Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
database | 2021-01-08T18:53:07.822776Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
database | 2021-01-08T18:53:08.046428Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060, socket: /var/run/mysqld/mysqlx.sock
database | 2021-01-08T18:53:08.129888Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
database | 2021-01-08T18:53:08.130131Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
database | 2021-01-08T18:53:08.132768Z 0 [Warning] [MY-011810] [Server] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory.
database | 2021-01-08T18:53:08.155520Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.22' socket: '/var/run/mysqld/mysqld.sock' port: 3306 MySQL Community Server - GPL.
acrarium | _
acrarium | /\ (_)
acrarium | / \ ___ _ __ __ _ _ __ _ _ _ _ __ ___
acrarium | / /\ \ / __| | '__| / _` | | '__| | | | | | | | '_ ` _ \
acrarium | / ____ \ | (__ | | | (_| | | | | | | |_| | | | | | | |
acrarium | /_/ \_\ \___| |_| \__,_| |_| |_| \__,_| |_| |_| |_|
acrarium |
acrarium | 2021-01-08 18:53:09.092 INFO 1 --- [ main] com.faendir.acra.BackendApplicationKt : Starting BackendApplicationKt v1.1.0 using Java 11.0.9.1 on 62c59e609fa4 with PID 1 (/application/BOOT-INF/classes started by root in /application)
acrarium | 2021-01-08 18:53:09.096 INFO 1 --- [ main] com.faendir.acra.BackendApplicationKt : No active profile set, falling back to default profiles: default
acrarium | 2021-01-08 18:53:09.307 INFO 1 --- [ main] o.s.c.a.ConfigurationClassParser : Properties location [file:${user.home}/.config/acrarium/application.properties] not resolvable: /root/.config/acrarium/application.properties (No such file or directory)
acrarium | 2021-01-08 18:53:09.307 INFO 1 --- [ main] o.s.c.a.ConfigurationClassParser : Properties location [file:${user.home}/.acra/application.properties] not resolvable: /root/.acra/application.properties (No such file or directory)
acrarium | 2021-01-08 18:53:11.026 INFO 1 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode.
acrarium | 2021-01-08 18:53:11.092 INFO 1 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 59 ms. Found 0 JPA repository interfaces.
acrarium | 2021-01-08 18:53:11.466 INFO 1 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.security.access.expression.method.DefaultMethodSecurityExpressionHandler@1c7cd434' of type [org.springframework.security.access.expression.method.DefaultMethodSecurityExpressionHandler] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
acrarium | 2021-01-08 18:53:11.474 INFO 1 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'methodSecurityMetadataSource' of type [org.springframework.security.access.method.DelegatingMethodSecurityMetadataSource] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
acrarium | 2021-01-08 18:53:11.719 INFO 1 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8080 (http)
acrarium | 2021-01-08 18:53:11.730 INFO 1 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
acrarium | 2021-01-08 18:53:11.730 INFO 1 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.41]
acrarium | 2021-01-08 18:53:11.955 INFO 1 --- [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
acrarium | 2021-01-08 18:53:11.956 INFO 1 --- [ main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 2762 ms
acrarium | 2021-01-08 18:53:12.471 INFO 1 --- [ main] c.v.f.s.VaadinServletContextInitializer : Search for VaadinAppShell took 175 ms
acrarium | 2021-01-08 18:53:12.622 INFO 1 --- [ main] c.g.z.f.compression.CompressingFilter : CompressingFilter has initialized
acrarium | 2021-01-08 18:53:12.777 INFO 1 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...
acrarium | 2021-01-08 18:53:44.050 ERROR 1 --- [ main] com.zaxxer.hikari.pool.HikariPool : HikariPool-1 - Exception during pool initialization.
acrarium |
acrarium | com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure
acrarium |
acrarium | The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
acrarium | at com.mysql.cj.jdbc.exceptions.SQLError.createCommunicationsException(SQLError.java:174) ~[mysql-connector-java-8.0.22.jar:8.0.22]
acrarium | at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:64) ~[mysql-connector-java-8.0.22.jar:8.0.22]
acrarium | at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:836) ~[mysql-connector-java-8.0.22.jar:8.0.22]
acrarium | at com.mysql.cj.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:456) ~[mysql-connector-java-8.0.22.jar:8.0.22]
acrarium | at com.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:246) ~[mysql-connector-java-8.0.22.jar:8.0.22]
acrarium | at com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:198) ~[mysql-connector-java-8.0.22.jar:8.0.22]
acrarium | at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:138) ~[HikariCP-3.4.5.jar:na]
acrarium | at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:358) ~[HikariCP-3.4.5.jar:na]
acrarium | at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:206) ~[HikariCP-3.4.5.jar:na]
acrarium | at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:477) ~[HikariCP-3.4.5.jar:na]
acrarium | at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:560) ~[HikariCP-3.4.5.jar:na]
acrarium | at com.zaxxer.hikari.pool.HikariPool.<init>(HikariPool.java:115) ~[HikariCP-3.4.5.jar:na]
acrarium | at com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:112) ~[HikariCP-3.4.5.jar:na]
acrarium | at liquibase.integration.spring.SpringLiquibase.afterPropertiesSet(SpringLiquibase.java:313) ~[liquibase-core-3.10.3.jar:na]
acrarium | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1847) ~[spring-beans-5.3.2.jar:5.3.2]
acrarium | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1784) ~[spring-beans-5.3.2.jar:5.3.2]
acrarium | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:609) ~[spring-beans-5.3.2.jar:5.3.2]
acrarium | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:531) ~[spring-beans-5.3.2.jar:5.3.2]
acrarium | at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.2.jar:5.3.2]
acrarium | at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.2.jar:5.3.2]
acrarium | at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.2.jar:5.3.2]
acrarium | at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[spring-beans-5.3.2.jar:5.3.2]
acrarium | at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:322) ~[spring-beans-5.3.2.jar:5.3.2]
acrarium | at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[spring-beans-5.3.2.jar:5.3.2]
acrarium | at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1159) ~[spring-context-5.3.2.jar:5.3.2]
acrarium | at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:913) ~[spring-context-5.3.2.jar:5.3.2]
acrarium | at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:588) ~[spring-context-5.3.2.jar:5.3.2]
acrarium | at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:144) ~[spring-boot-2.4.1.jar:2.4.1]
acrarium | at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:767) ~[spring-boot-2.4.1.jar:2.4.1]
acrarium | at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:759) ~[spring-boot-2.4.1.jar:2.4.1]
acrarium | at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:426) ~[spring-boot-2.4.1.jar:2.4.1]
acrarium | at org.springframework.boot.SpringApplication.run(SpringApplication.java:326) ~[spring-boot-2.4.1.jar:2.4.1]
acrarium | at org.springframework.boot.SpringApplication.run(SpringApplication.java:1309) ~[spring-boot-2.4.1.jar:2.4.1]
acrarium | at org.springframework.boot.SpringApplication.run(SpringApplication.java:1298) ~[spring-boot-2.4.1.jar:2.4.1]
acrarium | at com.faendir.acra.BackendApplicationKt.main(BackendApplication.kt:43) ~[classes/:1.1.0]
acrarium | at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
acrarium | at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[na:na]
acrarium | at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:na]
acrarium | at java.base/java.lang.reflect.Method.invoke(Unknown Source) ~[na:na]
acrarium | at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49) ~[application/:na]
acrarium | at org.springframework.boot.loader.Launcher.launch(Launcher.java:107) ~[application/:na]
acrarium | at org.springframework.boot.loader.Launcher.launch(Launcher.java:58) ~[application/:na]
acrarium | at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:88) ~[application/:na]
acrarium | Caused by: com.mysql.cj.exceptions.CJCommunicationsException: Communications link failure
acrarium |
acrarium | The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
acrarium | at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:na]
acrarium | at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) ~[na:na]
acrarium | at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) ~[na:na]
acrarium | at java.base/java.lang.reflect.Constructor.newInstance(Unknown Source) ~[na:na]
acrarium | at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:61) ~[mysql-connector-java-8.0.22.jar:8.0.22]
acrarium | at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:105) ~[mysql-connector-java-8.0.22.jar:8.0.22]
acrarium | at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:151) ~[mysql-connector-java-8.0.22.jar:8.0.22]
acrarium | at com.mysql.cj.exceptions.ExceptionFactory.createCommunicationsException(ExceptionFactory.java:167) ~[mysql-connector-java-8.0.22.jar:8.0.22]
acrarium | at com.mysql.cj.protocol.a.NativeSocketConnection.connect(NativeSocketConnection.java:89) ~[mysql-connector-java-8.0.22.jar:8.0.22]
acrarium | at com.mysql.cj.NativeSession.connect(NativeSession.java:144) ~[mysql-connector-java-8.0.22.jar:8.0.22]
acrarium | at com.mysql.cj.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:956) ~[mysql-connector-java-8.0.22.jar:8.0.22]
acrarium | at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:826) ~[mysql-connector-java-8.0.22.jar:8.0.22]
acrarium | ... 40 common frames omitted
acrarium | Caused by: java.net.SocketTimeoutException: connect timed out
acrarium | at java.base/java.net.PlainSocketImpl.socketConnect(Native Method) ~[na:na]
acrarium | at java.base/java.net.AbstractPlainSocketImpl.doConnect(Unknown Source) ~[na:na]
acrarium | at java.base/java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source) ~[na:na]
acrarium | at java.base/java.net.AbstractPlainSocketImpl.connect(Unknown Source) ~[na:na]
acrarium | at java.base/java.net.SocksSocketImpl.connect(Unknown Source) ~[na:na]
acrarium | at java.base/java.net.Socket.connect(Unknown Source) ~[na:na]
acrarium | at com.mysql.cj.protocol.StandardSocketFactory.connect(StandardSocketFactory.java:155) ~[mysql-connector-java-8.0.22.jar:8.0.22]
acrarium | at com.mysql.cj.protocol.a.NativeSocketConnection.connect(NativeSocketConnection.java:63) ~[mysql-connector-java-8.0.22.jar:8.0.22]
acrarium | ... 43 common frames omitted
acrarium |
acrarium | 2021-01-08 18:53:44.054 WARN 1 --- [ main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'liquibase' defined in file [/application/BOOT-INF/classes/com/faendir/acra/liquibase/ChangeAwareSpringLiquibase.class]: Invocation of init method failed; nested exception is liquibase.exception.DatabaseException: com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure
acrarium |
acrarium | The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
acrarium | 2021-01-08 18:53:44.064 INFO 1 --- [ main] o.apache.catalina.core.StandardService : Stopping service [Tomcat]
acrarium | 2021-01-08 18:53:44.068 INFO 1 --- [ main] c.g.z.f.compression.CompressingFilter : CompressingFilter is being destroyed...
acrarium | 2021-01-08 18:53:44.097 INFO 1 --- [ main] ConditionEvaluationReportLoggingListener :
acrarium |
acrarium | Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
acrarium | 2021-01-08 18:53:44.122 ERROR 1 --- [ main] o.s.boot.SpringApplication : Application run failed
acrarium |
acrarium | org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'liquibase' defined in file [/application/BOOT-INF/classes/com/faendir/acra/liquibase/ChangeAwareSpringLiquibase.class]: Invocation of init method failed; nested exception is liquibase.exception.DatabaseException: com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure
acrarium |
acrarium | The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
acrarium | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1788) ~[spring-beans-5.3.2.jar:5.3.2]
acrarium | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:609) ~[spring-beans-5.3.2.jar:5.3.2]
acrarium | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:531) ~[spring-beans-5.3.2.jar:5.3.2]
acrarium | at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.2.jar:5.3.2]
acrarium | at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.2.jar:5.3.2]
acrarium | at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.2.jar:5.3.2]
acrarium | at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[spring-beans-5.3.2.jar:5.3.2]
acrarium | at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:322) ~[spring-beans-5.3.2.jar:5.3.2]
acrarium | at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[spring-beans-5.3.2.jar:5.3.2]
acrarium | at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1159) ~[spring-context-5.3.2.jar:5.3.2]
acrarium | at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:913) ~[spring-context-5.3.2.jar:5.3.2]
acrarium | at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:588) ~[spring-context-5.3.2.jar:5.3.2]
acrarium | at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:144) ~[spring-boot-2.4.1.jar:2.4.1]
acrarium | at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:767) ~[spring-boot-2.4.1.jar:2.4.1]
acrarium | at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:759) ~[spring-boot-2.4.1.jar:2.4.1]
acrarium | at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:426) ~[spring-boot-2.4.1.jar:2.4.1]
acrarium | at org.springframework.boot.SpringApplication.run(SpringApplication.java:326) ~[spring-boot-2.4.1.jar:2.4.1]
acrarium | at org.springframework.boot.SpringApplication.run(SpringApplication.java:1309) ~[spring-boot-2.4.1.jar:2.4.1]
acrarium | at org.springframework.boot.SpringApplication.run(SpringApplication.java:1298) ~[spring-boot-2.4.1.jar:2.4.1]
acrarium | at com.faendir.acra.BackendApplicationKt.main(BackendApplication.kt:43) ~[classes/:1.1.0]
acrarium | at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
acrarium | at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[na:na]
acrarium | at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:na]
acrarium | at java.base/java.lang.reflect.Method.invoke(Unknown Source) ~[na:na]
acrarium | at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49) ~[application/:na]
acrarium | at org.springframework.boot.loader.Launcher.launch(Launcher.java:107) ~[application/:na]
acrarium | at org.springframework.boot.loader.Launcher.launch(Launcher.java:58) ~[application/:na]
acrarium | at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:88) ~[application/:na]
acrarium | Caused by: liquibase.exception.DatabaseException: com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure
acrarium |
acrarium | The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
acrarium | at liquibase.integration.spring.SpringLiquibase.afterPropertiesSet(SpringLiquibase.java:318) ~[liquibase-core-3.10.3.jar:na]
acrarium | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1847) ~[spring-beans-5.3.2.jar:5.3.2]
acrarium | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1784) ~[spring-beans-5.3.2.jar:5.3.2]
acrarium | ... 27 common frames omitted
acrarium | Caused by: com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure
acrarium |
acrarium | The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
acrarium | at com.mysql.cj.jdbc.exceptions.SQLError.createCommunicationsException(SQLError.java:174) ~[mysql-connector-java-8.0.22.jar:8.0.22]
acrarium | at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:64) ~[mysql-connector-java-8.0.22.jar:8.0.22]
acrarium | at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:836) ~[mysql-connector-java-8.0.22.jar:8.0.22]
acrarium | at com.mysql.cj.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:456) ~[mysql-connector-java-8.0.22.jar:8.0.22]
acrarium | at com.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:246) ~[mysql-connector-java-8.0.22.jar:8.0.22]
acrarium | at com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:198) ~[mysql-connector-java-8.0.22.jar:8.0.22]
acrarium | at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:138) ~[HikariCP-3.4.5.jar:na]
acrarium | at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:358) ~[HikariCP-3.4.5.jar:na]
acrarium | at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:206) ~[HikariCP-3.4.5.jar:na]
acrarium | at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:477) ~[HikariCP-3.4.5.jar:na]
acrarium | at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:560) ~[HikariCP-3.4.5.jar:na]
acrarium | at com.zaxxer.hikari.pool.HikariPool.<init>(HikariPool.java:115) ~[HikariCP-3.4.5.jar:na]
acrarium | at com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:112) ~[HikariCP-3.4.5.jar:na]
acrarium | at liquibase.integration.spring.SpringLiquibase.afterPropertiesSet(SpringLiquibase.java:313) ~[liquibase-core-3.10.3.jar:na]
acrarium | ... 29 common frames omitted
acrarium | Caused by: com.mysql.cj.exceptions.CJCommunicationsException: Communications link failure
acrarium |
acrarium | The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
acrarium | at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:na]
acrarium | at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) ~[na:na]
acrarium | at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) ~[na:na]
acrarium | at java.base/java.lang.reflect.Constructor.newInstance(Unknown Source) ~[na:na]
acrarium | at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:61) ~[mysql-connector-java-8.0.22.jar:8.0.22]
acrarium | at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:105) ~[mysql-connector-java-8.0.22.jar:8.0.22]
acrarium | at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:151) ~[mysql-connector-java-8.0.22.jar:8.0.22]
acrarium | at com.mysql.cj.exceptions.ExceptionFactory.createCommunicationsException(ExceptionFactory.java:167) ~[mysql-connector-java-8.0.22.jar:8.0.22]
acrarium | at com.mysql.cj.protocol.a.NativeSocketConnection.connect(NativeSocketConnection.java:89) ~[mysql-connector-java-8.0.22.jar:8.0.22]
acrarium | at com.mysql.cj.NativeSession.connect(NativeSession.java:144) ~[mysql-connector-java-8.0.22.jar:8.0.22]
acrarium | at com.mysql.cj.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:956) ~[mysql-connector-java-8.0.22.jar:8.0.22]
acrarium | at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:826) ~[mysql-connector-java-8.0.22.jar:8.0.22]
acrarium | ... 40 common frames omitted
acrarium | Caused by: java.net.SocketTimeoutException: connect timed out
acrarium | at java.base/java.net.PlainSocketImpl.socketConnect(Native Method) ~[na:na]
acrarium | at java.base/java.net.AbstractPlainSocketImpl.doConnect(Unknown Source) ~[na:na]
acrarium | at java.base/java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source) ~[na:na]
acrarium | at java.base/java.net.AbstractPlainSocketImpl.connect(Unknown Source) ~[na:na]
acrarium | at java.base/java.net.SocksSocketImpl.connect(Unknown Source) ~[na:na]
acrarium | at java.base/java.net.Socket.connect(Unknown Source) ~[na:na]
acrarium | at com.mysql.cj.protocol.StandardSocketFactory.connect(StandardSocketFactory.java:155) ~[mysql-connector-java-8.0.22.jar:8.0.22]
acrarium | at com.mysql.cj.protocol.a.NativeSocketConnection.connect(NativeSocketConnection.java:63) ~[mysql-connector-java-8.0.22.jar:8.0.22]
acrarium | ... 43 common frames omitted
acrarium |
acrarium exited with code 1
是关于环境变量的。以下是最新的工作docker-compose.yaml
:
version: "3.7"
services:
database:
image: mysql:5.7
container_name: database
environment:
- MYSQL_ROOT_HOST=%
- MYSQL_ROOT_PASSWORD=root_password
- MYSQL_DATABASE=acrarium
- MYSQL_USER=acrarium
- MYSQL_PASSWORD=secure_password
expose:
- "3306"
volumes:
- ./data/:/var/lib/mysql
acrarium:
image: f43nd1r/acrarium:latest
container_name: acrarium
depends_on:
- database
ports:
- 8080:8080
restart: on-failure
environment:
- SPRING_DATASOURCE_URL=jdbc:mysql://database:3306/acrarium?useSSL=false&allowPublicKeyRetrieval=true&useLegacyDatetimeCode=false&serverTimezone=UTC
- SPRING_DATASOURCE_USERNAME=acrarium
- SPRING_DATASOURCE_PASSWORD=secure_password
- SPRING_DATASOURCE_PLATFORM=org.hibernate.dialect.MySQL57Dialect
此外,在Acrarium的存储库中,您可以找到更改的历史记录:upping docker-compose#188时出错
我正在部署Spring-Boot4项目,但在池初始化期间出现了一个名为 我不明白这是什么意思。我已经在StackOverflow中搜索了错误。有一些关于HikariPool的问题,但没有一个对我有效。 我的如下所示,
无法在带有Oracle db连接的Spring中加载配置类 oracle 12c的Hibernate方言
所有人。原谅我英语差,语法怪。我刚开始学习Java,在尝试查询数据库的时候出现了一个错误,应用程序可以成功引导。在这里输入图像描述当我通过API查询数据库时,出现了错误。 2021-02-03 13:15:51.891错误3761---[nio-8088-exec-3]com.zaxxer.hikari.pool.hikaripool:HikariPool-1-池初始化期间出现异常。 java.s
我在做一个春靴项目。然后我尝试将mysql数据库连接到那个项目。我得到了名为“hikaripool-1-exception distry pool initialization”的错误。 这是整个StackTrace。
由于Hikari池初始化异常,我无法部署Spring Boot2应用程序。 错误日志为 我能够连接到本地部署应用程序,但不能在环境中部署应用程序。我是不是错过了配置中的任何东西。
我正在开发我的第一个 Swing 应用程序,现在提出了一个难题:在静态初始化期间或开始实际执行后执行引导和资源初始化。我是什么意思...我有单例: 因此,方法如下所示 或者,也许我在启动后手动初始化资源,然后运行它。逻辑上正确的方式是什么?