【问题标题】:Batch update failure with HTTP status code 404; discarding 1 replication tasks批量更新失败,HTTP 状态码 404;丢弃 1 个复制任务
【发布时间】:2020-10-01 07:15:19
【问题描述】:

启动服务发现后,注册代理微服务时,eureka报如下错误:

2020-06-11 21:07:19.778 ERROR 1040 --- [et_localhost-19] c.n.e.cluster.ReplicationTaskProcessor   : Batch update failure with HTTP status code 404; discarding 1 replication tasks
2020-06-11 21:07:19.778  WARN 1040 --- [et_localhost-19] c.n.eureka.util.batcher.TaskExecutors    : Discarding 1 tasks of TaskBatchingWorker-target_localhost-19 due to permanent error
2020-06-11 21:07:49.782 ERROR 1040 --- [et_localhost-19] c.n.e.cluster.ReplicationTaskProcessor   : Batch update failure with HTTP status code 404; discarding 1 replication tasks
2020-06-11 21:07:49.782  WARN 1040 --- [et_localhost-19] c.n.eureka.util.batcher.TaskExecutors    : Discarding 1 tasks of TaskBatchingWorker-target_localhost-19 due to permanent error
2020-06-11 21:08:11.629  INFO 1040 --- [a-EvictionTimer] c.n.e.registry.AbstractInstanceRegistry  : Running the evict task with compensationTime 0ms
2020-06-11 21:08:19.796 ERROR 1040 --- [et_localhost-19] c.n.e.cluster.ReplicationTaskProcessor   : Batch update failure with HTTP status code 404; discarding 1 replication tasks
2020-06-11 21:08:19.796  WARN 1040 --- [et_localhost-19] c.n.eureka.util.batcher.TaskExecutors    : Discarding 1 tasks of TaskBatchingWorker-target_localhost-19 due to permanent error

Error Log

依赖如下:

<properties>
        <java.version>1.8</java.version>
        <spring-cloud.version>Hoxton.SR3</spring-cloud.version>
        <springfox-swagger2-version>2.9.2</springfox-swagger2-version>
        <springfox-swagger2-ui-version>2.9.2</springfox-swagger2-ui-version>
    </properties>

    <dependencies>
    
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-netflix-zuul</artifactId>
        </dependency> 
        
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-config</artifactId>
        </dependency>
    </dependencies>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.springframework.cloud</groupId>
                <artifactId>spring-cloud-dependencies</artifactId>
                <version>${spring-cloud.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

bootstrap.yml

spring:
  application:
    name: tng-crs-eureka            
server:
  port: 8761
  servlet:
    context-path: /eureka
eureka:
  client:
    registerWithEureka: false
    fetchRegistry: false

非常感谢任何帮助。我也尝试过禁用批量更新任务。但是,它没有用。

【问题讨论】:

  • 单个日志语句对尝试诊断问题没有帮助。您能否包括您的依赖项(包括版本)、您的配置和重现问题的步骤?
  • @spencergibb 我已经用使用的依赖项更新了帖子。
  • @spencergibb 你能帮我解决这个问题吗?
  • 您没有添加配置属性。
  • 添加了@spencergibb 配置属性。

标签: spring-security spring-cloud netflix-eureka netflix-zuul spring-cloud-netflix


【解决方案1】:

最后,我犯的错误被弄清楚了。我已经设置了 /eureka 的上下文路径。这就是所有这些麻烦的原因。删除 eureka 的上下文路径解决了我的问题。

【讨论】:

  • 我遇到了类似的问题,但我从来没有设置上下文路径,还有什么其他问题的指针吗?
猜你喜欢
  • 2016-07-31
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2013-04-10
  • 2014-09-13
  • 1970-01-01
  • 2020-09-18
  • 2021-04-10
相关资源
最近更新 更多