1

Spring cloud eureka, cloud çalışıyorum ve çok iyi çalışıyorlar. Fakat eureka hizmetinde güvenlik ekledikten sonra bazı hatalarla karşılaştı. Kod ve hatalar tüm ayrıntılarıspring eureka security HTTP durum koduyla toplu güncelleme hatası 401

https://github.com/keryhu/eureka-security

application.yml

security: 
    user: 
    name: user 
    password: password 

eureka: 
    client: 
    registerWithEureka: false 
    fetchRegistry: false 
    server: 
    wait-time-in-ms-when-sync-empty: 0 

eureka hizmeti Ve config-servis application.java

@SpringBootApplication 
@EnableConfigServer 
@EnableDiscoveryClient 

config-hizmet uygulaması bulunmaktadır. yml

eureka: 
    client: 
    registry-fetch-interval-seconds: 5 
    serviceUrl: 
     defaultZone: http://user:[email protected]${domain.name:localhost}:8761/eureka/ 

spring: 
    cloud: 
    config: 
     server: 
     git: 
      uri: https://github.com/spring-cloud-samples/config-repo 
      basedir: target/config 
config-hizmet başladıktan sonra ihraç

yoktur hatalar: eureka-sunucu

2016-04-10 11:22:39.402 ERROR 80526 --- [get_localhost-3] c.n.e.cluster.ReplicationTaskProcessor : Batch update failure with HTTP status code 401; discarding 1 replication tasks 
2016-04-10 11:22:39.402 WARN 80526 --- [get_localhost-3] c.n.eureka.util.batcher.TaskExecutors : Discarding 1 tasks of TaskBatchingWorker-target_localhost-3 due to permanent error 
2016-04-10 11:23:09.411 ERROR 80526 --- [get_localhost-3] c.n.e.cluster.ReplicationTaskProcessor : Batch update failure with HTTP status code 401; discarding 1 replication tasks 
2016-04-10 11:23:09.412 WARN 80526 --- [get_localhost-3] c.n.eureka.util.batcher.TaskExecutors : Discarding 1 tasks of TaskBatchingWorker-target_localhost-3 due to permanent error 
2016-04-10 11:23:39.429 ERROR 80526 --- [get_localhost-3] c.n.e.cluster.ReplicationTaskProcessor : Batch update failure with HTTP status code 401; discarding 1 replication tasks 
2016-04-10 11:23:39.430 WARN 80526 --- [get_localhost-3] c.n.eureka.util.batcher.TaskExecutors : Discarding 1 tasks of TaskBatchingWorker-target_localhost-3 due to permanent error 
+0

Eğer Brixton.RC2 deneyebilir miyiz istemci application.yml? – spencergibb

+0

@spencergibb Brixton.RC1'i kullanıyorum –

+0

Evet, RC2 ile deneyin, hala bir sorun varsa, ona bakabiliriz. – spencergibb

cevap

0

Ben jacky-fan yanıta katılabilir.

Bunlar, çalışma yapılandırmamın kullanıcı adı ve parola olmadan nasıl göründüğündedir.

sunucu application.yml

spring: 
    application: 
    name: eureka-service 
server: 
    port: 8302 
eureka: 
    client: 
    register-with-eureka: false 
    fetch-registry: false 
    service-url: 
     defaultZone: http://localhost:8302/eureka/ 
    server: 
    wait-time-in-ms-when-sync-empty: 0 

eureka: 
    client: 
    register-with-eureka: true 
    fetch-registry: true 
    service-url: 
     defaultZone: http://localhost:8302/eureka/ 
    instance: 
    hostname: localhost 
spring: 
    application: 
    name: my-service 
server: 
    port: 8301 
İlgili konular