Harbor部署成功後為何服務列表只有getaway微服務

Docker 未结 2 1968
我有很多問號
悬赏:10




一、该问题的重现步骤是什么?

1.  执行构建命令  mvn clean package docker:build  将项目推送成功。image.png

2. 执行 ./deploy.sh port、./deploy.sh mount、./deploy.sh base、./deploy.sh modules 服务均已成功。image.pngimage.pngimage.png

3.Nacos中只有getaway微服務

image.png

image.pngimage.png


二、你期待的结果是什么?实际看到的又是什么?

期待能看到:

  • 打开 nacos 界面查看对应部署的服务

  • 打开聚合文档查看接口调用

实际看到:

    无法查看启动的服务


三、你正在使用的是什么产品,什么版本?在什么操作系统上?

 SpringBlade商業版;2.4版本;开发环境windows系统,部署在CentOS7(虚拟机)中。


四、请提供详细的错误堆栈信息,这很重要。

撈取auth的日誌

15:18:39.493 [main] DEBUG org.springframework.core.env.PropertySourcesPropertyResolver - Found key 'spring.profiles.active' in PropertySource 'commandLineArgs' with value of type String

15:18:39.594 [main] DEBUG org.springframework.core.env.StandardEnvironment - Activating profiles [test]

----启动中,读取到的环境变量:[test],jar地址:[file:/blade/auth/app.jar]----

            ______  _             _       ___   ___

            | ___ \| |           | |      \  \ /  /

            | |_/ /| |  __ _   __| |  ___  \  V  /

            | ___ \| | / _` | / _` | / _ \   > <

            | |_/ /| || (_| || (_| ||  __/ /  .  \

            \____/ |_| \__,_| \__,_| \___|/__/ \__\


:: BladeX :: blade-auth:test :: Running SpringBoot 2.1.12.RELEASE ::


2020-03-28 15:19:15.750  INFO 1 --- [           main] c.a.c.n.c.NacosPropertySourceBuilder     : Loading nacos data, dataId: 'blade.yaml', group: 'DEFAULT_GROUP', data: #服务器配置

server:

  undertow:

    # 设置IO线程数, 它主要执行非阻塞的任务,它们会负责多个连接, 默认设置每个CPU核心一个线程

    io-threads: 16

    # 阻塞任务线程池, 当执行类似servlet请求阻塞操作, undertow会从这个线程池中取得线程,它的值设置取决于系统的负载

    worker-threads: 400

    # 以下的配置会影响buffer,这些buffer会用于服务器连接的IO操作,有点类似netty的池化内存管理

    buffer-size: 1024

    # 是否分配的直接内存

    direct-buffers: true


#spring配置

spring:

  devtools:

    restart:

      log-condition-evaluation-delta: false

    livereload:

      port: 23333


#feign配置

feign:

  hystrix:

    enabled: true

  #sentinel:

    #enabled: true

  okhttp:

    enabled: true

  httpclient:

    enabled: false


#hystrix配置

hystrix:

  threadpool:

    default:

      coreSize: 300

      maxQueueSize: 1000

      queueSizeRejectionThreshold: 800

  command:

    default:

      execution:

        isolation:

          thread:

            timeoutInMilliseconds: 5000


#ribbon配置

ribbon:

  #对当前实例的重试次数

  MaxAutoRetries: 1

  #切换实例的重试次数

  MaxAutoRetriesNextServer: 2

  #请求处理的超时时间

  ReadTimeout: 60000

  #请求连接的超时时间

  ConnectTimeout: 60000

  #对所有操作请求都进行重试

  OkToRetryOnAllOperations: true


#对外暴露端口

management:

  endpoints:

    web:

      exposure:

        include: "*"

  endpoint:

    health:

      show-details: always


#blade配置

blade:

  xss:

    enable: true

    skip-url:

      - /weixin

      - /notice/submit

  secure:

    skip-url:

      - /test/**

    client:

      - client-id: sword

        path-patterns:

          - /sword/**

      - client-id: saber

        path-patterns:

          - /saber/**

  tenant:

    enhance: false

    column: tenant_id

    exclude-tables:

      - blade_user


2020-03-28 15:19:19.846  INFO 1 --- [           main] c.a.c.n.c.NacosPropertySourceBuilder     : Loading nacos data, dataId: 'blade-test.yaml', group: 'DEFAULT_GROUP', data: #spring配置

spring:

  redis:

    ##redis 单机环境配置

    host: 127.0.0.1

    port: 6379

    password:

    database: 0

    ssl: false

    ##redis 集群环境配置

    #cluster:

    #  nodes: 127.0.0.1:7001,127.0.0.1:7002,127.0.0.1:7003

    #  commandTimeout: 5000

  datasource:

    driver-class-name: com.mysql.cj.jdbc.Driver

    #driver-class-name: org.postgresql.Driver

    #driver-class-name: oracle.jdbc.OracleDriver

    druid:

      # MySql、PostgreSQL校验

      validation-query: select 1

      # Oracle校验

      #validation-query: select 1 from dual



#项目模块集中配置

blade:

  #分布式锁配置

  lock:

     enabled: false

     address: redis://127.0.0.1:6379

  #通用开发生产环境数据库地址(特殊情况可在对应的子工程里配置覆盖)

  datasource:

    test:

      # MySql

      url: jdbc:mysql://127.0.0.1:3306/bladex?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&tinyInt1isBit=false&allowMultiQueries=true&serverTimezone=GMT%2B8&allowPublicKeyRetrieval=true

      username: bladex

      password: bladex

      # PostgreSQL

      #url: jdbc:postgresql://127.0.0.1:5432/bladex

      #username: postgres

      #password: 123456

      # Oracle

      #url: jdbc:oracle:thin:@127.0.0.1:49161:orcl

      #username: BLADEX

      #password: oracle

  document:

    resources:

      - name: 授权模块

        location: /blade-auth

      - name: 工作台模块

        location: /blade-desk

      - name: 系统模块

        location: /blade-system


2020-03-28 15:19:23.955  WARN 1 --- [           main] c.a.c.n.c.NacosPropertySourceBuilder     : Ignore the empty nacos configuration and get it based on dataId[blade-auth] & group[DEFAULT_GROUP]

2020-03-28 15:19:25.967  WARN 1 --- [           main] c.a.c.n.c.NacosPropertySourceBuilder     : Ignore the empty nacos configuration and get it based on dataId[blade-auth.yaml] & group[DEFAULT_GROUP]

2020-03-28 15:19:29.985  WARN 1 --- [           main] c.a.c.n.c.NacosPropertySourceBuilder     : Ignore the empty nacos configuration and get it based on dataId[blade-auth-test.yaml] & group[DEFAULT_GROUP]

2020-03-28 15:19:30.057  INFO 1 --- [           main] b.c.PropertySourceBootstrapConfiguration : Located property source: [BootstrapPropertySource {name='bootstrapProperties-blade-auth-test.yaml'}, BootstrapPropertySource {name='bootstrapProperties-blade-auth.yaml'}, BootstrapPropertySource {name='bootstrapProperties-blade-auth'}, BootstrapPropertySource {name='bootstrapProperties-blade-test.yaml'}, BootstrapPropertySource {name='bootstrapProperties-blade.yaml'}]

2020-03-28 15:19:30.369  INFO 1 --- [           main] org.springblade.auth.AuthApplication     : The following profiles are active: test

2020-03-28 15:19:36.196  WARN 1 --- [           main] o.s.c.c.u.SpringFactoryImportSelector    : More than one implementation of @EnableCircuitBreaker (now relying on @Conditionals to pick one): [org.springframework.cloud.netflix.hystrix.HystrixCircuitBreakerConfiguration, com.alibaba.cloud.sentinel.custom.SentinelCircuitBreakerConfiguration]

2020-03-28 15:20:17.956  WARN 1 --- [           main] o.s.boot.actuate.endpoint.EndpointId     : Endpoint ID 'nacos-config' contains invalid characters, please migrate to a valid format.

2020-03-28 15:20:18.060  WARN 1 --- [           main] o.s.boot.actuate.endpoint.EndpointId     : Endpoint ID 'nacos-discovery' contains invalid characters, please migrate to a valid format.

2020-03-28 15:20:33.289  INFO 1 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Multiple Spring Data modules found, entering strict repository configuration mode!

2020-03-28 15:20:33.311  INFO 1 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data Redis repositories in DEFAULT mode.

2020-03-28 15:20:33.643  INFO 1 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 143ms. Found 0 Redis repository interfaces.

2020-03-28 15:20:34.846  WARN 1 --- [           main] o.s.boot.actuate.endpoint.EndpointId     : Endpoint ID 'service-registry' contains invalid characters, please migrate to a valid format.

2020-03-28 15:20:35.040  WARN 1 --- [           main] o.s.boot.actuate.endpoint.EndpointId     : Endpoint ID 'hystrix.stream' contains invalid characters, please migrate to a valid format.

2020-03-28 15:20:39.622  WARN 1 --- [           main] o.m.s.mapper.ClassPathMapperScanner      : No MyBatis mapper was found in '[org.springblade.auth]' package. Please check your configuration.

2020-03-28 15:20:46.986  INFO 1 --- [           main] o.s.cloud.context.scope.GenericScope     : BeanFactory id=3db305f3-fa75-3367-ad7f-6f6ae731c78e

2020-03-28 15:20:47.182  INFO 1 --- [           main] o.s.c.a.ConfigurationClassEnhancer       : @Bean method BladePropertyConfiguration.bladePropertySourcePostProcessor is non-static and returns an object assignable to Spring's BeanFactoryPostProcessor interface. This will result in a failure to process annotations such as @Autowired, @Resource and @PostConstruct within the method's declaring @Configuration class. Add the 'static' modifier to this method to avoid these container lifecycle issues; see @Bean javadoc for complete details.

2020-03-28 15:20:47.238  INFO 1 --- [           main] s.c.l.p.BladePropertySourcePostProcessor : BladePropertySourcePostProcessor init.

2020-03-28 15:20:47.238  INFO 1 --- [           main] s.c.l.p.BladePropertySourcePostProcessor : BladePropertySourcePostProcessor process @BladePropertySource bean.

2020-03-28 15:20:49.274  INFO 1 --- [           main] faultConfiguringBeanFactoryPostProcessor : No bean named 'errorChannel' has been explicitly defined. Therefore, a default PublishSubscribeChannel will be created.

2020-03-28 15:20:49.577  INFO 1 --- [           main] faultConfiguringBeanFactoryPostProcessor : No bean named 'taskScheduler' has been explicitly defined. Therefore, a default ThreadPoolTaskScheduler will be created.

2020-03-28 15:20:49.899  INFO 1 --- [           main] faultConfiguringBeanFactoryPostProcessor : No bean named 'integrationHeaderChannelRegistry' has been explicitly defined. Therefore, a default DefaultHeaderChannelRegistry will be created.

2020-03-28 15:20:56.386  INFO 1 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$e25018cf] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)

2020-03-28 15:21:03.273  INFO 1 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'spring.cloud.sentinel-com.alibaba.cloud.sentinel.SentinelProperties' of type [com.alibaba.cloud.sentinel.SentinelProperties] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)

2020-03-28 15:21:05.464  INFO 1 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'com.alibaba.cloud.sentinel.custom.SentinelAutoConfiguration' of type [com.alibaba.cloud.sentinel.custom.SentinelAutoConfiguration$$EnhancerBySpringCGLIB$$5f786ac] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)

2020-03-28 15:21:05.889  INFO 1 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.integration.config.IntegrationManagementConfiguration' of type [org.springframework.integration.config.IntegrationManagementConfiguration$$EnhancerBySpringCGLIB$$4d41d3fe] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)

2020-03-28 15:21:06.208  INFO 1 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.boot.autoconfigure.integration.IntegrationAutoConfiguration$IntegrationJmxConfiguration' of type [org.springframework.boot.autoconfigure.integration.IntegrationAutoConfiguration$IntegrationJmxConfiguration$$EnhancerBySpringCGLIB$$28d3df1e] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)

2020-03-28 15:21:06.582  INFO 1 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.boot.autoconfigure.jmx.JmxAutoConfiguration' of type [org.springframework.boot.autoconfigure.jmx.JmxAutoConfiguration$$EnhancerBySpringCGLIB$$61bb87eb] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)

2020-03-28 15:21:07.632  INFO 1 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'mbeanServer' of type [com.sun.jmx.mbeanserver.JmxMBeanServer] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)

2020-03-28 15:21:12.677  INFO 1 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'integrationDisposableAutoCreatedBeans' of type [org.springframework.integration.config.annotation.Disposables] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)

2020-03-28 15:21:17.909  WARN 1 --- [           main] io.undertow.websockets.jsr               : UT026010: Buffer pool was not set on WebSocketDeploymentInfo, the default pool will be used

2020-03-28 15:21:18.318  INFO 1 --- [           main] io.undertow.servlet                      : Initializing Spring embedded WebApplicationContext

2020-03-28 15:21:18.318  INFO 1 --- [           main] o.s.web.context.ContextLoader            : Root WebApplicationContext: initialization completed in 106301 ms

2020-03-28 15:21:18.567  INFO 1 --- [           main] c.a.c.s.SentinelWebAutoConfiguration     : [Sentinel Starter] register Sentinel CommonFilter with urlPatterns: [/*].

2020-03-28 15:21:23.797  WARN 1 --- [           main] c.n.c.sources.URLConfigurationSource     : No URLs will be polled as dynamic configuration sources.

2020-03-28 15:21:23.798  INFO 1 --- [           main] c.n.c.sources.URLConfigurationSource     : To enable URLs as dynamic configuration sources, define System property archaius.configurationSource.additionalUrls or make config.properties available on classpath.

2020-03-28 15:21:23.970  INFO 1 --- [   

14:46:33.993 [main] DEBUG org.springframework.core.env.PropertySourcesPropertyResolver - Found key 'spring.profiles.active' in PropertySource 'commandLineArgs' with value of type String

14:46:34.132 [main] DEBUG org.springframework.core.env.StandardEnvironment - Activating profiles [test]

----启动中,读取到的环境变量:[test],jar地址:[file:/blade/resource/app.jar]----

15:33:14.956 [main] DEBUG org.springframework.core.env.PropertySourcesPropertyResolver - Found key 'spring.profiles.active' in PropertySource 'commandLineArgs' with value of type String

15:33:15.448 [main] DEBUG org.springframework.core.env.StandardEnvironment - Activating profiles [test]

----启动中,读取到的环境变量:[test],jar地址:[file:/blade/resource/app.jar]----

            ______  _             _       ___   ___

            | ___ \| |           | |      \  \ /  /

            | |_/ /| |  __ _   __| |  ___  \  V  /

            | ___ \| | / _` | / _` | / _ \   > <

            | |_/ /| || (_| || (_| ||  __/ /  .  \

            \____/ |_| \__,_| \__,_| \___|/__/ \__\


:: BladeX :: blade-resource:test :: Running SpringBoot 2.1.12.RELEASE ::


2020-03-27 15:34:01.009  INFO 1 --- [           main] c.a.c.n.c.NacosPropertySourceBuilder     : Loading nacos data, dataId: 'blade.yaml', group: 'DEFAULT_GROUP', data: #服务器配置

server:

  undertow:

    # 设置IO线程数, 它主要执行非阻塞的任务,它们会负责多个连接, 默认设置每个CPU核心一个线程

    io-threads: 16

    # 阻塞任务线程池, 当执行类似servlet请求阻塞操作, undertow会从这个线程池中取得线程,它的值设置取决于系统的负载

    worker-threads: 400

    # 以下的配置会影响buffer,这些buffer会用于服务器连接的IO操作,有点类似netty的池化内存管理

    buffer-size: 1024

    # 是否分配的直接内存

    direct-buffers: true


#spring配置

spring:

  devtools:

    restart:

      log-condition-evaluation-delta: false

    livereload:

      port: 23333


#feign配置

feign:

  hystrix:

    enabled: true

  #sentinel:

    #enabled: true

  okhttp:

    enabled: true

  httpclient:

    enabled: false


#hystrix配置

hystrix:

  threadpool:

    default:

      coreSize: 300

      maxQueueSize: 1000

      queueSizeRejectionThreshold: 800

  command:

    default:

      execution:

        isolation:

          thread:

            timeoutInMilliseconds: 5000


#ribbon配置

ribbon:

  #对当前实例的重试次数

  MaxAutoRetries: 1

  #切换实例的重试次数

  MaxAutoRetriesNextServer: 2

  #请求处理的超时时间

  ReadTimeout: 60000

  #请求连接的超时时间

  ConnectTimeout: 60000

  #对所有操作请求都进行重试

  OkToRetryOnAllOperations: true


#对外暴露端口

management:

  endpoints:

    web:

      exposure:

        include: "*"

  endpoint:

    health:

      show-details: always


#blade配置

blade:

  xss:

    enable: true

    skip-url:

      - /weixin

      - /notice/submit

  secure:

    skip-url:

      - /test/**

    client:

      - client-id: sword

        path-patterns:

          - /sword/**

      - client-id: saber

        path-patterns:

          - /saber/**

  tenant:

    enhance: false

    column: tenant_id

    exclude-tables:

      - blade_user


2020-03-27 15:34:02.020  INFO 1 --- [           main] c.a.c.n.c.NacosPropertySourceBuilder     : Loading nacos data, dataId: 'blade-test.yaml', group: 'DEFAULT_GROUP', data: #spring配置

spring:

  redis:

    ##redis 单机环境配置

    host: 127.0.0.1

    port: 6379

    password:

    database: 0

    ssl: false

    ##redis 集群环境配置

    #cluster:

    #  nodes: 127.0.0.1:7001,127.0.0.1:7002,127.0.0.1:7003

    #  commandTimeout: 5000

  datasource:

    driver-class-name: com.mysql.cj.jdbc.Driver

    #driver-class-name: org.postgresql.Driver

    #driver-class-name: oracle.jdbc.OracleDriver

    druid:

      # MySql、PostgreSQL校验

      validation-query: select 1

      # Oracle校验

      #validation-query: select 1 from dual



#项目模块集中配置

blade:

  #分布式锁配置

  lock:

     enabled: false

     address: redis://127.0.0.1:6379

  #通用开发生产环境数据库地址(特殊情况可在对应的子工程里配置覆盖)

  datasource:

    test:

      # MySql

      url: jdbc:mysql://127.0.0.1:3306/bladex?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&tinyInt1isBit=false&allowMultiQueries=true&serverTimezone=GMT%2B8&allowPublicKeyRetrieval=true

      username: bladex

      password: bladex

      # PostgreSQL

      #url: jdbc:postgresql://127.0.0.1:5432/bladex

      #username: postgres

      #password: 123456

      # Oracle

      #url: jdbc:oracle:thin:@127.0.0.1:49161:orcl

      #username: BLADEX

      #password: oracle

  document:

    resources:

      - name: 授权模块

        location: /blade-auth

      - name: 工作台模块

        location: /blade-desk

      - name: 系统模块

        location: /blade-system


2020-03-27 15:34:02.654  WARN 1 --- [           main] c.a.c.n.c.NacosPropertySourceBuilder     : Ignore the empty nacos configuration and get it based on dataId[blade-resource] & group[DEFAULT_GROUP]

2020-03-27 15:34:03.259  WARN 1 --- [           main] c.a.c.n.c.NacosPropertySourceBuilder     : Ignore the empty nacos configuration and get it based on dataId[blade-resource.yaml] & group[DEFAULT_GROUP]

2020-03-27 15:34:03.863  WARN 1 --- [           main] c.a.c.n.c.NacosPropertySourceBuilder     : Ignore the empty nacos configuration and get it based on dataId[blade-resource-test.yaml] & group[DEFAULT_GROUP]

2020-03-27 15:34:04.028  INFO 1 --- [           main] b.c.PropertySourceBootstrapConfiguration : Located property source: [BootstrapPropertySource {name='bootstrapProperties-blade-resource-test.yaml'}, BootstrapPropertySource {name='bootstrapProperties-blade-resource.yaml'}, BootstrapPropertySource {name='bootstrapProperties-blade-resource'}, BootstrapPropertySource {name='bootstrapProperties-blade-test.yaml'}, BootstrapPropertySource {name='bootstrapProperties-blade.yaml'}]

2020-03-27 15:34:04.898  INFO 1 --- [           main] o.s.resource.ResourceApplication         : The following profiles are active: test

2020-03-27 15:34:47.943  WARN 1 --- [           main] o.s.c.c.u.SpringFactoryImportSelector    : More than one implementation of @EnableCircuitBreaker (now relying on @Conditionals to pick one): [org.springframework.cloud.netflix.hystrix.HystrixCircuitBreakerConfiguration, com.alibaba.cloud.sentinel.custom.SentinelCircuitBreakerConfiguration]

2020-03-27 15:42:34.525  WARN 1 --- [           main] o.s.boot.actuate.endpoint.EndpointId     : Endpoint ID 'nacos-config' contains invalid characters, please migrate to a valid format.

2020-03-27 15:42:35.736  WARN 1 --- [           main] o.s.boot.actuate.endpoint.EndpointId     : Endpoint ID 'nacos-discovery' contains invalid characters, please migrate to a valid format.

15:46:23.217 [main] DEBUG org.springframework.core.env.PropertySourcesPropertyResolver - Found key 'spring.profiles.active' in PropertySource 'commandLineArgs' with value of type String

15:46:23.471 [main] DEBUG org.springframework.core.env.StandardEnvironment - Activating profiles [test]

----启动中,读取到的环境变量:[test],jar地址:[file:/blade/resource/app.jar]----

撈取auth的log

15:33:14.421 [main] DEBUG org.springframework.core.env.PropertySourcesPropertyResolver - Found key 'spring.profiles.active' in PropertySource 'commandLineArgs' with value of type String

15:33:14.781 [main] DEBUG org.springframework.core.env.StandardEnvironment - Activating profiles [test]

----启动中,读取到的环境变量:[test],jar地址:[file:/blade/auth/app.jar]----

            ______  _             _       ___   ___

            | ___ \| |           | |      \  \ /  /

            | |_/ /| |  __ _   __| |  ___  \  V  /

            | ___ \| | / _` | / _` | / _ \   > <

            | |_/ /| || (_| || (_| ||  __/ /  .  \

            \____/ |_| \__,_| \__,_| \___|/__/ \__\


:: BladeX :: blade-auth:test :: Running SpringBoot 2.1.12.RELEASE ::


2020-03-27 15:33:47.267  INFO 1 --- [           main] c.a.c.n.c.NacosPropertySourceBuilder     : Loading nacos data, dataId: 'blade.yaml', group: 'DEFAULT_GROUP', data: #服务器配置

server:

  undertow:

    # 设置IO线程数, 它主要执行非阻塞的任务,它们会负责多个连接, 默认设置每个CPU核心一个线程

    io-threads: 16

    # 阻塞任务线程池, 当执行类似servlet请求阻塞操作, undertow会从这个线程池中取得线程,它的值设置取决于系统的负载

    worker-threads: 400

    # 以下的配置会影响buffer,这些buffer会用于服务器连接的IO操作,有点类似netty的池化内存管理

    buffer-size: 1024

    # 是否分配的直接内存

    direct-buffers: true


#spring配置

spring:

  devtools:

    restart:

      log-condition-evaluation-delta: false

    livereload:

      port: 23333


#feign配置

feign:

  hystrix:

    enabled: true

  #sentinel:

    #enabled: true

  okhttp:

    enabled: true

  httpclient:

    enabled: false


#hystrix配置

hystrix:

  threadpool:

    default:

      coreSize: 300

      maxQueueSize: 1000

      queueSizeRejectionThreshold: 800

  command:

    default:

      execution:

        isolation:

          thread:

            timeoutInMilliseconds: 5000


#ribbon配置

ribbon:

  #对当前实例的重试次数

  MaxAutoRetries: 1

  #切换实例的重试次数

  MaxAutoRetriesNextServer: 2

  #请求处理的超时时间

  ReadTimeout: 60000

  #请求连接的超时时间

  ConnectTimeout: 60000

  #对所有操作请求都进行重试

  OkToRetryOnAllOperations: true


#对外暴露端口

management:

  endpoints:

    web:

      exposure:

        include: "*"

  endpoint:

    health:

      show-details: always


#blade配置

blade:

  xss:

    enable: true

    skip-url:

      - /weixin

      - /notice/submit

  secure:

    skip-url:

      - /test/**

    client:

      - client-id: sword

        path-patterns:

          - /sword/**

      - client-id: saber

        path-patterns:

          - /saber/**

  tenant:

    enhance: false

    column: tenant_id

    exclude-tables:

      - blade_user


2020-03-27 15:33:48.036  INFO 1 --- [           main] c.a.c.n.c.NacosPropertySourceBuilder     : Loading nacos data, dataId: 'blade-test.yaml', group: 'DEFAULT_GROUP', data: #spring配置

spring:

  redis:

    ##redis 单机环境配置

    host: 127.0.0.1

    port: 6379

    password:

    database: 0

    ssl: false

    ##redis 集群环境配置

    #cluster:

    #  nodes: 127.0.0.1:7001,127.0.0.1:7002,127.0.0.1:7003

    #  commandTimeout: 5000

  datasource:

    driver-class-name: com.mysql.cj.jdbc.Driver

    #driver-class-name: org.postgresql.Driver

    #driver-class-name: oracle.jdbc.OracleDriver

    druid:

      # MySql、PostgreSQL校验

      validation-query: select 1

      # Oracle校验

      #validation-query: select 1 from dual



#项目模块集中配置

blade:

  #分布式锁配置

  lock:

     enabled: false

     address: redis://127.0.0.1:6379

  #通用开发生产环境数据库地址(特殊情况可在对应的子工程里配置覆盖)

  datasource:

    test:

      # MySql

      url: jdbc:mysql://127.0.0.1:3306/bladex?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&tinyInt1isBit=false&allowMultiQueries=true&serverTimezone=GMT%2B8&allowPublicKeyRetrieval=true

      username: bladex

      password: bladex

      # PostgreSQL

      #url: jdbc:postgresql://127.0.0.1:5432/bladex

      #username: postgres

      #password: 123456

      # Oracle

      #url: jdbc:oracle:thin:@127.0.0.1:49161:orcl

      #username: BLADEX

      #password: oracle

  document:

    resources:

      - name: 授权模块

        location: /blade-auth

      - name: 工作台模块

        location: /blade-desk

      - name: 系统模块

        location: /blade-system


2020-03-27 15:33:48.704  WARN 1 --- [           main] c.a.c.n.c.NacosPropertySourceBuilder     : Ignore the empty nacos configuration and get it based on dataId[blade-auth] & group[DEFAULT_GROUP]

2020-03-27 15:33:49.362  WARN 1 --- [           main] c.a.c.n.c.NacosPropertySourceBuilder     : Ignore the empty nacos configuration and get it based on dataId[blade-auth.yaml] & group[DEFAULT_GROUP]

2020-03-27 15:33:51.773  WARN 1 --- [           main] c.a.c.n.c.NacosPropertySourceBuilder     : Ignore the empty nacos configuration and get it based on dataId[blade-auth-test.yaml] & group[DEFAULT_GROUP]

2020-03-27 15:33:51.893  INFO 1 --- [           main] b.c.PropertySourceBootstrapConfiguration : Located property source: [BootstrapPropertySource {name='bootstrapProperties-blade-auth-test.yaml'}, BootstrapPropertySource {name='bootstrapProperties-blade-auth.yaml'}, BootstrapPropertySource {name='bootstrapProperties-blade-auth'}, BootstrapPropertySource {name='bootstrapProperties-blade-test.yaml'}, BootstrapPropertySource {name='bootstrapProperties-blade.yaml'}]

2020-03-27 15:33:52.158  INFO 1 --- [           main] org.springblade.auth.AuthApplication     : The following profiles are active: test

2020-03-27 15:33:54.775  WARN 1 --- [           main] o.s.c.c.u.SpringFactoryImportSelector    : More than one implementation of @EnableCircuitBreaker (now relying on @Conditionals to pick one): [org.springframework.cloud.netflix.hystrix.HystrixCircuitBreakerConfiguration, com.alibaba.cloud.sentinel.custom.SentinelCircuitBreakerConfiguration]

2020-03-27 15:34:29.870  WARN 1 --- [           main] o.s.boot.actuate.endpoint.EndpointId     : Endpoint ID 'nacos-config' contains invalid characters, please migrate to a valid format.

2020-03-27 15:34:29.946  WARN 1 --- [           main] o.s.boot.actuate.endpoint.EndpointId     : Endpoint ID 'nacos-discovery' contains invalid characters, please migrate to a valid format.

2020-03-27 15:34:58.969  INFO 1 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Multiple Spring Data modules found, entering strict repository configuration mode!

2020-03-27 15:34:59.026  INFO 1 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data Redis repositories in DEFAULT mode.

2020-03-27 15:35:01.513  INFO 1 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 778ms. Found 0 Redis repository interfaces.

2020-03-27 15:35:07.069  WARN 1 --- [           main] o.s.boot.actuate.endpoint.EndpointId     : Endpoint ID 'service-registry' contains invalid characters, please migrate to a valid format.

2020-03-27 15:35:07.848  WARN 1 --- [           main] o.s.boot.actuate.endpoint.EndpointId     : Endpoint ID 'hystrix.stream' contains invalid characters, please migrate to a valid format.

2020-03-27 15:35:38.753  WARN 1 --- [           main] o.m.s.mapper.ClassPathMapperScanner      : No MyBatis mapper was found in '[org.springblade.auth]' package. Please check your configuration.

2020-03-27 15:35:43.042  INFO 1 --- [           main] o.s.cloud.context.scope.GenericScope     : BeanFactory id=3db305f3-fa75-3367-ad7f-6f6ae731c78e

2020-03-27 15:35:43.211  INFO 1 --- [           main] o.s.c.a.ConfigurationClassEnhancer       : @Bean method BladePropertyConfiguration.bladePropertySourcePostProcessor is non-static and returns an object assignable to Spring's BeanFactoryPostProcessor interface. This will result in a failure to process annotations such as @Autowired, @Resource and @PostConstruct within the method's declaring @Configuration class. Add the 'static' modifier to this method to avoid these container lifecycle issues; see @Bean javadoc for complete details.

2020-03-27 15:35:43.246  INFO 1 --- [           main] s.c.l.p.BladePropertySourcePostProcessor : BladePropertySourcePostProcessor init.

2020-03-27 15:35:43.246  INFO 1 --- [           main] s.c.l.p.BladePropertySourcePostProcessor : BladePropertySourcePostProcessor process @BladePropertySource bean.

2020-03-27 15:35:45.042  INFO 1 --- [           main] faultConfiguringBeanFactoryPostProcessor : No bean named 'errorChannel' has been explicitly defined. Therefore, a default PublishSubscribeChannel will be created.

2020-03-27 15:35:45.265  INFO 1 --- [           main] faultConfiguringBeanFactoryPostProcessor : No bean named 'taskScheduler' has been explicitly defined. Therefore, a default ThreadPoolTaskScheduler will be created.

2020-03-27 15:35:45.511  INFO 1 --- [           main] faultConfiguringBeanFactoryPostProcessor : No bean named 'integrationHeaderChannelRegistry' has been explicitly defined. Therefore, a default DefaultHeaderChannelRegistry will be created.

2020-03-27 15:35:48.089  INFO 1 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$da0d7aa7] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)

2020-03-27 15:36:17.193  INFO 1 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'spring.cloud.sentinel-com.alibaba.cloud.sentinel.SentinelProperties' of type [com.alibaba.cloud.sentinel.SentinelPrope

嘗試撈取blade-resource容器IP

# docker inspect 0f2cba392edd

[

    {

        "Id": "0f2cba392edde3a5386290f2335cc8f5162d79d7ee011741a5e1c5014bdb1b6d",

        "Created": "2020-03-27T01:52:14.664990299Z",

        "Path": "java",

        "Args": [

            "-Djava.security.egd=file:/dev/./urandom",

            "-jar",

            "app.jar",

            "--spring.profiles.active=test"

        ],

        "State": {

            "Status": "running",

            "Running": true,

            "Paused": false,

            "Restarting": false,

            "OOMKilled": false,

            "Dead": false,

            "Pid": 15804,

            "ExitCode": 0,

            "Error": "",

            "StartedAt": "2020-03-27T03:32:43.917952843Z",

            "FinishedAt": "2020-03-27T03:32:26.941413579Z"

        },

        "Image": "sha256:04910c2d6a8cbf4164bc936d2d004da25bdf95bb603d9648dbafde3a22cff0f0",

        "ResolvConfPath": "/var/lib/docker/containers/0f2cba392edde3a5386290f2335cc8f5162d79d7ee011741a5e1c5014bdb1b6d/resolv.conf",

        "HostnamePath": "/var/lib/docker/containers/0f2cba392edde3a5386290f2335cc8f5162d79d7ee011741a5e1c5014bdb1b6d/hostname",

        "HostsPath": "/var/lib/docker/containers/0f2cba392edde3a5386290f2335cc8f5162d79d7ee011741a5e1c5014bdb1b6d/hosts",

        "LogPath": "/var/lib/docker/containers/0f2cba392edde3a5386290f2335cc8f5162d79d7ee011741a5e1c5014bdb1b6d/0f2cba392edde3a5386290f2335cc8f5162d79d7ee011741a5e1c5014bdb1b6d-json.log",

        "Name": "/docker_blade-resource_1",

        "RestartCount": 1,

        "Driver&q

2条回答
  • 2020-03-27 13:53

    補充docker-compose.yml

    : :
      :
        : nacos/nacos-server:1.1.4
        : :
          - MODE=standalone
          - TZ=Asia/Shanghai
        :
          - /docker/nacos/standalone-logs/:/home/nacos/logs
          - /docker/nacos/init.d/custom.properties:/home/nacos/init.d/custom.properties
        :
          - 8848:8848
        :
          :
            : 172.30.0.48
    
      :
        : bladex/sentinel-dashboard:1.7.1
        : :
          - TZ=Asia/Shanghai
        :
          - 8858:8858
        : on-failure
        :
          :
            : 172.30.0.58
    
    
      :
        : seataio/seata-server:1.1.0
        : :
          - 8091:8091
        :
          - TZ=Asia/Shanghai
          - SEATA_PORT=8091
          - STORE_MODE=file
        :
          :
            : 172.30.0.68
    
      :
        : nginx:stable-alpine-perl
        : :
          - TZ=Asia/Shanghai
        :
        - 88:88
        :
        - /docker/nginx/api/nginx.conf:/etc/nginx/nginx.conf
        : true
        : always
        :
        - blade_net
    
      :
        : nginx:stable-alpine-perl
        : :
          - TZ=Asia/Shanghai
        :
          - 8000:8000
        :
          - /docker/nginx/web/html:/usr/share/nginx/html
          - /docker/nginx/web/nginx.conf:/etc/nginx/nginx.conf
        : true
        : always
        :
          - blade_net
    
      :
        : redis:5.0.2-alpine
        : :
          - TZ=Asia/Shanghai
        :
        - 3379:6379
        :
        - /docker/redis/data:/data
        : : true
        : always
        :
        - blade_net
    
      :
        : :
          - TZ=Asia/Shanghai
        :
        - 7002:7002
        : true
        : always
        :
        - blade_net
    
      :
        : :
          - TZ=Asia/Shanghai
        :
          - 7003:7003
        : true
        : always
        :
          - blade_net
    
      :
        : :
          - TZ=Asia/Shanghai
        :
          - 9411:9411
        : true
        : always
        :
          - blade_net
    
      :
        : :
          - TZ=Asia/Shanghai
        : true
        : always
        :
          :
            : 172.30.0.81
    
      :
        : :
          - TZ=Asia/Shanghai
        : true
        : always
        :
          :
            : 172.30.0.82
    
      :
        : :
          - TZ=Asia/Shanghai
        : true
        : always
        :
          :
            : 172.30.0.91
    
      :
        : :
          - TZ=Asia/Shanghai
        : true
        : always
        :
          :
            : 172.30.0.92
    
      :
        : :
          - TZ=Asia/Shanghai
        : true
        : always
        :
        - blade_net
    
      :
        : :
          - TZ=Asia/Shanghai
        : true
        : always
        :
        - blade_net
    
      :
        : :
          - TZ=Asia/Shanghai
        : true
        : always
        :
        - blade_net
    
      :
        : :
          - TZ=Asia/Shanghai
        : true
        : always
        :
        - blade_net
    
      :
        : :
          - TZ=Asia/Shanghai
        : true
        : always
        :
          - blade_net
    
      :
        : :
          - TZ=Asia/Shanghai
        : true
        : always
        :
          - 9999:9999
        :
          - blade_net
    
      :
        : :
          - TZ=Asia/Shanghai
        : true
        : always
        :
          - blade_net
    
    :
      :
        : bridge
        :
          :
          - : 172.30.0.0/16

    補充API nginx.conf

    user  rootworker_processes  1error_log  /var/log/nginx/error.log warnpid        /var/run/nginx.pidevents {
        worker_connections  1024}
    
    
    http {
        include       /etc/nginx/mime.types    default_type  application/octet-stream    log_format  main      access_log  /var/log/nginx/access.log  main    sendfile        on    keepalive_timeout  65    upstream gateway {
                     server 172.30.0.81                 server 172.30.0.82             }
    
        upstream auth {
                     server 172.30.0.91:8100                 server 172.30.0.92:8100             }
    
        server {
          listen       88      server_name  gateway      location / {
               proxy_set_header Host $host           proxy_set_header X-Real-IP $remote_addr           proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for           proxy_buffering off           proxy_pass http://gateway      }
        }
    
        server {
          listen       9000      server_name  auth      location / {
               proxy_set_header Host $host           proxy_set_header X-Real-IP $remote_addr           proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for           proxy_buffering off           proxy_pass http://auth      }
        }
    
    }

    補充web nginx.conf

    user  rootworker_processes  1error_log  /var/log/nginx/error.log warnpid        /var/run/nginx.pidevents {
        worker_connections  1024}
    
    
    http {
        include       /etc/nginx/mime.types    default_type  application/octet-stream    log_format  main      access_log  /var/log/nginx/access.log  main    sendfile        on    keepalive_timeout  65    upstream gateway {
                     server 172.30.0.81                 server 172.30.0.82                 server 172.30.0.83             }
    
    
        server {
          listen       8000      server_name  web      root         /usr/share/nginx/html      location / {
    
          }
    
          location ^~/api {
               proxy_set_header Host $host           proxy_set_header X-Real-IP $remote_addr           proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for           proxy_buffering off           rewrite ^/api/(.*)$ /$1 break           proxy_pass http://gateway      }
        }
    
    
    }

    0 讨论(0)
  • docker logs -f 容器id 看具体报错日志


    你发的都是info级别的日志,无法看出问题所在

    作者追问:2020-03-30 08:44

    hi大佬,请再帮忙看看呢?

    0 讨论(2)
提交回复