org.axonframework.commandhandling.distributed.commandDisPatchException:errorccurredWhileTryingTodisPatchAcompateCommandonThedistribedCommandBus:404null

发布于 2025-02-13 21:01:13 字数 2427 浏览 1 评论 0原文

***面对以下问题: org.axonframework.commandhandling.distributed.commandDisPatchException:试图在DistributionCommandBus上派遣命令时发生了错误:404 NULL

使用K8S在Open Shift平台上部署了应用程序。 在特定环境上将POD的数量增加到大于1的同时,此问题即将到来。***

是配置文件: -

    eventbus:
      type: jms
    eventBus:
      server:
        selector:
          topicName: EventBus
          queueName: EventBus.management-inventory-api
    eventstore:
      jdbc:
        validateOnly: true
    endpoints:
      health:
        sensitive: false
      jmx:
        uniqueNames: true
    
    liquibase:
      enabled: false
    server:
      port: 8087
      http:
        port: 8088
      ssl:
        enabled: false
        keyStore: ${certs.path}/inventorydomain.jks
        keyStoreType: JKS
        trustStore: ${certs.path}/inventorydomain_truststore.jks
        trustStoreType: JKS
        keyAlias: inventorydomain
    
    spring:
      jmx:
        default-domain: com.inventory.domain.inventory-command
      jpa:
        hibernate:
          ddlAuto: validate
        show-sql: true
      messages:
        basename: errors,platform-errors
      autoconfigure.exclude: |
        org.axonframework.boot.autoconfig.JpaAutoConfiguration,
        org.axonframework.boot.autoconfig.AxonAutoConfiguration
    annotation:
      eventHandler:
        lookupPrefix: com.consumercard.command.listener.external
      eventMapping:
        lookupPrefix: com.consumercard.command.event
    jmsBrokers:
      producer:
        brokerUrl: vm://localhost?broker.persistent=false
      consumer:
        brokerUrl: vm://localhost?broker.persistent=false
    
    spring.cloud.config.discovery.enabled: false
    eureka:
      instance:
        preferIpAddress: true
        nonSecurePort: ${server.http.port}
        securePort: ${server.port}
        nonSecurePortEnabled: true
        securePortEnabled: false
        metadata-map:
          zone: zone-1
      client:
        enabled: false
        serviceUrl:
          defaultZone: https://localhost:8448/eureka
    logging:
      level: DEBUG
    
    basicAuth.enabled: true
    
    rest:
      client:
        connection:
          defaultMaxPerRoute: 50
          maxTotal: 100
          connectionTimeout: 10000
          readTimeout: 30000
    
  

注意: -

This was an additional property added:-
    eureka:
      instance:  
        metadata-map:
          zone: zone-1

***Facing below issue:
org.axonframework.commandhandling.distributed.CommandDispatchException: An error occurred while trying to dispatch a command on the DistributedCommandBus: 404 null

The application is deployed on open shift platform using K8s.
This issue is coming while increasing the number of pods to greater than 1 on a specific environment.***

Below is the configuration file:-

    eventbus:
      type: jms
    eventBus:
      server:
        selector:
          topicName: EventBus
          queueName: EventBus.management-inventory-api
    eventstore:
      jdbc:
        validateOnly: true
    endpoints:
      health:
        sensitive: false
      jmx:
        uniqueNames: true
    
    liquibase:
      enabled: false
    server:
      port: 8087
      http:
        port: 8088
      ssl:
        enabled: false
        keyStore: ${certs.path}/inventorydomain.jks
        keyStoreType: JKS
        trustStore: ${certs.path}/inventorydomain_truststore.jks
        trustStoreType: JKS
        keyAlias: inventorydomain
    
    spring:
      jmx:
        default-domain: com.inventory.domain.inventory-command
      jpa:
        hibernate:
          ddlAuto: validate
        show-sql: true
      messages:
        basename: errors,platform-errors
      autoconfigure.exclude: |
        org.axonframework.boot.autoconfig.JpaAutoConfiguration,
        org.axonframework.boot.autoconfig.AxonAutoConfiguration
    annotation:
      eventHandler:
        lookupPrefix: com.consumercard.command.listener.external
      eventMapping:
        lookupPrefix: com.consumercard.command.event
    jmsBrokers:
      producer:
        brokerUrl: vm://localhost?broker.persistent=false
      consumer:
        brokerUrl: vm://localhost?broker.persistent=false
    
    spring.cloud.config.discovery.enabled: false
    eureka:
      instance:
        preferIpAddress: true
        nonSecurePort: ${server.http.port}
        securePort: ${server.port}
        nonSecurePortEnabled: true
        securePortEnabled: false
        metadata-map:
          zone: zone-1
      client:
        enabled: false
        serviceUrl:
          defaultZone: https://localhost:8448/eureka
    logging:
      level: DEBUG
    
    basicAuth.enabled: true
    
    rest:
      client:
        connection:
          defaultMaxPerRoute: 50
          maxTotal: 100
          connectionTimeout: 10000
          readTimeout: 30000
    
  

NOTE:-

This was an additional property added:-
    eureka:
      instance:  
        metadata-map:
          zone: zone-1

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文