wiki service 部署安装失败

  • Choerodon平台版本: 0.10

  • 遇到问题的执行步骤:

helm install c7n/wiki-service
–set env.open.JAVA_OPTS="-Xms256m -Xmx512m"
–set preJob.preConfig.mysql.host=c7n-mysql.c7n-system.svc
–set preJob.preConfig.mysql.port=3306
–set preJob.preConfig.mysql.database=manager_service
–set preJob.preConfig.mysql.username=choerodon
–set preJob.preConfig.mysql.password=password
–set preJob.preConfig.datasource.url=“jdbc:mysql://c7n-mysql.c7n-system.svc:3306/manager_service?useUnicode=true&characterEncoding=utf-8&useSSL=false”
–set preJob.preConfig.datasource.username=choerodon
–set preJob.preConfig.datasource.password=password
–set preJob.preInitDB.mysql.host=c7n-mysql.c7n-system.svc
–set preJob.preInitDB.mysql.port=3306
–set preJob.preInitDB.mysql.database=wiki_service
–set preJob.preInitDB.mysql.username=choerodon
–set preJob.preInitDB.mysql.password=password
–set preJob.preInitDB.datasource.url=“jdbc:mysql://c7n-mysql.c7n-system.svc:3306/wiki_service?useUnicode=true&characterEncoding=utf-8&useSSL=false”
–set preJob.preInitDB.datasource.username=choerodon
–set preJob.preInitDB.datasource.password=password
–set env.open.SPRING_DATASOURCE_URL=“jdbc:mysql://c7n-mysql.c7n-system.svc:3306/wiki_service?useUnicode=true&characterEncoding=utf-8&useSSL=false”
–set env.open.SPRING_DATASOURCE_USERNAME=choerodon
–set env.open.SPRING_DATASOURCE_PASSWORD=password
–set env.open.EUREKA_CLIENT_SERVICEURL_DEFAULTZONE=“http://register-server.c7n-system:8000/eureka/
–set env.open.EUREKA_DEFAULT_ZONE=http://register-server.c7n-system:8000/eureka/
–set env.open.CHOERODON_EVENT_CONSUMER_KAFKA_BOOTSTRAP_SERVERS="kafka-0.kafka-headless.c7n-system.svc.cluster.local:9092 "
–set env.open.SPRING_CLOUD_STREAM_KAFKA_BINDER_BROKERS=“kafka-0.kafka-headless.c7n-system.svc.cluster.local:9092”
–set env.open.SPRING_KAFKA_BOOTSTRAP_SERVERS=“kafka-0.kafka-headless.c7n-system.svc.cluster.local:9092”
–set env.open.SPRING_CLOUD_STREAM_KAFKA_BINDER_ZK_NODES=“zookeeper-0.zookeeper-headless.c7n-system.svc.cluster.local:2181”
–set env.open.SPRING_KAFKA_PRODUCER_VALUE_SERIALIZER=org.apache.kafka.common.serialization.ByteArraySerializer
–set env.open.SPRING_CLOUD_CONFIG_ENABLED=true
–set env.open.SPRING_CLOUD_CONFIG_URI=http://config-server.c7n-system:8010/
–set env.open.WIKI_CLIENT=xwiki
–set env.open.WIKI_URL=http://wiki.amd.test.com
–set env.open.WIKI_TOKEN=Choerodon
–set env.open.WIKI_DEFAULT_GROUP=XWikiAllGroup
–name wiki-service
–version 0.10.1
–namespace c7n-system

NAME READY STATUS RESTARTS AGE
agile-service-59fb69df57-kqcmf 1/1 Running 0 1h
api-gateway-6d94f5b566-tkrss 1/1 Running 0 2h
asgard-service-84db777df6-qn92g 1/1 Running 0 2h
c7n-mysql-64746b49cf-7dr89 1/1 Running 0 3h
c7n-redis-5cf967b4b7-hmh2s 1/1 Running 0 3h
chartmuseum-chartmuseum-864cb9cc5d-4thfl 1/1 Running 0 3h
config-server-799b5b6d68-h8wmk 1/1 Running 0 2h
devops-service-695d5d6bfc-qqxc8 1/1 Running 0 1h
file-service-5d767d8f84-c66b5 1/1 Running 0 1h
gateway-helper-5dd7567694-lwnjc 1/1 Running 0 2h
gitlab-58c9df65d5-w924g 1/1 Running 0 1h
gitlab-mysql-7f9df57f66-lfghs 1/1 Running 0 2h
gitlab-redis-6c6cd6c7f-f8dhj 1/1 Running 0 2h
gitlab-service-86d6b888db-g8q5j 1/1 Running 0 1h
harbor-harbor-adminserver-58db79cd46-fhj89 1/1 Running 1 3h
harbor-harbor-database-0 1/1 Running 0 3h
harbor-harbor-jobservice-8458b65b4d-nlhg7 1/1 Running 1 3h
harbor-harbor-registry-5c8774b645-jxhwg 1/1 Running 0 3h
harbor-harbor-ui-59df9446f8-d7xd8 1/1 Running 2 3h
harbor-redis-master-0 1/1 Running 0 3h
iam-service-6db4f67659-8r5mr 1/1 Running 0 2h
kafka-0 1/1 Running 0 3h
manager-service-6874c4ffb7-fb7dm 1/1 Running 0 2h
minio-c4c85b847-mwp9p 1/1 Running 0 3h
nfs-provisioner-6657665d4b-hlzb6 1/1 Running 0 3h
notify-service-7486454694-bvbx2 1/1 Running 0 2h
oauth-server-6d7dc4c6-qwbqk 1/1 Running 0 1h
register-server-7c64c89d67-2gfr7 1/1 Running 0 2h
test-manager-service-d948bbff8-vvddz 1/1 Running 0 42m
wiki-service-6495c8bbc5-x458d 0/1 Pending 0 15m
xwiki-549fb8d884-sxtrh 1/1 Running 0 36m
zookeeper-0 1/1 Running 0 3h

  • 报错日志:

2018-11-16 11:31:11.069 INFO [-,] 7 — [ main] i.c.config.ConfigToolApplication : Starting ConfigToolApplication v0.6.3.RELEASE on wiki-service-init-config-b5qm2 with PID 7 (/var/choerodon/choerodon-tool-config.jar started by root in /)
2018-11-16 11:31:11.075 INFO [-,] 7 — [ main] i.c.config.ConfigToolApplication : No active profile set, falling back to default profiles: default
2018-11-16 11:31:11.164 INFO [-,] 7 — [ main] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@621be5d1: startup date [Fri Nov 16 11:31:11 CST 2018]; root of context hierarchy
2018-11-16 11:31:12.092 WARN [-,] 7 — [ main] o.m.s.mapper.ClassPathMapperScanner : No MyBatis mapper was found in ‘[io.choerodon.config]’ package. Please check your configuration.
2018-11-16 11:31:12.844 WARN [-,] 7 — [ main] o.s.c.a.ConfigurationClassPostProcessor : Cannot enhance @Configuration bean definition ‘io.choerodon.mybatis.MybatisMapperAutoConfiguration’ since its singleton instance has been created too early. The typical cause is a non-static @Bean method with a BeanDefinitionRegistryPostProcessor return type: Consider declaring such methods as ‘static’.
2018-11-16 11:31:13.365 INFO [-,] 7 — [ main] trationDelegate$BeanPostProcessorChecker : Bean ‘org.springframework.cloud.sleuth.instrument.async.AsyncDefaultAutoConfiguration$DefaultAsyncConfigurerSupport’ of type [org.springframework.cloud.sleuth.instrument.async.AsyncDefaultAutoConfiguration$DefaultAsyncConfigurerSupport$$EnhancerBySpringCGLIB$$cc344d84] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2018-11-16 11:31:13.458 INFO [-,] 7 — [ main] trationDelegate$BeanPostProcessorChecker : Bean ‘org.springframework.cloud.sleuth.annotation.SleuthAnnotationAutoConfiguration’ of type [org.springframework.cloud.sleuth.annotation.SleuthAnnotationAutoConfiguration$$EnhancerBySpringCGLIB$$9157f5f3] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2018-11-16 11:31:13.679 INFO [-,] 7 — [ main] trationDelegate$BeanPostProcessorChecker : Bean ‘sleuthAdvisorConfig’ of type [org.springframework.cloud.sleuth.annotation.SleuthAdvisorConfig] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2018-11-16 11:31:13.689 INFO [-,] 7 — [ main] trationDelegate$BeanPostProcessorChecker : Bean ‘org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration’ of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$8ef2afc1] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2018-11-16 11:31:13.754 INFO [-,] 7 — [ main] trationDelegate$BeanPostProcessorChecker : Bean ‘org.springframework.cloud.sleuth.instrument.async.AsyncDefaultAutoConfiguration’ of type [org.springframework.cloud.sleuth.instrument.async.AsyncDefaultAutoConfiguration$$EnhancerBySpringCGLIB$$76d65be0] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2018-11-16 11:31:13.778 INFO [-,] 7 — [ main] trationDelegate$BeanPostProcessorChecker : Bean ‘org.springframework.cloud.sleuth.instrument.web.client.TraceWebClientAutoConfiguration$TraceOAuthConfiguration’ of type [org.springframework.cloud.sleuth.instrument.web.client.TraceWebClientAutoConfiguration$TraceOAuthConfiguration$$EnhancerBySpringCGLIB$$d3ef4220] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2018-11-16 11:31:17.980 INFO [-,] 7 — [ main] o.s.s.c.ThreadPoolTaskScheduler : Initializing ExecutorService
2018-11-16 11:31:18.321 INFO [-,] 7 — [ main] o.s.j.e.a.AnnotationMBeanExporter : Registering beans for JMX exposure on startup
2018-11-16 11:31:18.456 INFO [-,] 7 — [ main] io.choerodon.config.utils.FileUtil : jar拆解
2018-11-16 11:31:18.663 INFO [-,] 7 — [ main] io.choerodon.config.utils.FileUtil : jar拆解完成
2018-11-16 11:31:18.664 INFO [-,] 7 — [ main] io.choerodon.config.ConfigToolExecute : 根据指定文件进行配置初始化: wiki-service
2018-11-16 11:31:18.683 INFO [-,] 7 — [ main] io.choerodon.config.utils.FileUtil : 文件路径获取:temp/BOOT-INF/classes/application.yml
2018-11-16 11:31:18.798 WARN [-,] 7 — [ main] io.choerodon.mybatis.helper.AuditHelper : principal not instanceof CustomUserDetails audit user is 0L
2018-11-16 11:31:18.806 INFO [-,] 7 — [ Thread-5] s.c.a.AnnotationConfigApplicationContext : Closing org.springframework.context.annotation.AnnotationConfigApplicationContext@621be5d1: startup date [Fri Nov 16 11:31:11 CST 2018]; root of context hierarchy
2018-11-16 11:31:18.808 INFO [-,] 7 — [ Thread-5] o.s.j.e.a.AnnotationMBeanExporter : Unregistering JMX-exposed beans on shutdown

  • 原因分析:

    提出您分析问题的过程,以便我们能更准确的找到问题所在
    这里本来是怀疑官方给的wiki-service安装命令的问题,保留了官方的参数,同时按照test-manager-service的配置方法,给了preJob.preConfig.datasource 和 preJob.preInitDb.datasource定义,还是同样的问题。
    问题是出在wiki-service-init-config这个Job上的,从而导致后面的初始化失败。
    有没有可能发布的包不对,请校验,谢谢

重新看了chart里的pre-config-config.yaml,
java -Dspring.datasource.url=“jdbc:mysql://{{ .Values.preJob.preConfig.mysql.host }}:{{ .Values.preJob.preConfig.mysql.port }}/{{ .Values.preJob.preConfig.mysql.database }}?useUnicode=true&characterEncoding=utf-8&useSSL=false” -Dspring.datasource.username={{ .Values.preJob.preConfig.mysql.username }} -Dspring.datasource.password={{ .Values.preJob.preConfig.mysql.password }} -Dservice.name={{ .Chart.Name }} -Dservice.version={{ .Chart.Version }} -Dconfig.file={{ .Values.preJob.preConfig.configFile }} -Dconfig.jar=/{{ .Chart.Name }}.jar -jar /var/choerodon/choerodon-tool-config.jar;

首先确定的是官方给的命令基本没啥问题,但是少了preJob.preConfig.configFile的申明,不知道是不是这个造成的

  • 疑问:

    提出您对于遇到和解决该问题时的疑问

您好,我们的Chart Values 里面是指定配置文件的,就不需要声明了。你这个初始化配置的过程是怎么看出来失败的呢,后面启动wiki-service的时候没办法拉到配置吗?