代码拉取完成,页面将自动刷新
部署环境信息:
[root@localhost ~]# uname -a
Linux localhost.localdomain 3.10.0-1160.45.1.el7.x86_64 #1 SMP Wed Oct 13 17:20:51 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
[root@localhost ~]# cat /etc/redhat-release
CentOS Linux release 7.9.2009 (Core)
[root@localhost ~]# docker version
Client:
Version: 1.13.1
API version: 1.26
Package version: docker-1.13.1-208.git7d71120.el7_9.x86_64
Go version: go1.10.3
Git commit: 7d71120/1.13.1
Built: Mon Jun 7 15:36:09 2021
OS/Arch: linux/amd64
Server:
Version: 1.13.1
API version: 1.26 (minimum version 1.12)
Package version: docker-1.13.1-208.git7d71120.el7_9.x86_64
Go version: go1.10.3
Git commit: 7d71120/1.13.1
Built: Mon Jun 7 15:36:09 2021
OS/Arch: linux/amd64
Experimental: false
[root@localhost ~]# docker-compose --version
docker-compose version 1.29.2, build 5becea4c
version: '3'
services:
jianmu-mysql:
image: mysql:8
command: --init-connect='SET NAMES utf8' --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --max-connections=1200 --max-user-connections=1000
ports:
- "3306:3306"
environment:
MYSQL_ROOT_PASSWORD: 123456
MYSQL_DATABASE: "jianmu"
TZ: "Asia/Shanghai"
ci-server:
image: jianmudev/jianmu-ci-server:v2.0.0-beta.2
environment:
SPRING_PROFILES_ACTIVE: dev
SPRING_DATASOURCE_URL: jdbc:mysql://jianmu-mysql:3306/jianmu?useUnicode=true&characterEncoding=utf8&useSSL=false&allowPublicKeyRetrieval=true
SPRING_DATASOURCE_USERNAME: root
SPRING_DATASOURCE_PASSWORD: 123456
EMBEDDED_DOCKER-WORKER_DOCKER-HOST: unix:///var/run/docker.sock
EMBEDDED_DOCKER-WORKER_SOCK-FILE: /var/run/docker.sock
JIANMU_API_ADMINPASSWD: 123456
# REGISTRY_AK:
# REGISTRY_SK:
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /mnt/jianmu/ci/task_log:/task_log
depends_on:
- jianmu-mysql
entrypoint: ["/wait-for-it.sh", "jianmu-mysql:3306", "-t", "0", "--", "java", "-Duser.timezone=Asia/Shanghai", "-cp", "/app/resources:/app/classes:/app/libs/*", "dev.jianmu.api.SpringbootApp"]
web:
image: jianmudev/jianmu-ci-ui:v2.0.0-beta.2
ports:
- "80:80"
- "443:443"
depends_on:
- jianmu-mysql
[root@localhost ~]# docker-compose up -d
root_jianmu-mysql_1 is up-to-date
Starting root_ci-server_1 ... done
root_web_1 is up-to-date
[root@localhost ~]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
b2d78c3e77d9 jianmudev/jianmu-ci-ui:v2.0.0-beta.2 "/docker-entrypoin..." 40 minutes ago Up 40 minutes 0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp root_web_1
18d64a04c001 jianmudev/jianmu-ci-server:v2.0.0-beta.2 "/wait-for-it.sh j..." 40 minutes ago Up 3 seconds root_ci-server_1
4e9930faff00 mysql:8 "docker-entrypoint..." 40 minutes ago Up 40 minutes 0.0.0.0:3306->3306/tcp, 33060/tcp root_jianmu-mysql_1
[root@localhost ~]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
b2d78c3e77d9 jianmudev/jianmu-ci-ui:v2.0.0-beta.2 "/docker-entrypoin..." 40 minutes ago Up 40 minutes 0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp root_web_1
4e9930faff00 mysql:8 "docker-entrypoint..." 40 minutes ago Up 40 minutes 0.0.0.0:3306->3306/tcp, 33060/tcp root_jianmu-mysql_1
其中jianmudev/jianmu-ci-server
容器无法启动。
安装启动错误信息:
[root@localhost ~]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
b2d78c3e77d9 jianmudev/jianmu-ci-ui:v2.0.0-beta.2 "/docker-entrypoin..." 42 minutes ago Up 42 minutes 0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp root_web_1
4e9930faff00 mysql:8 "docker-entrypoint..." 42 minutes ago Up 42 minutes 0.0.0.0:3306->3306/tcp, 33060/tcp root_jianmu-mysql_1
[root@localhost ~]# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
b2d78c3e77d9 jianmudev/jianmu-ci-ui:v2.0.0-beta.2 "/docker-entrypoin..." 42 minutes ago Up 42 minutes 0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp root_web_1
18d64a04c001 jianmudev/jianmu-ci-server:v2.0.0-beta.2 "/wait-for-it.sh j..." 42 minutes ago Exited (1) About a minute ago root_ci-server_1
4e9930faff00 mysql:8 "docker-entrypoint..." 42 minutes ago Up 42 minutes 0.0.0.0:3306->3306/tcp, 33060/tcp root_jianmu-mysql_1
[root@localhost ~]# docker logs 18d64a04c001
wait-for-it.sh: waiting for jianmu-mysql:3306 without a timeout
wait-for-it.sh: jianmu-mysql:3306 is available after 10 seconds
2021-11-27 18:55:11.937 INFO 1 --- [ main] dev.jianmu.api.SpringbootApp : Starting SpringbootApp using Java 11.0.11 on 18d64a04c001 with PID 1 (/app/classes started by root in /)
2021-11-27 18:55:11.946 INFO 1 --- [ main] dev.jianmu.api.SpringbootApp : The following profiles are active: dev
2021-11-27 18:55:13.133 INFO 1 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'appConfig' of type [dev.jianmu.infrastructure.AppConfig$$EnhancerBySpringCGLIB$$9954581b] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2021-11-27 18:55:13.449 INFO 1 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8081 (http)
2021-11-27 18:55:13.458 INFO 1 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2021-11-27 18:55:13.459 INFO 1 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.54]
2021-11-27 18:55:13.551 INFO 1 --- [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2021-11-27 18:55:13.551 INFO 1 --- [ main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 1504 ms
2021-11-27 18:55:14.417 INFO 1 --- [ main] o.f.c.internal.license.VersionPrinter : Flyway Community Edition 7.7.3 by Redgate
2021-11-27 18:55:14.422 INFO 1 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...
2021-11-27 18:55:14.570 INFO 1 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed.
2021-11-27 18:55:14.615 INFO 1 --- [ main] o.f.c.i.database.base.DatabaseType : Database: jdbc:mysql://jianmu-mysql:3306/jianmu (MySQL 8.0)
2021-11-27 18:55:14.653 INFO 1 --- [ main] o.f.core.internal.command.DbValidate : Successfully validated 1 migration (execution time 00:00.014s)
2021-11-27 18:55:14.671 INFO 1 --- [ main] o.f.c.i.s.JdbcTableSchemaHistory : Creating Schema History table `jianmu`.`flyway_schema_history` ...
2021-11-27 18:55:14.709 INFO 1 --- [ main] o.f.c.i.s.DefaultSqlScriptExecutor : 0 rows affected
2021-11-27 18:55:14.737 INFO 1 --- [ main] o.f.c.i.s.DefaultSqlScriptExecutor : 0 rows affected
2021-11-27 18:55:14.750 INFO 1 --- [ main] o.f.core.internal.command.DbMigrate : Current version of schema `jianmu`: << Empty Schema >>
2021-11-27 18:55:14.775 INFO 1 --- [ main] o.f.core.internal.command.DbMigrate : Migrating schema `jianmu` to version "1.0.0 - INIT Tables"
2021-11-27 18:55:14.806 INFO 1 --- [ main] o.f.c.i.s.DefaultSqlScriptExecutor : 0 rows affected
2021-11-27 18:55:14.831 INFO 1 --- [ main] o.f.c.i.s.DefaultSqlScriptExecutor : 0 rows affected
2021-11-27 18:55:14.858 INFO 1 --- [ main] o.f.c.i.s.DefaultSqlScriptExecutor : 0 rows affected
2021-11-27 18:55:14.880 INFO 1 --- [ main] o.f.c.i.s.DefaultSqlScriptExecutor : 0 rows affected
2021-11-27 18:55:14.896 INFO 1 --- [ main] o.f.c.i.s.DefaultSqlScriptExecutor : 0 rows affected
2021-11-27 18:55:14.921 WARN 1 --- [ main] o.f.c.i.s.DefaultSqlScriptExecutor : DB: Integer display width is deprecated and will be removed in a future release. (SQL State: HY000 - Error Code: 1681)
2021-11-27 18:55:14.922 INFO 1 --- [ main] o.f.c.i.s.DefaultSqlScriptExecutor : 0 rows affected
2021-11-27 18:55:14.943 INFO 1 --- [ main] o.f.c.i.s.DefaultSqlScriptExecutor : 0 rows affected
2021-11-27 18:55:14.962 INFO 1 --- [ main] o.f.c.i.s.DefaultSqlScriptExecutor : 0 rows affected
2021-11-27 18:55:14.980 INFO 1 --- [ main] o.f.c.i.s.DefaultSqlScriptExecutor : 0 rows affected
2021-11-27 18:55:15.001 INFO 1 --- [ main] o.f.c.i.s.DefaultSqlScriptExecutor : 0 rows affected
2021-11-27 18:55:15.016 INFO 1 --- [ main] o.f.c.i.s.DefaultSqlScriptExecutor : 0 rows affected
2021-11-27 18:55:15.032 INFO 1 --- [ main] o.f.c.i.s.DefaultSqlScriptExecutor : 0 rows affected
2021-11-27 18:55:15.053 INFO 1 --- [ main] o.f.c.i.s.DefaultSqlScriptExecutor : 0 rows affected
2021-11-27 18:55:15.071 INFO 1 --- [ main] o.f.c.i.s.DefaultSqlScriptExecutor : 0 rows affected
2021-11-27 18:55:15.088 INFO 1 --- [ main] o.f.c.i.s.DefaultSqlScriptExecutor : 0 rows affected
2021-11-27 18:55:15.109 INFO 1 --- [ main] o.f.c.i.s.DefaultSqlScriptExecutor : 0 rows affected
2021-11-27 18:55:15.122 INFO 1 --- [ main] o.f.c.i.s.DefaultSqlScriptExecutor : 0 rows affected
2021-11-27 18:55:15.144 INFO 1 --- [ main] o.f.core.internal.command.DbMigrate : Successfully applied 1 migration to schema `jianmu`, now at version v1.0.0 (execution time 00:00.397s)
2021-11-27 18:55:15.188 INFO 1 --- [ main] org.quartz.impl.StdSchedulerFactory : Using default implementation for ThreadExecutor
2021-11-27 18:55:15.200 INFO 1 --- [ main] org.quartz.core.SchedulerSignalerImpl : Initialized Scheduler Signaller of type: class org.quartz.core.SchedulerSignalerImpl
2021-11-27 18:55:15.201 INFO 1 --- [ main] org.quartz.core.QuartzScheduler : Quartz Scheduler v.2.3.2 created.
2021-11-27 18:55:15.201 INFO 1 --- [ main] org.quartz.simpl.RAMJobStore : RAMJobStore initialized.
2021-11-27 18:55:15.202 INFO 1 --- [ main] org.quartz.core.QuartzScheduler : Scheduler meta-data: Quartz Scheduler (v2.3.2) 'quartzScheduler' with instanceId 'NON_CLUSTERED'
Scheduler class: 'org.quartz.core.QuartzScheduler' - running locally.
NOT STARTED.
Currently in standby mode.
Number of jobs executed: 0
Using thread pool 'org.quartz.simpl.SimpleThreadPool' - with 10 threads.
Using job-store 'org.quartz.simpl.RAMJobStore' - which does not support persistence. and is not clustered.
2021-11-27 18:55:15.202 INFO 1 --- [ main] org.quartz.impl.StdSchedulerFactory : Quartz scheduler 'quartzScheduler' initialized from an externally provided properties instance.
2021-11-27 18:55:15.202 INFO 1 --- [ main] org.quartz.impl.StdSchedulerFactory : Quartz scheduler version: 2.3.2
2021-11-27 18:55:15.202 INFO 1 --- [ main] org.quartz.core.QuartzScheduler : JobFactory set to: org.springframework.scheduling.quartz.SpringBeanJobFactory@3b56947a
2021-11-27 18:55:15.494 INFO 1 --- [ main] o.a.h.c.h.i.c.HttpRequestRetryExec : Recoverable I/O exception (java.io.IOException) caught when processing request to {}->unix://localhost:2375
2021-11-27 18:55:15.496 WARN 1 --- [ main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'workerEventHandler' defined in file [/app/classes/dev/jianmu/api/eventhandler/WorkerEventHandler.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'embeddedWorkerApplication' defined in URL [jar:file:/app/libs/application-2.0.0-beta.2.jar!/dev/jianmu/application/service/internal/EmbeddedWorkerApplication.class]: Unsatisfied dependency expressed through constructor parameter 1; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'embeddedDockerWorker' defined in URL [jar:file:/app/libs/infrastructure-2.0.0-beta.2.jar!/dev/jianmu/infrastructure/docker/EmbeddedDockerWorker.class]: Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [dev.jianmu.infrastructure.docker.EmbeddedDockerWorker]: Constructor threw exception; nested exception is java.lang.RuntimeException: java.io.IOException: com.sun.jna.LastErrorException: [13] Permission denied
2021-11-27 18:55:15.497 INFO 1 --- [ main] o.s.s.quartz.SchedulerFactoryBean : Shutting down Quartz Scheduler
2021-11-27 18:55:15.497 INFO 1 --- [ main] org.quartz.core.QuartzScheduler : Scheduler quartzScheduler_$_NON_CLUSTERED shutting down.
2021-11-27 18:55:15.497 INFO 1 --- [ main] org.quartz.core.QuartzScheduler : Scheduler quartzScheduler_$_NON_CLUSTERED paused.
2021-11-27 18:55:15.497 INFO 1 --- [ main] org.quartz.core.QuartzScheduler : Scheduler quartzScheduler_$_NON_CLUSTERED shutdown complete.
2021-11-27 18:55:15.499 INFO 1 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown initiated...
2021-11-27 18:55:15.518 INFO 1 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown completed.
2021-11-27 18:55:15.521 INFO 1 --- [ main] o.apache.catalina.core.StandardService : Stopping service [Tomcat]
2021-11-27 18:55:15.538 INFO 1 --- [ main] ConditionEvaluationReportLoggingListener :
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2021-11-27 18:55:15.553 ERROR 1 --- [ main] o.s.boot.SpringApplication : Application run failed
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'workerEventHandler' defined in file [/app/classes/dev/jianmu/api/eventhandler/WorkerEventHandler.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'embeddedWorkerApplication' defined in URL [jar:file:/app/libs/application-2.0.0-beta.2.jar!/dev/jianmu/application/service/internal/EmbeddedWorkerApplication.class]: Unsatisfied dependency expressed through constructor parameter 1; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'embeddedDockerWorker' defined in URL [jar:file:/app/libs/infrastructure-2.0.0-beta.2.jar!/dev/jianmu/infrastructure/docker/EmbeddedDockerWorker.class]: Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [dev.jianmu.infrastructure.docker.EmbeddedDockerWorker]: Constructor threw exception; nested exception is java.lang.RuntimeException: java.io.IOException: com.sun.jna.LastErrorException: [13] Permission denied
at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:800)
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:229)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1372)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1222)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:944)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:918)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:145)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:754)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:434)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:338)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1343)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1332)
at dev.jianmu.api.SpringbootApp.main(SpringbootApp.java:54)
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'embeddedWorkerApplication' defined in URL [jar:file:/app/libs/application-2.0.0-beta.2.jar!/dev/jianmu/application/service/internal/EmbeddedWorkerApplication.class]: Unsatisfied dependency expressed through constructor parameter 1; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'embeddedDockerWorker' defined in URL [jar:file:/app/libs/infrastructure-2.0.0-beta.2.jar!/dev/jianmu/infrastructure/docker/EmbeddedDockerWorker.class]: Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [dev.jianmu.infrastructure.docker.EmbeddedDockerWorker]: Constructor threw exception; nested exception is java.lang.RuntimeException: java.io.IOException: com.sun.jna.LastErrorException: [13] Permission denied
at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:800)
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:229)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1372)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1222)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1380)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1300)
at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:887)
at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:791)
... 19 common frames omitted
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'embeddedDockerWorker' defined in URL [jar:file:/app/libs/infrastructure-2.0.0-beta.2.jar!/dev/jianmu/infrastructure/docker/EmbeddedDockerWorker.class]: Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [dev.jianmu.infrastructure.docker.EmbeddedDockerWorker]: Constructor threw exception; nested exception is java.lang.RuntimeException: java.io.IOException: com.sun.jna.LastErrorException: [13] Permission denied
at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:315)
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:296)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1372)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1222)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1380)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1300)
at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:887)
at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:791)
... 33 common frames omitted
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [dev.jianmu.infrastructure.docker.EmbeddedDockerWorker]: Constructor threw exception; nested exception is java.lang.RuntimeException: java.io.IOException: com.sun.jna.LastErrorException: [13] Permission denied
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:224)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:117)
at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:311)
... 47 common frames omitted
Caused by: java.lang.RuntimeException: java.io.IOException: com.sun.jna.LastErrorException: [13] Permission denied
at com.github.dockerjava.httpclient5.ApacheDockerHttpClientImpl.execute(ApacheDockerHttpClientImpl.java:187)
at com.github.dockerjava.httpclient5.ApacheDockerHttpClient.execute(ApacheDockerHttpClient.java:9)
at com.github.dockerjava.core.DefaultInvocationBuilder.execute(DefaultInvocationBuilder.java:228)
at com.github.dockerjava.core.DefaultInvocationBuilder.get(DefaultInvocationBuilder.java:202)
at com.github.dockerjava.core.exec.PingCmdExec.execute(PingCmdExec.java:26)
at com.github.dockerjava.core.exec.PingCmdExec.execute(PingCmdExec.java:12)
at com.github.dockerjava.core.exec.AbstrSyncDockerCmdExec.exec(AbstrSyncDockerCmdExec.java:21)
at com.github.dockerjava.core.command.AbstrDockerCmd.exec(AbstrDockerCmd.java:35)
at dev.jianmu.infrastructure.docker.EmbeddedDockerWorker.connect(EmbeddedDockerWorker.java:91)
at dev.jianmu.infrastructure.docker.EmbeddedDockerWorker.<init>(EmbeddedDockerWorker.java:75)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:211)
... 49 common frames omitted
Caused by: java.io.IOException: com.sun.jna.LastErrorException: [13] Permission denied
at com.github.dockerjava.transport.DomainSocket.<init>(DomainSocket.java:63)
at com.github.dockerjava.transport.LinuxDomainSocket.<init>(LinuxDomainSocket.java:41)
at com.github.dockerjava.transport.DomainSocket.get(DomainSocket.java:140)
at com.github.dockerjava.transport.UnixSocket.get(UnixSocket.java:27)
at com.github.dockerjava.httpclient5.ApacheDockerHttpClientImpl$2.createSocket(ApacheDockerHttpClientImpl.java:145)
at org.apache.hc.client5.http.impl.io.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:125)
at org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:409)
at org.apache.hc.client5.http.impl.classic.InternalExecRuntime.connectEndpoint(InternalExecRuntime.java:168)
at org.apache.hc.client5.http.impl.classic.InternalExecRuntime.connectEndpoint(InternalExecRuntime.java:178)
at org.apache.hc.client5.http.impl.classic.ConnectExec.execute(ConnectExec.java:135)
at org.apache.hc.client5.http.impl.classic.ExecChainElement.execute(ExecChainElement.java:51)
at org.apache.hc.client5.http.impl.classic.ExecChainElement$1.proceed(ExecChainElement.java:57)
at org.apache.hc.client5.http.impl.classic.ProtocolExec.execute(ProtocolExec.java:172)
at org.apache.hc.client5.http.impl.classic.ExecChainElement.execute(ExecChainElement.java:51)
at org.apache.hc.client5.http.impl.classic.ExecChainElement$1.proceed(ExecChainElement.java:57)
at org.apache.hc.client5.http.impl.classic.HttpRequestRetryExec.execute(HttpRequestRetryExec.java:93)
at org.apache.hc.client5.http.impl.classic.ExecChainElement.execute(ExecChainElement.java:51)
at org.apache.hc.client5.http.impl.classic.ExecChainElement$1.proceed(ExecChainElement.java:57)
at org.apache.hc.client5.http.impl.classic.ContentCompressionExec.execute(ContentCompressionExec.java:128)
at org.apache.hc.client5.http.impl.classic.ExecChainElement.execute(ExecChainElement.java:51)
at org.apache.hc.client5.http.impl.classic.ExecChainElement$1.proceed(ExecChainElement.java:57)
at org.apache.hc.client5.http.impl.classic.RedirectExec.execute(RedirectExec.java:116)
at org.apache.hc.client5.http.impl.classic.ExecChainElement.execute(ExecChainElement.java:51)
at org.apache.hc.client5.http.impl.classic.InternalHttpClient.doExecute(InternalHttpClient.java:178)
at org.apache.hc.client5.http.impl.classic.CloseableHttpClient.execute(CloseableHttpClient.java:67)
at com.github.dockerjava.httpclient5.ApacheDockerHttpClientImpl.execute(ApacheDockerHttpClientImpl.java:183)
... 63 common frames omitted
Caused by: com.sun.jna.LastErrorException: [13] Permission denied
at com.github.dockerjava.transport.LinuxDomainSocket.connect(Native Method)
at com.github.dockerjava.transport.LinuxDomainSocket.connect(LinuxDomainSocket.java:49)
at com.github.dockerjava.transport.DomainSocket.open(DomainSocket.java:69)
at com.github.dockerjava.transport.DomainSocket.<init>(DomainSocket.java:59)
... 88 common frames omitted
CentOS默认版本过低。
卸载CentOS 7.9默认的Docker,重新安装即可。
卸载原有docker:
yum remove docker \
docker-client \
docker-client-latest \
docker-common \
docker-latest \
docker-latest-logrotate \
docker-logrotate \
docker-engine
配置docker官方yum库:
yum install -y yum-utils
sudo yum-config-manager \
--add-repo \
https://download.docker.com/linux/centos/docker-ce.repo
安装官方docker:
yum install docker-ce docker-ce-cli containerd.io
Docker版本信息:
[root@localhost ~]# docker version
Client: Docker Engine - Community
Version: 20.10.11
API version: 1.41
Go version: go1.16.9
Git commit: dea9396
Built: Thu Nov 18 00:38:53 2021
OS/Arch: linux/amd64
Context: default
Experimental: true
Server: Docker Engine - Community
Engine:
Version: 20.10.11
API version: 1.41 (minimum version 1.12)
Go version: go1.16.9
Git commit: 847da18
Built: Thu Nov 18 00:37:17 2021
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.4.12
GitCommit: 7b11cfaabd73bb80907dd23182b9347b4245eb5d
runc:
Version: 1.0.2
GitCommit: v1.0.2-0-g52b36a2
docker-init:
Version: 0.19.0
GitCommit: de40ad0
之后重新执行docker-compose up -d
安装即可。
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。
登录 后才可以发表评论