acrarium - docker issue - communication link failure
Closed this issue · 5 comments
I'm trying to setup the acrarium docker by following the steps in setup-guide
https://github.com/F43nd1r/Acrarium/wiki/Setup-guide
I'm able to get it running manually without docker (by running the acrarium jar file -> java -jar acrarium-1.0.0.jar).
Unfortunately, I'm getting stuck with the following issues while try to use docker.
- SQL exception due to communication link failure
- Error: creating bean
- Acrarium exit with code 1 (due to the above errors)
Appreciate any pointers to help resolve these errors.
Environment:
Host: Ubuntu-20.04
DB: mysql v8.0
For reference attaching docker-compose.yml & log file
version: "3.7"
services:
database:
image: mysql:8.0
container_name: database
environment:
- MYSQL_ROOT_HOST='%'
- MYSQL_ROOT_PASSWORD=xyzabc
- MYSQL_DATABASE=acrarium
- MYSQL_USER=acrarium
- MYSQL_PASSWORD=abcxyz
expose:
- "3306"
volumes:
- acrarium_data:/var/lib/mysql
command: ['mysqld', '--character-set-server=utf8mb4', '--collation-server=utf8mb4_unicode_ci']
acrarium:
image: f43nd1r/acrarium:latest
container_name: acrarium
depends_on:
- database
ports:
- 8080:8080
restart: on-failure
network_mode: host
environment:
- SPRING_DATASOURCE_URL=jdbc:mysql://database:3306/acrarium?useSSL=false&allowPublicKeyRetrieval=true&useLegacyDatetimeCode=false&serverTimezone=UTC
- SPRING_DATASOURCE_USERNAME=acrarium
- SPRING_DATASOURCE_PASSWORD=abcxyz
- SPRING_DATASOURCE_PLATFORM=org.hibernate.dialect.MySQL8Dialect
volumes:
acrarium_data:
Error snapshot & full log with errors when I run docker-compose up
36macrarium |�[0m 2022-05-21 00:49:01.995 INFO 7 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...
36macrarium |�[0m 2022-05-21 00:49:03.111 ERROR 7 --- [ main] com.zaxxer.hikari.pool.HikariPool : HikariPool-1 - Exception during pool initialization.
36macrarium |�[0m
36macrarium |�[0m com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure
36macrarium |�[0m
36macrarium |�[0m The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
36macrarium |�[0m at com.mysql.cj.jdbc.exceptions.SQLError.createCommunicationsException(SQLError.java:174) ~[mysql-connector-java-8.0.28.jar:8.0.28]
�[36macrarium |�[0m 2022-05-21 00:49:03.117 WARN 7 --- [ main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'beanSecurityEnforcer' defined in file [/application/BOOT-INF/classes/com/faendir/acra/security/BeanSecurityEnforcer.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'parameterParser' defined in file [/application/BOOT-INF/classes/com/faendir/acra/navigation/ParameterParser.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'dataService' defined in file [/application/BOOT-INF/classes/com/faendir/acra/service/DataService.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'userService' defined in file [/application/BOOT-INF/classes/com/faendir/acra/service/UserService.class]: Unsatisfied dependency expressed through constructor parameter 2; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.orm.jpa.SharedEntityManagerCreator#0': Cannot resolve reference to bean 'entityManagerFactory' while setting constructor argument; nested exception is 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
network_mode: host
prevents you from accessing exposed ports of other containers.
No luck removing the "network_mode: host" from the yml file.
Attaching the debug log FYR..
Not sure how to proceed further.
Let me know if more debug logs would be helpful to root-cause this issue.
Access denied for user 'acrarium'@'172.21.0.3'
it's a permission issue now. I haven't tried with mysql 8, so you'll have to investigate yourself why the access is blocked.
mysql-8 works on manual config instead of docker..
not sure why i'm hitting the permission issue
Assuming issue is solved due to no further feedback.