text:
reactor.core.Exceptions$ErrorCallbackNotImplemented: java.util.ConcurrentModificationException

Describe the bug
We use spring-cloud gateway framework as our api-gateway for more than 2 months,and it works fine.
But this morning we found one of the nodes (total 3 nodes) starting to throw error.
We use eureka as register center , please help to check the error log.
Finally we restart the node with problem,and it works now.
Thanks
Sample
2019-12-26 00:03:38,557 [INFO][fateway-web][com.netflix.discovery.shared.resolver.aws.ConfigClusterResolver 43][AsyncResolver-bootstrap-executor-0]dstTraceId:[] call [ConfigClusterResolver][getClusterEndpoints] Resolving eureka endpoints via configuration
2019-12-26 00:08:38,559 [INFO][fateway-web][com.netflix.discovery.shared.resolver.aws.ConfigClusterResolver 43][AsyncResolver-bootstrap-executor-0]dstTraceId:[] call [ConfigClusterResolver][getClusterEndpoints] Resolving eureka endpoints via configuration
2019-12-26 00:13:38,560 [INFO][fateway-web][com.netflix.discovery.shared.resolver.aws.ConfigClusterResolver 43][AsyncResolver-bootstrap-executor-0]dstTraceId:[] call [ConfigClusterResolver][getClusterEndpoints] Resolving eureka endpoints via configuration
2019-12-26 00:18:38,561 [INFO][fateway-web][com.netflix.discovery.shared.resolver.aws.ConfigClusterResolver 43][AsyncResolver-bootstrap-executor-0]dstTraceId:[] call [ConfigClusterResolver][getClusterEndpoints] Resolving eureka endpoints via configuration
2019-12-26 00:23:38,562 [INFO][fateway-web][com.netflix.discovery.shared.resolver.aws.ConfigClusterResolver 43][AsyncResolver-bootstrap-executor-0]dstTraceId:[] call [ConfigClusterResolver][getClusterEndpoints] Resolving eureka endpoints via configuration
2019-12-26 00:28:38,562 [INFO][fateway-web][com.netflix.discovery.shared.resolver.aws.ConfigClusterResolver 43][AsyncResolver-bootstrap-executor-0]dstTraceId:[] call [ConfigClusterResolver][getClusterEndpoints] Resolving eureka endpoints via configuration
2019-12-26 00:33:38,563 [INFO][fateway-web][com.netflix.discovery.shared.resolver.aws.ConfigClusterResolver 43][AsyncResolver-bootstrap-executor-0]dstTraceId:[] call [ConfigClusterResolver][getClusterEndpoints] Resolving eureka endpoints via configuration
2019-12-26 00:38:38,564 [INFO][fateway-web][com.netflix.discovery.shared.resolver.aws.ConfigClusterResolver 43][AsyncResolver-bootstrap-executor-0]dstTraceId:[] call [ConfigClusterResolver][getClusterEndpoints] Resolving eureka endpoints via configuration
2019-12-26 00:43:38,565 [INFO][fateway-web][com.netflix.discovery.shared.resolver.aws.ConfigClusterResolver 43][AsyncResolver-bootstrap-executor-0]dstTraceId:[] call [ConfigClusterResolver][getClusterEndpoints] Resolving eureka endpoints via configuration
2019-12-26 00:48:38,565 [INFO][fateway-web][com.netflix.discovery.shared.resolver.aws.ConfigClusterResolver 43][AsyncResolver-bootstrap-executor-0]dstTraceId:[] call [ConfigClusterResolver][getClusterEndpoints] Resolving eureka endpoints via configuration
2019-12-26 00:53:38,566 [INFO][fateway-web][com.netflix.discovery.shared.resolver.aws.ConfigClusterResolver 43][AsyncResolver-bootstrap-executor-0]dstTraceId:[] call [ConfigClusterResolver][getClusterEndpoints] Resolving eureka endpoints via configuration
2019-12-26 00:58:38,567 [INFO][fateway-web][com.netflix.discovery.shared.resolver.aws.ConfigClusterResolver 43][AsyncResolver-bootstrap-executor-0]dstTraceId:[] call [ConfigClusterResolver][getClusterEndpoints] Resolving eureka endpoints via configuration
2019-12-26 01:03:30,016 [ERROR][fateway-web][com.netflix.discovery.DiscoveryClient 1519][DiscoveryClient-CacheRefreshExecutor-0]dstTraceId:[] call [DiscoveryClient][refreshRegistry] Cannot fetch registry from server
reactor.core.Exceptions$ErrorCallbackNotImplemented: java.util.ConcurrentModificationException
Caused by: java.util.ConcurrentModificationException: null
	at java.util.LinkedHashMap$LinkedHashIterator.nextNode(LinkedHashMap.java:711)
	at java.util.LinkedHashMap$LinkedValueIterator.next(LinkedHashMap.java:739)
	at reactor.core.publisher.FluxIterable$IterableSubscription.poll(FluxIterable.java:389)
	at reactor.core.publisher.FluxFlatMap$FlatMapMain.drainLoop(FluxFlatMap.java:634)
	at reactor.core.publisher.FluxFlatMap$FlatMapMain.drain(FluxFlatMap.java:540)
	at reactor.core.publisher.FluxFlatMap$FlatMapInner.onSubscribe(FluxFlatMap.java:924)
	at reactor.core.publisher.FluxIterable.subscribe(FluxIterable.java:139)
	at reactor.core.publisher.FluxIterable.subscribe(FluxIterable.java:63)
	at reactor.core.publisher.Flux.subscribe(Flux.java:7921)
	at reactor.core.publisher.FluxFlatMap$FlatMapMain.onNext(FluxFlatMap.java:389)
	at reactor.core.publisher.FluxIterable$IterableSubscription.slowPath(FluxIterable.java:243)
	at reactor.core.publisher.FluxIterable$IterableSubscription.request(FluxIterable.java:201)
	at reactor.core.publisher.FluxFlatMap$FlatMapMain.onSubscribe(FluxFlatMap.java:335)
	at reactor.core.publisher.FluxIterable.subscribe(FluxIterable.java:139)
	at reactor.core.publisher.FluxIterable.subscribe(FluxIterable.java:63)
	at reactor.core.publisher.FluxFlatMap.subscribe(FluxFlatMap.java:97)
	at reactor.core.publisher.FluxMap.subscribe(FluxMap.java:62)
	at reactor.core.publisher.FluxMap.subscribe(FluxMap.java:62)
	at reactor.core.publisher.Flux.subscribe(Flux.java:7921)
	at reactor.core.publisher.FluxFlatMap$FlatMapMain.onNext(FluxFlatMap.java:389)
	at reactor.core.publisher.FluxIterable$IterableSubscription.slowPath(FluxIterable.java:243)
	at reactor.core.publisher.FluxIterable$IterableSubscription.request(FluxIterable.java:201)
	at reactor.core.publisher.FluxFlatMap$FlatMapMain.onSubscribe(FluxFlatMap.java:335)
	at reactor.core.publisher.FluxIterable.subscribe(FluxIterable.java:139)
	at reactor.core.publisher.FluxIterable.subscribe(FluxIterable.java:63)
	at reactor.core.publisher.FluxFlatMap.subscribe(FluxFlatMap.java:97)
	at reactor.core.publisher.MonoCollectList.subscribe(MonoCollectList.java:40)
	at reactor.core.publisher.MonoMapFuseable.subscribe(MonoMapFuseable.java:59)
	at reactor.core.publisher.MonoFlattenIterable.subscribe(MonoFlattenIterable.java:101)
	at reactor.core.publisher.FluxMaterialize.subscribe(FluxMaterialize.java:40)
	at reactor.core.publisher.MonoCollectList.subscribe(MonoCollectList.java:40)
	at reactor.core.publisher.MonoPeekFuseable.subscribe(MonoPeekFuseable.java:74)
	at reactor.core.publisher.MonoFlattenIterable.subscribe(MonoFlattenIterable.java:101)
	at reactor.core.publisher.FluxDematerialize.subscribe(FluxDematerialize.java:39)
	at reactor.core.publisher.FluxDefer.subscribe(FluxDefer.java:54)
	at reactor.core.publisher.Flux.subscribe(Flux.java:7921)
	at reactor.core.publisher.Flux.subscribeWith(Flux.java:8085)
	at reactor.core.publisher.Flux.subscribe(Flux.java:7914)
	at reactor.core.publisher.Flux.subscribe(Flux.java:7878)
	at reactor.core.publisher.Flux.subscribe(Flux.java:7796)
	at org.springframework.cloud.gateway.filter.WeightCalculatorWebFilter.lambda$onApplicationEvent$0(WeightCalculatorWebFilter.java:133)
	at org.springframework.cloud.gateway.filter.WeightCalculatorWebFilter$$Lambda$898/1630968203.accept(Unknown Source)
	at org.springframework.beans.factory.ObjectProvider.ifAvailable(ObjectProvider.java:93)
	at org.springframework.cloud.gateway.filter.WeightCalculatorWebFilter.onApplicationEvent(WeightCalculatorWebFilter.java:133)
	at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172)
	at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165)
	at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139)
	at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:402)
	at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:359)
	at org.springframework.cloud.gateway.route.RouteRefreshListener.reset(RouteRefreshListener.java:68)
	at org.springframework.cloud.gateway.route.RouteRefreshListener.resetIfNeeded(RouteRefreshListener.java:63)
	at org.springframework.cloud.gateway.route.RouteRefreshListener.onApplicationEvent(RouteRefreshListener.java:57)
	at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172)
	at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165)
	at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139)
	at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:402)
	at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:359)
	at org.springframework.cloud.netflix.eureka.CloudEurekaClient.onCacheRefreshed(CloudEurekaClient.java:123)
	at com.netflix.discovery.DiscoveryClient.fetchRegistry(DiscoveryClient.java:999)
	at com.netflix.discovery.DiscoveryClient.refreshRegistry(DiscoveryClient.java:1497)
	at com.netflix.discovery.DiscoveryClient$CacheRefreshThread.run(DiscoveryClient.java:1464)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
2019-12-26 01:03:38,568 [INFO][fateway-web][com.netflix.discovery.shared.resolver.aws.ConfigClusterResolver 43][AsyncResolver-bootstrap-executor-0]dstTraceId:[] call [ConfigClusterResolver][getClusterEndpoints] Resolving eureka endpoints via configuration
2019-12-26 01:04:00,020 [ERROR][fateway-web][com.netflix.discovery.DiscoveryClient 1519][DiscoveryClient-CacheRefreshExecutor-0]dstTraceId:[] call [DiscoveryClient][refreshRegistry] Cannot fetch registry from server
reactor.core.Exceptions$ErrorCallbackNotImplemented: java.util.ConcurrentModificationException
Caused by: java.util.ConcurrentModificationException: null
	at java.util.LinkedHashMap$LinkedHashIterator.nextNode(LinkedHashMap.java:711)
	at java.util.LinkedHashMap$LinkedValueIterator.next(LinkedHashMap.java:739)
	at reactor.core.publisher.FluxIterable$IterableSubscription.poll(FluxIterable.java:389)
	at reactor.core.publisher.FluxFlatMap$FlatMapMain.drainLoop(FluxFlatMap.java:634)
	at reactor.core.publisher.FluxFlatMap$FlatMapMain.drain(FluxFlatMap.java:540)
	at reactor.core.publisher.FluxFlatMap$FlatMapInner.onSubscribe(FluxFlatMap.java:924)
	at reactor.core.publisher.FluxIterable.subscribe(FluxIterable.java:139)
	at reactor.core.publisher.FluxIterable.subscribe(FluxIterable.java:63)
	at reactor.core.publisher.Flux.subscribe(Flux.java:7921)
	at reactor.core.publisher.FluxFlatMap$FlatMapMain.onNext(FluxFlatMap.java:389)
	at reactor.core.publisher.FluxIterable$IterableSubscription.slowPath(FluxIterable.java:243)
	at reactor.core.publisher.FluxIterable$IterableSubscription.request(FluxIterable.java:201)
	at reactor.core.publisher.FluxFlatMap$FlatMapMain.onSubscribe(FluxFlatMap.java:335)
	at reactor.core.publisher.FluxIterable.subscribe(FluxIterable.java:139)
	at reactor.core.publisher.FluxIterable.subscribe(FluxIterable.java:63)
	at reactor.core.publisher.FluxFlatMap.subscribe(FluxFlatMap.java:97)
	at reactor.core.publisher.FluxMap.subscribe(FluxMap.java:62)
	at reactor.core.publisher.FluxMap.subscribe(FluxMap.java:62)
	at reactor.core.publisher.Flux.subscribe(Flux.java:7921)
	at reactor.core.publisher.FluxFlatMap$FlatMapMain.onNext(FluxFlatMap.java:389)
	at reactor.core.publisher.FluxIterable$IterableSubscription.slowPath(FluxIterable.java:243)
	at reactor.core.publisher.FluxIterable$IterableSubscription.request(FluxIterable.java:201)
	at reactor.core.publisher.FluxFlatMap$FlatMapMain.onSubscribe(FluxFlatMap.java:335)
	at reactor.core.publisher.FluxIterable.subscribe(FluxIterable.java:139)
	at reactor.core.publisher.FluxIterable.subscribe(FluxIterable.java:63)
	at reactor.core.publisher.FluxFlatMap.subscribe(FluxFlatMap.java:97)
	at reactor.core.publisher.MonoCollectList.subscribe(MonoCollectList.java:40)
	at reactor.core.publisher.MonoMapFuseable.subscribe(MonoMapFuseable.java:59)
	at reactor.core.publisher.MonoFlattenIterable.subscribe(MonoFlattenIterable.java:101)
	at reactor.core.publisher.FluxMaterialize.subscribe(FluxMaterialize.java:40)
	at reactor.core.publisher.MonoCollectList.subscribe(MonoCollectList.java:40)
	at reactor.core.publisher.MonoPeekFuseable.subscribe(MonoPeekFuseable.java:74)
	at reactor.core.publisher.MonoFlattenIterable.subscribe(MonoFlattenIterable.java:101)
	at reactor.core.publisher.FluxDematerialize.subscribe(FluxDematerialize.java:39)
	at reactor.core.publisher.FluxDefer.subscribe(FluxDefer.java:54)
	at reactor.core.publisher.Flux.subscribe(Flux.java:7921)
	at reactor.core.publisher.Flux.subscribeWith(Flux.java:8085)
	at reactor.core.publisher.Flux.subscribe(Flux.java:7914)
	at reactor.core.publisher.Flux.subscribe(Flux.java:7878)
	at reactor.core.publisher.Flux.subscribe(Flux.java:7796)
	at org.springframework.cloud.gateway.filter.WeightCalculatorWebFilter.lambda$onApplicationEvent$0(WeightCalculatorWebFilter.java:133)
	at org.springframework.cloud.gateway.filter.WeightCalculatorWebFilter$$Lambda$898/1630968203.accept(Unknown Source)
	at org.springframework.beans.factory.ObjectProvider.ifAvailable(ObjectProvider.java:93)
	at org.springframework.cloud.gateway.filter.WeightCalculatorWebFilter.onApplicationEvent(WeightCalculatorWebFilter.java:133)
	at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172)
	at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165)
	at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139)
	at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:402)
	at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:359)
	at org.springframework.cloud.gateway.route.RouteRefreshListener.reset(RouteRefreshListener.java:68)
	at org.springframework.cloud.gateway.route.RouteRefreshListener.resetIfNeeded(RouteRefreshListener.java:63)
	at org.springframework.cloud.gateway.route.RouteRefreshListener.onApplicationEvent(RouteRefreshListener.java:57)
	at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172)
	at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165)
	at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139)
	at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:402)
	at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:359)
	at org.springframework.cloud.netflix.eureka.CloudEurekaClient.onCacheRefreshed(CloudEurekaClient.java:123)
	at com.netflix.discovery.DiscoveryClient.fetchRegistry(DiscoveryClient.java:999)
	at com.netflix.discovery.DiscoveryClient.refreshRegistry(DiscoveryClient.java:1497)
	at com.netflix.discovery.DiscoveryClient$CacheRefreshThread.run(DiscoveryClient.java:1464)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
2019-12-26 01:04:30,024 [ERROR][fateway-web][com.netflix.discovery.DiscoveryClient 1519][DiscoveryClient-CacheRefreshExecutor-0]dstTraceId:[] call [DiscoveryClient][refreshRegistry] Cannot fetch registry from server
reactor.core.Exceptions$ErrorCallbackNotImplemented: java.util.ConcurrentModificationException
Caused by: java.util.ConcurrentModificationException: null
	at java.util.LinkedHashMap$LinkedHashIterator.nextNode(LinkedHashMap.java:711)
	at java.util.LinkedHashMap$LinkedValueIterator.next(LinkedHashMap.java:739)
	at reactor.core.publisher.FluxIterable$IterableSubscription.poll(FluxIterable.java:389)
	at reactor.core.publisher.FluxFlatMap$FlatMapMain.drainLoop(FluxFlatMap.java:634)
	at reactor.core.publisher.FluxFlatMap$FlatMapMain.drain(FluxFlatMap.java:540)
	at reactor.core.publisher.FluxFlatMap$FlatMapInner.onSubscribe(FluxFlatMap.java:924)
	at reactor.core.publisher.FluxIterable.subscribe(FluxIterable.java:139)
	at reactor.core.publisher.FluxIterable.subscribe(FluxIterable.java:63)
	at reactor.core.publisher.Flux.subscribe(Flux.java:7921)
	at reactor.core.publisher.FluxFlatMap$FlatMapMain.onNext(FluxFlatMap.java:389)
	at reactor.core.publisher.FluxIterable$IterableSubscription.slowPath(FluxIterable.java:243)
	at reactor.core.publisher.FluxIterable$IterableSubscription.request(FluxIterable.java:201)
	at reactor.core.publisher.FluxFlatMap$FlatMapMain.onSubscribe(FluxFlatMap.java:335)
	at reactor.core.publisher.FluxIterable.subscribe(FluxIterable.java:139)
	at reactor.core.publisher.FluxIterable.subscribe(FluxIterable.java:63)
	at reactor.core.publisher.FluxFlatMap.subscribe(FluxFlatMap.java:97)
	at reactor.core.publisher.FluxMap.subscribe(FluxMap.java:62)
	at reactor.core.publisher.FluxMap.subscribe(FluxMap.java:62)
	at reactor.core.publisher.Flux.subscribe(Flux.java:7921)
	at reactor.core.publisher.FluxFlatMap$FlatMapMain.onNext(FluxFlatMap.java:389)
	at reactor.core.publisher.FluxIterable$IterableSubscription.slowPath(FluxIterable.java:243)
	at reactor.core.publisher.FluxIterable$IterableSubscription.request(FluxIterable.java:201)
	at reactor.core.publisher.FluxFlatMap$FlatMapMain.onSubscribe(FluxFlatMap.java:335)
	at reactor.core.publisher.FluxIterable.subscribe(FluxIterable.java:139)
	at reactor.core.publisher.FluxIterable.subscribe(FluxIterable.java:63)
	at reactor.core.publisher.FluxFlatMap.subscribe(FluxFlatMap.java:97)
	at reactor.core.publisher.MonoCollectList.subscribe(MonoCollectList.java:40)
	at reactor.core.publisher.MonoMapFuseable.subscribe(MonoMapFuseable.java:59)
	at reactor.core.publisher.MonoFlattenIterable.subscribe(MonoFlattenIterable.java:101)
	at reactor.core.publisher.FluxMaterialize.subscribe(FluxMaterialize.java:40)
	at reactor.core.publisher.MonoCollectList.subscribe(MonoCollectList.java:40)
	at reactor.core.publisher.MonoPeekFuseable.subscribe(MonoPeekFuseable.java:74)
	at reactor.core.publisher.MonoFlattenIterable.subscribe(MonoFlattenIterable.java:101)
	at reactor.core.publisher.FluxDematerialize.subscribe(FluxDematerialize.java:39)
	at reactor.core.publisher.FluxDefer.subscribe(FluxDefer.java:54)
	at reactor.core.publisher.Flux.subscribe(Flux.java:7921)
	at reactor.core.publisher.Flux.subscribeWith(Flux.java:8085)
	at reactor.core.publisher.Flux.subscribe(Flux.java:7914)
	at reactor.core.publisher.Flux.subscribe(Flux.java:7878)
	at reactor.core.publisher.Flux.subscribe(Flux.java:7796)
	at org.springframework.cloud.gateway.filter.WeightCalculatorWebFilter.lambda$onApplicationEvent$0(WeightCalculatorWebFilter.java:133)
	at org.springframework.cloud.gateway.filter.WeightCalculatorWebFilter$$Lambda$898/1630968203.accept(Unknown Source)
	at org.springframework.beans.factory.ObjectProvider.ifAvailable(ObjectProvider.java:93)
	at org.springframework.cloud.gateway.filter.WeightCalculatorWebFilter.onApplicationEvent(WeightCalculatorWebFilter.java:133)
	at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172)
	at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165)
	at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139)
	at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:402)
	at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:359)
	at org.springframework.cloud.gateway.route.RouteRefreshListener.reset(RouteRefreshListener.java:68)
	at org.springframework.cloud.gateway.route.RouteRefreshListener.resetIfNeeded(RouteRefreshListener.java:63)
	at org.springframework.cloud.gateway.route.RouteRefreshListener.onApplicationEvent(RouteRefreshListener.java:57)
	at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172)
	at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165)
	at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139)
	at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:402)
	at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:359)
	at org.springframework.cloud.netflix.eureka.CloudEurekaClient.onCacheRefreshed(CloudEurekaClient.java:123)
	at com.netflix.discovery.DiscoveryClient.fetchRegistry(DiscoveryClient.java:999)
	at com.netflix.discovery.DiscoveryClient.refreshRegistry(DiscoveryClient.java:1497)
	at com.netflix.discovery.DiscoveryClient$CacheRefreshThread.run(DiscoveryClient.java:1464)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
2019-12-26 01:05:00,028 [ERROR][fateway-web][com.netflix.discovery.DiscoveryClient 1519][DiscoveryClient-CacheRefreshExecutor-0]dstTraceId:[] call [DiscoveryClient][refreshRegistry] Cannot fetch registry from server
reactor.core.Exceptions$ErrorCallbackNotImplemented: java.util.ConcurrentModificationException
Caused by: java.util.ConcurrentModificationException: null
	at java.util.LinkedHashMap$LinkedHashIterator.nextNode(LinkedHashMap.java:711)
	at java.util.LinkedHashMap$LinkedValueIterator.next(LinkedHashMap.java:739)
	at reactor.core.publisher.FluxIterable$IterableSubscription.poll(FluxIterable.java:389)
	at reactor.core.publisher.FluxFlatMap$FlatMapMain.drainLoop(FluxFlatMap.java:634)
	at reactor.core.publisher.FluxFlatMap$FlatMapMain.drain(FluxFlatMap.java:540)
	at reactor.core.publisher.FluxFlatMap$FlatMapInner.onSubscribe(FluxFlatMap.java:924)
	at reactor.core.publisher.FluxIterable.subscribe(FluxIterable.java:139)
	at reactor.core.publisher.FluxIterable.subscribe(FluxIterable.java:63)
	at reactor.core.publisher.Flux.subscribe(Flux.java:7921)
	at reactor.core.publisher.FluxFlatMap$FlatMapMain.onNext(FluxFlatMap.java:389)
	at reactor.core.publisher.FluxIterable$IterableSubscription.slowPath(FluxIterable.java:243)
	at reactor.core.publisher.FluxIterable$IterableSubscription.request(FluxIterable.java:201)
	at reactor.core.publisher.FluxFlatMap$FlatMapMain.onSubscribe(FluxFlatMap.java:335)
	at reactor.core.publisher.FluxIterable.subscribe(FluxIterable.java:139)
	at reactor.core.publisher.FluxIterable.subscribe(FluxIterable.java:63)
	at reactor.core.publisher.FluxFlatMap.subscribe(FluxFlatMap.java:97)
	at reactor.core.publisher.FluxMap.subscribe(FluxMap.java:62)
	at reactor.core.publisher.FluxMap.subscribe(FluxMap.java:62)
	at reactor.core.publisher.Flux.subscribe(Flux.java:7921)
	at reactor.core.publisher.FluxFlatMap$FlatMapMain.onNext(FluxFlatMap.java:389)
	at reactor.core.publisher.FluxIterable$IterableSubscription.slowPath(FluxIterable.java:243)
	at reactor.core.publisher.FluxIterable$IterableSubscription.request(FluxIterable.java:201)
	at reactor.core.publisher.FluxFlatMap$FlatMapMain.onSubscribe(FluxFlatMap.java:335)
	at reactor.core.publisher.FluxIterable.subscribe(FluxIterable.java:139)
	at reactor.core.publisher.FluxIterable.subscribe(FluxIterable.java:63)
	at reactor.core.publisher.FluxFlatMap.subscribe(FluxFlatMap.java:97)
	at reactor.core.publisher.MonoCollectList.subscribe(MonoCollectList.java:40)
	at reactor.core.publisher.MonoMapFuseable.subscribe(MonoMapFuseable.java:59)
	at reactor.core.publisher.MonoFlattenIterable.subscribe(MonoFlattenIterable.java:101)
	at reactor.core.publisher.FluxMaterialize.subscribe(FluxMaterialize.java:40)
	at reactor.core.publisher.MonoCollectList.subscribe(MonoCollectList.java:40)
	at reactor.core.publisher.MonoPeekFuseable.subscribe(MonoPeekFuseable.java:74)
	at reactor.core.publisher.MonoFlattenIterable.subscribe(MonoFlattenIterable.java:101)
	at reactor.core.publisher.FluxDematerialize.subscribe(FluxDematerialize.java:39)
	at reactor.core.publisher.FluxDefer.subscribe(FluxDefer.java:54)
	at reactor.core.publisher.Flux.subscribe(Flux.java:7921)
	at reactor.core.publisher.Flux.subscribeWith(Flux.java:8085)
	at reactor.core.publisher.Flux.subscribe(Flux.java:7914)
	at reactor.core.publisher.Flux.subscribe(Flux.java:7878)
	at reactor.core.publisher.Flux.subscribe(Flux.java:7796)
	at org.springframework.cloud.gateway.filter.WeightCalculatorWebFilter.lambda$onApplicationEvent$0(WeightCalculatorWebFilter.java:133)
	at org.springframework.cloud.gateway.filter.WeightCalculatorWebFilter$$Lambda$898/1630968203.accept(Unknown Source)
	at org.springframework.beans.factory.ObjectProvider.ifAvailable(ObjectProvider.java:93)
	at org.springframework.cloud.gateway.filter.WeightCalculatorWebFilter.onApplicationEvent(WeightCalculatorWebFilter.java:133)
	at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172)
	at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165)
	at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139)
	at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:402)
	at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:359)
	at org.springframework.cloud.gateway.route.RouteRefreshListener.reset(RouteRefreshListener.java:68)
	at org.springframework.cloud.gateway.route.RouteRefreshListener.resetIfNeeded(RouteRefreshListener.java:63)
	at org.springframework.cloud.gateway.route.RouteRefreshListener.onApplicationEvent(RouteRefreshListener.java:57)
	at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172)
	at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165)
	at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139)
	at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:402)
	at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:359)
	at org.springframework.cloud.netflix.eureka.CloudEurekaClient.onCacheRefreshed(CloudEurekaClient.java:123)
	at com.netflix.discovery.DiscoveryClient.fetchRegistry(DiscoveryClient.java:999)
	at com.netflix.discovery.DiscoveryClient.refreshRegistry(DiscoveryClient.java:1497)
	at com.netflix.discovery.DiscoveryClient$CacheRefreshThread.run(DiscoveryClient.java:1464)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
2019-12-26 01:05:30,031 [ERROR][fateway-web][com.netflix.discovery.DiscoveryClient 1519][DiscoveryClient-CacheRefreshExecutor-0]dstTraceId:[] call [DiscoveryClient][refreshRegistry] Cannot fetch registry from server
reactor.core.Exceptions$ErrorCallbackNotImplemented: java.util.ConcurrentModificationException
Caused by: java.util.ConcurrentModificationException: null
	at java.util.LinkedHashMap$LinkedHashIterator.nextNode(LinkedHashMap.java:711)
	at java.util.LinkedHashMap$LinkedValueIterator.next(LinkedHashMap.java:739)
	at reactor.core.publisher.FluxIterable$IterableSubscription.poll(FluxIterable.java:389)
	at reactor.core.publisher.FluxFlatMap$FlatMapMain.drainLoop(FluxFlatMap.java:634)
	at reactor.core.publisher.FluxFlatMap$FlatMapMain.drain(FluxFlatMap.java:540)
	at reactor.core.publisher.FluxFlatMap$FlatMapInner.onSubscribe(FluxFlatMap.java:924)
	at reactor.core.publisher.FluxIterable.subscribe(FluxIterable.java:139)
	at reactor.core.publisher.FluxIterable.subscribe(FluxIterable.java:63)
	at reactor.core.publisher.Flux.subscribe(Flux.java:7921)
	at reactor.core.publisher.FluxFlatMap$FlatMapMain.onNext(FluxFlatMap.java:389)
	at reactor.core.publisher.FluxIterable$IterableSubscription.slowPath(FluxIterable.java:243)
	at reactor.core.publisher.FluxIterable$IterableSubscription.request(FluxIterable.java:201)
	at reactor.core.publisher.FluxFlatMap$FlatMapMain.onSubscribe(FluxFlatMap.java:335)
	at reactor.core.publisher.FluxIterable.subscribe(FluxIterable.java:139)
	at reactor.core.publisher.FluxIterable.subscribe(FluxIterable.java:63)
	at reactor.core.publisher.FluxFlatMap.subscribe(FluxFlatMap.java:97)
	at reactor.core.publisher.FluxMap.subscribe(FluxMap.java:62)
	at reactor.core.publisher.FluxMap.subscribe(FluxMap.java:62)
	at reactor.core.publisher.Flux.subscribe(Flux.java:7921)
	at reactor.core.publisher.FluxFlatMap$FlatMapMain.onNext(FluxFlatMap.java:389)
	at reactor.core.publisher.FluxIterable$IterableSubscription.slowPath(FluxIterable.java:243)
	at reactor.core.publisher.FluxIterable$IterableSubscription.request(FluxIterable.java:201)
	at reactor.core.publisher.FluxFlatMap$FlatMapMain.onSubscribe(FluxFlatMap.java:335)
	at reactor.core.publisher.FluxIterable.subscribe(FluxIterable.java:139)
	at reactor.core.publisher.FluxIterable.subscribe(FluxIterable.java:63)
	at reactor.core.publisher.FluxFlatMap.subscribe(FluxFlatMap.java:97)
	at reactor.core.publisher.MonoCollectList.subscribe(MonoCollectList.java:40)
	at reactor.core.publisher.MonoMapFuseable.subscribe(MonoMapFuseable.java:59)
	at reactor.core.publisher.MonoFlattenIterable.subscribe(MonoFlattenIterable.java:101)
	at reactor.core.publisher.FluxMaterialize.subscribe(FluxMaterialize.java:40)
	at reactor.core.publisher.MonoCollectList.subscribe(MonoCollectList.java:40)
	at reactor.core.publisher.MonoPeekFuseable.subscribe(MonoPeekFuseable.java:74)
	at reactor.core.publisher.MonoFlattenIterable.subscribe(MonoFlattenIterable.java:101)
	at reactor.core.publisher.FluxDematerialize.subscribe(FluxDematerialize.java:39)
	at reactor.core.publisher.FluxDefer.subscribe(FluxDefer.java:54)
	at reactor.core.publisher.Flux.subscribe(Flux.java:7921)
	at reactor.core.publisher.Flux.subscribeWith(Flux.java:8085)
	at reactor.core.publisher.Flux.subscribe(Flux.java:7914)
	at reactor.core.publisher.Flux.subscribe(Flux.java:7878)
	at reactor.core.publisher.Flux.subscribe(Flux.java:7796)
	at org.springframework.cloud.gateway.filter.WeightCalculatorWebFilter.lambda$onApplicationEvent$0(WeightCalculatorWebFilter.java:133)
	at org.springframework.cloud.gateway.filter.WeightCalculatorWebFilter$$Lambda$898/1630968203.accept(Unknown Source)
	at org.springframework.beans.factory.ObjectProvider.ifAvailable(ObjectProvider.java:93)
	at org.springframework.cloud.gateway.filter.WeightCalculatorWebFilter.onApplicationEvent(WeightCalculatorWebFilter.java:133)
	at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172)
	at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165)
	at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139)
	at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:402)
	at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:359)
	at org.springframework.cloud.gateway.route.RouteRefreshListener.reset(RouteRefreshListener.java:68)
	at org.springframework.cloud.gateway.route.RouteRefreshListener.resetIfNeeded(RouteRefreshListener.java:63)
	at org.springframework.cloud.gateway.route.RouteRefreshListener.onApplicationEvent(RouteRefreshListener.java:57)
	at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172)
	at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165)
	at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139)
	at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:402)
	at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:359)
	at org.springframework.cloud.netflix.eureka.CloudEurekaClient.onCacheRefreshed(CloudEurekaClient.java:123)
	at com.netflix.discovery.DiscoveryClient.fetchRegistry(DiscoveryClient.java:999)
	at com.netflix.discovery.DiscoveryClient.refreshRegistry(DiscoveryClient.java:1497)
	at com.netflix.discovery.DiscoveryClient$CacheRefreshThread.run(DiscoveryClient.java:1464)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)

Please learn how to properly format code and logs.
This was fixed by c773e05787f38b77c3dd64ef3ae62c250d3e9cf4 & 6855e15cb37b6eadeae1691e864144b0a7191185

authors: marskbt spencergibb


text:
The org.springframework.web.reactive.socket.client.ReactorNettyWebSocketClient.setHandlePing(Z)V did not exist when starting gateway

hi，I tried starting gateway application but failed when using the spring cloud Hoxton.SR5 and the spring boot 2.2.4 release.
Then I started gateway successfully using the spring boot 2.2.5 release instead of 2.2.4 release.
It seems like that version not match. But it is recommended by cloud.spring.io
The error message is as follows:
An attempt was made to call a method that does not exist. The attempt was made from the following location:
org.springframework.cloud.gateway.config.GatewayAutoConfiguration$NettyConfiguration.reactorNettyWebSocketClient(GatewayAutoConfiguration.java:748)
The following method did not exist:
org.springframework.web.reactive.socket.client.ReactorNettyWebSocketClient.setHandlePing(Z)V
The method's class, org.springframework.web.reactive.socket.client.ReactorNettyWebSocketClient, is available from the following locations:
jar:file:/org/springframework/spring-webflux/5.2.3.RELEASE/spring-webflux-5.2.3.RELEASE.jar!/org/springframework/web/reactive/socket/client/ReactorNettyWebSocketClient.class
It was loaded from the following location:
file:/org/springframework/spring-webflux/5.2.3.RELEASE/spring-webflux-5.2.3.RELEASE.jar

Spring Boot 2.2.9 is the latest release, we suggest you use that for now.  Or you can try 2.3.0.
You should also use the latest service release of Hoton.SR6.

use this
setHandPing() not in version 5.2.3,in version 5.2.4

    <dependency>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-starter-gateway</artifactId>
        <version>2.2.3.RELEASE</version>
        <exclusions>
            <exclusion>
                    <groupId>org.springframework</groupId>
                    <artifactId>spring-webflux</artifactId>
            </exclusion>
        </exclusions>
    </dependency>
    <!-- https://mvnrepository.com/artifact/org.springframework/spring-webflux -->
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-webflux</artifactId>
        <version>5.2.4.RELEASE</version>
    </dependency>

me too,why

mismatched versions of boot and cloud

resolved..thanks

解决..谢谢

使用此
setHandPing（）不在版本5.2.3中，在版本5.2.4中
    <dependency>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-starter-gateway</artifactId>
        <version>2.2.3.RELEASE</version>
        <exclusions>
            <exclusion>
                    <groupId>org.springframework</groupId>
                    <artifactId>spring-webflux</artifactId>
            </exclusion>
        </exclusions>
    </dependency>
    <!-- https://mvnrepository.com/artifact/org.springframework/spring-webflux -->
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-webflux</artifactId>
        <version>5.2.4.RELEASE</version>
    </dependency>

使用此
setHandPing（）不在版本5.2.3中，在版本5.2.4中
    <dependency>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-starter-gateway</artifactId>
        <version>2.2.3.RELEASE</version>
        <exclusions>
            <exclusion>
                    <groupId>org.springframework</groupId>
                    <artifactId>spring-webflux</artifactId>
            </exclusion>
        </exclusions>
    </dependency>
    <!-- https://mvnrepository.com/artifact/org.springframework/spring-webflux -->
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-webflux</artifactId>
        <version>5.2.4.RELEASE</version>
    </dependency>

thanks

source: gharchive/issue

authors: KangLR ryanjbaxter spencergibb wjgdhj znh0503

repo: spring-cloud/spring-cloud-gateway

license_type: permissive

license_source: github-api


text:
Redis Rate Limiter might not work when configure with multiple routes

Version: 3.0.2
I'm now trying to configure RequestRateLimiterGatewayFilterFactory with RedisRateLimiter for my services.
But for different endpoints, we want to set different replenishRate and burstCapacity.
Then I looked into the implementation, I found it might not work for multiple routes.
For example, with the following route configuration, route-1 and route-2 use RedisRateLimiter but with different replenishRate and burstCapacity :
spring:
  cloud:
    gateway:
      routes:
      - id: route-1
        uri: https://example1.org
        filters:
        - name: RequestRateLimiter
          args:
            redis-rate-limiter.replenishRate: 1
            redis-rate-limiter.burstCapacity: 2
            redis-rate-limiter.requestedTokens: 1
      - id: route-2
        uri: https://example2.org
        filters:
        - name: RequestRateLimiter
          args:
            redis-rate-limiter.replenishRate: 10
            redis-rate-limiter.burstCapacity: 20
            redis-rate-limiter.requestedTokens: 1

Assuming we are using the default KeyResolver, which using the principal to identify the request.
I found this part of code that get keys of Redis.
It only uses id (principal in this case) to form the Redis key.
Then, for  both route-1 and route-2, RedisRateLimiter will get request_rate_limiter.{id}.tokens from Redis to calculate (here)
Seems the tokens will be messed up when the same principal hitting both route-1 and route-2 endpoints.
My questions are:

Is this behavior by design?
If no, maybe it should be fixed to use both id (provided by KeyResolver) and Route ID? like  "request_rate_limiter.{user1_route1}.tokens
If yes, do you have advice on how we handle the situation when we want to configure multiple routes with RedisRateLimiter?
(maybe a custom KeyResolver to resolve both principal and routeid?)

I found this problem, too。
I've customized RedisRateLimiter class。Overriding the isAllowed method，like this:

i got this issue too, i used example from documentation https://docs.spring.io/spring-cloud-gateway/docs/3.0.3/reference/html/#the-redis-ratelimiter
Can you please fix documentation (add routeId from exchange attributes to queryParam value) to prevent further errors in future?

@spencergibb Why is this marked as enhancement -- it looks like critical bug as i see.
I may follow a PR to fix this, if the proposal above about adding a routeId into redis key meets the needs.

@spencergibb Why is this marked as enhancement -- it looks like critical bug as i see.
I may follow a PR to fix this, if the proposal above about adding a routeId into redis key meets the needs.

@spencergibb
Followed with a PR:
https://github.com/spring-cloud/spring-cloud-gateway/pull/2517

@spencergibb Followed with a PR: #2517

This seems to be because we use the same KeyResolver for different buckets.
But we can't directly add routeId to all current-limiting keys, because in some scenarios, users will want to use different APIs on the same client Use shared quotas and weights are different for each API.
If we force each key to be associated with a routeId, then the user must carefully evaluate the number of possible calls to each API, and require a certain buffer space to ensure that he does not exceed the quota allocated to the client.

@spencergibb @muchnik
The problem seems to be because we have buckets configured for each API, but we don't know the relationship between these buckets (if they should be shared). I have two different solutions for this problem:

As @muchnik  said, we isolate the RateLimiters of all routeIds, and mark in the document that the current-limiting data between all routeIds is not shared with each other (this does not seem very friendly)
Based on the isolation of all routeIds, we provide an explicit mechanism for sharing buckets

spring:
  cloud:
    gateway:
      filter:
        request-rate-limiter:
          buckets:
            foo:
              redis-rate-limiter.replenishRate: 10
              redis-rate-limiter.burstCapacity: 100
            bar:
              redis-rate-limiter.replenishRate: 10
              redis-rate-limiter.burstCapacity: 100
      routes:
        - id: route-1
          uri: https://example1.org
          filters:
            - name: RequestRateLimiter
              args:
                redis-rate-limiter.requestedTokens: 1
                bucket: foo
        - id: route-2
          uri: https://example2.org
          filters:
            - name: RequestRateLimiter
              args:
                redis-rate-limiter.requestedTokens: 1
                bucket: bar

I'd thinking about @jizhuozhi p.2, but maybe just introduce unique flag argument?
So if rate limiter should not share same bucket across routes -- we just set true and using routeId as part of bucket key, false (as default) if bucket key just using keyResolver strategy.
spring:
  cloud:
    gateway:
      routes:
      - id: requestratelimiter_route
        uri: https://example.org
        filters:
        - name: RequestRateLimiter
          args:
            redis-rate-limiter.replenishRate: 10
            redis-rate-limiter.burstCapacity: 20
            redis-rate-limiter.requestedTokens: 1
            redis-rate-limiter.uniqueBucketPerRoute: true

I'd thinking about @jizhuozhi p.2, but maybe just introduce unique flag argument? So if rate limiter should not share same bucket across routes -- we just set true and using routeId as part of bucket key, false (as default) if bucket key just using keyResolver strategy.
spring:
  cloud:
    gateway:
      routes:
      - id: requestratelimiter_route
        uri: https://example.org
        filters:
        - name: RequestRateLimiter
          args:
            redis-rate-limiter.replenishRate: 10
            redis-rate-limiter.burstCapacity: 20
            redis-rate-limiter.requestedTokens: 1
            redis-rate-limiter.uniqueBucketPerRoute: true

Second aproach is to use additional KeyResolver interface method that accepts routeId as second argument, so users can implement it if they need to differentiate between routes (that aproach i like more).

@muchnik But at this time how could we group the routes (A, B, C, D) to (A, B) and (C, D)?

@muchnik And also, this problem is not just RedisRateLimiter, we need to have an explicit isolation mechanism for all RequestRateLimiter services (including user-defined RateLimiter).
spring:
  cloud:
    gateway:
      routes:
      - id: requestratelimiter_route
        uri: https://example.org
        filters:
        - name: RequestRateLimiter
          args:
            redis-rate-limiter.replenishRate: 10
            redis-rate-limiter.burstCapacity: 20
            redis-rate-limiter.requestedTokens: 1
            isolated: true # In this condition, we will append the routeId after key

Closing in favor of #2517

authors: Ivanbmstu jizhuozhi muchnik phisixersai sj1231984 spencergibb


text:
Prevent Content-Length and Host headers from being copied by default

This PR introduces an additional property to skip copying certain headers from the incoming request.
Because the use case is different, it's bad to force users to add headers like Host and Content-Length to the list of sensitive headers when they need to override that (e.g. for adding smth like an X-APIKey header), so having a separate configuration setting for this is preferable.
Fixes gh-3154

I've added back removed/renamed fields and methods as we can't have breaking changes outside of a major. See b30188e08acc944caea6b2cd24d0f56d5b4bb831

Hello @spencergibb @jkuipers,
Just wanted to let you know that a breaking change still was introduced here. "Host" and "content-length" headers were not treated in any special way before those two commits and now they are excluded by default. Which results in a failure of course if someone relies on the "host" header being set for example.

Hello @spencergibb @jkuipers,
Just wanted to let you know that a breaking change still was introduced here. "Host" and "content-length" headers were not treated in any special way before those two commits and now they are excluded by default. Which results in a failure of course if someone relies on the "host" header being set for example.

The RestTemplate should set those values itself to the values appropriate for its own request. It makes no sense to copy these headers from the original request, since they can/will be wrong (host is almost always wrong, the content-length case is described in this issue in detail).
This is indeed different from the old behavior, but the old behavior wasn’t a feature but a bug as far as in concerned.

source: gharchive/pull-request

authors: artemkutishevsky jkuipers spencergibb


text:
Zuul routing to blank url

I am trying to route requests to feign client, below is my zuul configuration.
zuul:
  routes:
    helloclient: /test/**

http://localhost:8765/test - POST with parameter name=test
i was getting 405 errordue to URL. missing URI, i think the below lines are causing the issue.
In RibbonRoutingFilter class
String uri = request.getRequestURI(); // -- is returning "/test"
		if (context.get("requestURI") != null) {  // -- is true as it is blank
			uri = (String) context.get("requestURI"); //-- resetting the uri to blank
		}

either i am missing some configuration so the context.get("requestURI") is blank or the above code is missing blank check.

did you not complete your report?

Sorry, yes i completed the report, let me know if i missed any configuration

Blank is allowed as a URI path, and I think that's the correct value in your case (you sent a request to /test and /test is the route prefix, which is stripped by default). I'm a bit confused about what you mean by "route requests to a feign client" since this is a gateway (serverside) feature. What actually happened when the backend request was sent, and why do you think that it's wrong (stack trace maybe)?
P.S. If you don't want the prefix to be stripped to have to say so in the route spec.

I think the use case that i am testing is a weird one, i am not sure if it is a valid one.
I have an application helloclient1 with url http://localhost:8886/test1
another application helloclient2 with url http://localhost:8886/test2
i am trying to set the routes as
zuul:
routes:
helloclient1: /test1/**
helloclient2: /test2/**
if i do this , /test1 and /test2 are replaced with blank.
i am not sure if i can do the below.
zuul:
routes:
helloclient1: /**
helloclient2: /**
BTW, i tested with lot of other use cases and all of them are working fine.

One more thing, if i use 1.0.0.RC2 and if i do not have eureka URL configuration with credentials, i am not getting any error and it was not able to find the helloclient1, even if i add the URL i do not see any change, may be i am missing something here, i need to do little more debugging here.
where as if i use 1.0.0-BUILD-SNAPSHOT , i am getting 401 error as it is by default trying to connect to eureka instance, after adding the credentials in the URL it is working fine.i am not sure why it is not happening for 1.0.0.RC2.

I'm not quite sure I follow (those 2 clients have the same host and port, are they 1 client). Try
zuul:
  routes:
    helloclient1:
      serviceId: helloclient
      path: /test1/**
      stripPrefix: false

Or replace the serviceId with url if you want the physical URL.

It worked after using stripPrefix option, Thanks for the help.

authors: ctatineni dsyer spencergibb

repo: spring-cloud/spring-cloud-netflix

license_source: bigquery


text:
GH1504: use com.netflix.loadbalancer.DummyPing instead of NoopPing

See https://github.com/spring-cloud/spring-cloud-netflix/issues/1504

Current coverage is 74.38% (diff: 100%)

Merging #1525 into master will increase coverage by 0.01%

@@             master      #1525   diff @@
==========================================
  Files           191        191
  Lines          5907       5907
  Methods           0          0
  Messages          0          0
  Branches        885        885
==========================================
+ Hits           4393       4394     +1
  Misses         1195       1195
+ Partials        319        318     -1

Powered by Codecov. Last update ac3401b...a965b9a

authors: brenuart codecov-io


text:
VaultConfigurer not working with latest SpringBoot 3.2.x and Spring Cloud 2023.0.x

Describe the bug
Context - VaultConfigurer has been working perfectly for us with bootstrap.yml and the deprecated bootstrap way.
We want to migrate to the new ConfigData API but are struggling to correctly configure the SecretBackends with all the other changes happening around migrating BootstrapConfiguration from spring.factories to org.springframework.boot.autoconfigure.AutoConfiguration.imports (from Spring release notes) .
I have spent the last few days going through various Spring docs, old issues in this repo, StackOverFlow and everything that I could find, but can't make it work. The VaultConfigurer is not updating the backend.
From the logs ->

Key constraint - we don't want to change the default way how the SpringBootApplication is started. So, this suggestion  doesn't work for us.
Sample
Here's a minimal, reproducible example with just one small commit https://github.com/raj-saxena/vault-configurer/commit/6c3aeef37b102a4ba9da6cf795ebf38ed69f3f87 over Spring Initializer code.
Expectation
secret/my-DIFFERENT-application is called instead of the default secret/my-app/dev
A working example can definitely help everyone.
Can you tell us what we might be doing wrong?

@mp911de Any suggestions Mark?

With the ConfigData API, the lifecycle is different. When the configuration is parsed, beans are not yet initialized because the configuration is required to configure the bean container.
Instead, you can register a BootstrapRegistryInitializer.
Check out the documentation on Customize which secret backends to expose as PropertySource and let me know whether that helps or whether you need assistance to connect the dots.

You have four options:

Instead of using VaultBootstrapper.fromConfigurer, register your own BootstrapRegistryInitializer that registers. I think you should be able to obtain VaultProperties from the InstanceSupplier.context. spring.application.name is read into VaultProperties if spring.cloud.vault.application-name is not set.
Create a new StandardEnvironment to read system properties and Env variables
Read the properties file yourself
Register a ConfigDataLoader and VaultConfigDataLocationResolver yourself to capture the Binder from VaultConfigDataLocationResolver

None is ideal. However, the config data processing is a very early-stage activity.
Let me know whether you require further assistance.

I tried the 1st option and I was able to make it work as per my needs🎉.
I have added a final commit of what I did, along with some cleanup. I'll leave the repo for reference in case it helps someone else.
Thanks a lot for your help again Mark! :)

repo: spring-cloud/spring-cloud-vault


text:
Update Spring Boot to the latest version

Update the guide to use the most recent Spring Boot version.
Files that require changes are:
initial/build.gradle
initial/pom.xml
complete/build.gradle
complete/pom.xml

It seems that RouteLocator is removed!

Hi @ali-so. Based on the time of your content (that is, after the Boot 3.2 release in November 2023), the guide was likely asking you to pull in the wrong dependency. Our Guide asked the user to start a new project on Spring Initializr by pulling in Gateway. That dependency now pulls in spring-cloud-starter-gateway-mvc. This guide was written for the reactive version of Gateway, specifically the dependency spring-cloud-starter-gateway is required (no -mvc). You can preserve the previous functionality by specifying Reactive Gateway in the dependency list on Spring Initializr. Recent PRs #22 and #23 should address this issue going forward. If you feel there is still an issue with the guide please open a new issue.
Regarding the initial issue, I'm closing this issue in favor of a new way to track dependency updates on a higher level.

authors: ali-so robertmcnees

repo: spring-guides/gs-gateway


text:
Review http and https related hints

@NativeHint(options = "--enable-url-protocols=http,https")

Ideally, they'd be enabled by default for everything, always. I just ran Liquibase (with no HTTP server) and it needed HTTP for schema resolution.

I don't think we should add that by default, especially https which is impacting significantly the memory footprint, but we can add flags with the right granular hints. We could decide to add https by default for WebClient and RestTemplate. For server, I am not sure since servers can be behind an http server which will take car of https.

authors: joshlong sdeleuze


text:
Infinite loop if import mybatis-spring-boot-starter

if there is depencity mybatis-spring-boot-starter and by running mvn -Pnative package, there seems infinite loop and result in StackOverflowError
Exception in thread "main" java.lang.StackOverflowError
        at java.base/java.lang.AbstractStringBuilder.ensureCapacityInternal(AbstractStringBuilder.java:173)
        at java.base/java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:538)
        at java.base/java.lang.StringBuilder.append(StringBuilder.java:174)
        at java.base/java.net.URLStreamHandler.parseURL(URLStreamHandler.java:256)
        at java.base/sun.net.www.protocol.file.Handler.parseURL(Handler.java:67)
        at java.base/java.net.URL.<init>(URL.java:674)
        at java.base/java.net.URL.<init>(URL.java:541)
        at java.base/jdk.internal.loader.URLClassPath$FileLoader.getResource(URLClassPath.java:1233)        at java.base/jdk.internal.loader.URLClassPath.getResource(URLClassPath.java:315)
        at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:695)
        at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:621)
        at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:579)
        at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
        at java.base/java.lang.Class.forName0(Native Method)
        at java.base/java.lang.Class.forName(Class.java:398)
        at java.desktop/com.sun.beans.finder.ClassFinder.findClass(ClassFinder.java:103)
        at java.desktop/java.beans.Introspector.findCustomizerClass(Introspector.java:1142)
        at java.desktop/java.beans.Introspector.getTargetBeanDescriptor(Introspector.java:1136)
        at java.desktop/java.beans.Introspector.getBeanInfo(Introspector.java:461)
        at java.desktop/java.beans.Introspector.getBeanInfo(Introspector.java:295)
        at java.desktop/java.beans.Introspector.getBeanInfo(Introspector.java:237)
        at org.springframework.boot.context.properties.ConfigurationPropertiesNativeConfigurationProcessor$TypeProcessor.getBeanInfo(ConfigurationPropertiesNativeConfigurationProcessor.java:225)
        at org.springframework.boot.context.properties.ConfigurationPropertiesNativeConfigurationProcessor$TypeProcessor.<init>(ConfigurationPropertiesNativeConfigurationProcessor.java:90)
        at org.springframework.boot.context.properties.ConfigurationPropertiesNativeConfigurationProcessor$TypeProcessor.process(ConfigurationPropertiesNativeConfigurationProcessor.java:94)
        at org.springframework.boot.context.properties.ConfigurationPropertiesNativeConfigurationProcessor$TypeProcessor.handleJavaBeanProperties(ConfigurationPropertiesNativeConfigurationProcessor.java:162)
        at org.springframework.boot.context.properties.ConfigurationPropertiesNativeConfigurationProcessor$TypeProcessor.process(ConfigurationPropertiesNativeConfigurationProcessor.java:112)
        at org.springframework.boot.context.properties.ConfigurationPropertiesNativeConfigurationProcessor$TypeProcessor.process(ConfigurationPropertiesNativeConfigurationProcessor.java:94)
        at org.springframework.boot.context.properties.ConfigurationPropertiesNativeConfigurationProcessor$TypeProcessor.handleJavaBeanProperties(ConfigurationPropertiesNativeConfigurationProcessor.java:159)
        at org.springframework.boot.context.properties.ConfigurationPropertiesNativeConfigurationProcessor$TypeProcessor.process(ConfigurationPropertiesNativeConfigurationProcessor.java:112)
        at org.springframework.boot.context.properties.ConfigurationPropertiesNativeConfigurationProcessor$TypeProcessor.process(ConfigurationPropertiesNativeConfigurationProcessor.java:94)
        at org.springframework.boot.context.properties.ConfigurationPropertiesNativeConfigurationProcessor$TypeProcessor.handleJavaBeanProperties(ConfigurationPropertiesNativeConfigurationProcessor.java:162)
        at org.springframework.boot.context.properties.ConfigurationPropertiesNativeConfigurationProcessor$TypeProcessor.process(ConfigurationPropertiesNativeConfigurationProcessor.java:112)
        at org.springframework.boot.context.properties.ConfigurationPropertiesNativeConfigurationProcessor$TypeProcessor.process(ConfigurationPropertiesNativeConfigurationProcessor.java:94)
        at org.springframework.boot.context.properties.ConfigurationPropertiesNativeConfigurationProcessor$TypeProcessor.handleJavaBeanProperties(ConfigurationPropertiesNativeConfigurationProcessor.java:159)
        at org.springframework.boot.context.properties.ConfigurationPropertiesNativeConfigurationProcessor$TypeProcessor.process(ConfigurationPropertiesNativeConfigurationProcessor.java:112)
        at org.springframework.boot.context.properties.ConfigurationPropertiesNativeConfigurationProcessor$TypeProcessor.process(ConfigurationPropertiesNativeConfigurationProcessor.java:94)
        at org.springframework.boot.context.properties.ConfigurationPropertiesNativeConfigurationProcessor$TypeProcessor.handleJavaBeanProperties(ConfigurationPropertiesNativeConfigurationProcessor.java:162)
        at org.springframework.boot.context.properties.ConfigurationPropertiesNativeConfigurationProcessor$TypeProcessor.process(ConfigurationPropertiesNativeConfigurationProcessor.java:112)
        at org.springframework.boot.context.properties.ConfigurationPropertiesNativeConfigurationProcessor$TypeProcessor.process(ConfigurationPropertiesNativeConfigurationProcessor.java:94)
        at org.springframework.boot.context.properties.ConfigurationPropertiesNativeConfigurationProcessor$TypeProcessor.handleJavaBeanProperties(ConfigurationPropertiesNativeConfigurationProcessor.java:159)
        at org.springframework.boot.context.properties.ConfigurationPropertiesNativeConfigurationProcessor$TypeProcessor.process(ConfigurationPropertiesNativeConfigurationProcessor.java:112)
        at org.springframework.boot.context.properties.ConfigurationPropertiesNativeConfigurationProcessor$TypeProcessor.process(ConfigurationPropertiesNativeConfigurationProcessor.java:94)
        at org.springframework.boot.context.properties.ConfigurationPropertiesNativeConfigurationProcessor$TypeProcessor.handleJavaBeanProperties(ConfigurationPropertiesNativeConfigurationProcessor.java:162)
        at org.springframework.boot.context.properties.ConfigurationPropertiesNativeConfigurationProcessor$TypeProcessor.process(ConfigurationPropertiesNativeConfigurationProcessor.java:112)
        at org.springframework.boot.context.properties.ConfigurationPropertiesNativeConfigurationProcessor$TypeProcessor.process(ConfigurationPropertiesNativeConfigurationProcessor.java:94)
        at org.springframework.boot.context.properties.ConfigurationPropertiesNativeConfigurationProcessor$TypeProcessor.handleJavaBeanProperties(ConfigurationPropertiesNativeConfigurationProcessor.java:159)
        at org.springframework.boot.context.properties.ConfigurationPropertiesNativeConfigurationProcessor$TypeProcessor.process(ConfigurationPropertiesNativeConfigurationProcessor.java:112)
        ... (keeping repeat)
[ERROR]
org.apache.maven.plugin.MojoExecutionException: Could not exec java
    at org.springframework.aot.maven.AbstractBootstrapMojo.forkJvm (AbstractBootstrapMojo.java:187)
    at org.springframework.aot.maven.TestGenerateMojo.execute (TestGenerateMojo.java:131)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:972)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:196)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:566)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: org.apache.maven.plugin.MojoExecutionException: Bootstrap code generator finished with exit code: 1
    at org.springframework.aot.maven.AbstractBootstrapMojo.forkJvm (AbstractBootstrapMojo.java:184)
    at org.springframework.aot.maven.TestGenerateMojo.execute (TestGenerateMojo.java:131)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:972)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:196)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:566)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)

The methods keep recursing seem like:
        at org.springframework.boot.context.properties.ConfigurationPropertiesNativeConfigurationProcessor$TypeProcessor.process(ConfigurationPropertiesNativeConfigurationProcessor.java:94)
        at org.springframework.boot.context.properties.ConfigurationPropertiesNativeConfigurationProcessor$TypeProcessor.handleJavaBeanProperties(ConfigurationPropertiesNativeConfigurationProcessor.java:162)
        at org.springframework.boot.context.properties.ConfigurationPropertiesNativeConfigurationProcessor$TypeProcessor.process(ConfigurationPropertiesNativeConfigurationProcessor.java:112)
        at org.springframework.boot.context.properties.ConfigurationPropertiesNativeConfigurationProcessor$TypeProcessor.process(ConfigurationPropertiesNativeConfigurationProcessor.java:94)
        at org.springframework.boot.context.properties.ConfigurationPropertiesNativeConfigurationProcessor$TypeProcessor.handleJavaBeanProperties(ConfigurationPropertiesNativeConfigurationProcessor.java:159)
        at org.springframework.boot.context.properties.ConfigurationPropertiesNativeConfigurationProcessor$TypeProcessor.process(ConfigurationPropertiesNativeConfigurationProcessor.java:112)

This is a demo I make which can reproduce the error
demo.zip

Closing in favor of PR #1420

authors: XKTZ snicoll


text:
JAAS Configuration overwrites Configurations created by other libraries

Back port of issue #2713

Closed by 138cf1576

repo: spring-projects/spring-kafka


text:
Custom TokenEnhancer does not get called when using JdbcTokenStore, but works when using InMemoryTokenStore

We are using a custom TokenEnhancer to add additional properties to our /token response.  It worked as intended when we used InMemoryTokenStore.  But when we switched to JdbcTokenStore, our custom enhancer stopped getting called.  Very strange.
Another side-effect I noticed when using JdbcTokenStore is that the JwtAccessTokenConverter is no longer needed.  That is to say that if I do not include the JwtAccessTokenConverter in the code below, then I still get back a JWT token.  But if I am using the InMemoryTokenStore, then I need to include the JwtAccessTokenConverter to get back JWT tokens, as expected.
Is there something special in the JdbcTokenStore that we are not taking into account?
@Bean
public JwtAccessTokenConverter accessTokenConverter() {
    JwtAccessTokenConverter converter = new JwtAccessTokenConverter();
    converter.setSigningKey("secret");
    return converter;
}

@Bean
public RwTokenEnhancer customTokenEnhancer(){
    return new RwTokenEnhancer();
}

@Bean
public TokenStore tokenStore() {
	logger.info("init JdbcTokenStore");
//        return new InMemoryTokenStore();
    return new JdbcTokenStore(dataSource);
}

@Override
public void configure(AuthorizationServerEndpointsConfigurer endpoints) throws Exception {

    TokenEnhancerChain enhancerChain = new TokenEnhancerChain();
    enhancerChain.setTokenEnhancers(Arrays.asList(customTokenEnhancer(), accessTokenConverter()));

    endpoints
            .authenticationManager(authenticationManager)
            .tokenStore(tokenStore())
            .userDetailsService(robustUserDetailsService)
            .tokenGranter(tokenGranter(endpoints))
            .tokenEnhancer(enhancerChain);
}

            <artifactId>spring-cloud-dependencies</artifactId>
            <version>Finchley.M8</version>

        <artifactId>spring-security-oauth2</artifactId>
        <version>2.3.0.RELEASE</version>

        <artifactId>spring-security-jwt</artifactId>
        <version>1.0.9.RELEASE</version>

This is a none issue.  The custom enhancer does not get called because the token was cached in the DB.  Only when creating a new token does the enhancer get called.

Hello, I am having a similar issue. I have added the avatar filename in my jwt, and now it never get returned. It makes a lot of sens of it get cached.

How long does the cache last?
How do I invalidate the cache?

repo: spring-projects/spring-security-oauth


text:
Expire OAuth codes if they are not redeemed

RFC6749 says:

The authorization code MUST expire shortly after it is issued to mitigate the risk of leaks.  A maximum authorization code lifetime of 10 minutes is RECOMMENDED.

However currently spring-security-oauth does not foresee any means of expiring authorization codes. This may in the long run pose a security risk at worst or a waste of hard disk/memory space at best.
The attached code will expire tokens by default after 10 minutes, but can be configured for any duration.
I have signed the contributor's agreement.

Maybe not implement a blocking expire system? It may be a good candidate for executing clear in background on dedicated thread (scheduler)?

@yankee42 Please sign the Contributor License Agreement!
Click here to manually synchronize the status of this Pull Request.
See the FAQ for frequently asked questions.

@yankee42 Thank you for signing the Contributor License Agreement!

Hello, do you have any update on this PR? We would really like to use this functionality in our SW without implementing this feature outside of Spring Security.

authors: kakawait pivotal-issuemaster romanstrobl yankee42


text:
Add support to override  endpointUri for awsIamAuthentication

At the moment its not possible to override endpointUri via vault properties for awsIamAuthentication.
Method is there to be able to set endpointUri but this one is never invoked:
https://github.com/spring-projects/spring-vault/blob/c7b6557606b7e3a41a7982326612615c192adff1/spring-vault-core/src/main/java/org/springframework/vault/authentication/AwsIamAuthenticationOptions.java#L263-L269
We have a requirement to change this url to https://sts.aws-region.amazonaws.com because provided iam role is bound to specific aws region.

Care to elaborate on

not possible to override endpointUri via vault properties for awsIamAuthentication.

There are no VaultProperties in Spring Vault. Do you mean Spring Cloud Vault?

Yes, I mean Spring Cloud Vault.

Can you please file a ticket at https://github.com/spring-cloud/spring-cloud-vault/issues as we cannot migrate tickets across organizations?

Sure will do. thank you!

repo: spring-projects/spring-vault


text:
Spring Vault documentation broken link

The Token Lifecycle chapter has a bullet list with tokens:

The second list item LoginToken is broken and points to non-existing JavaDoc page

That's fixed now and will become visible after releasing our documentation.


text:
How disable csrf?

I use io.springfox:springfox-swagger2:2.9.2 in gradle project. I have API with BASIC authentication. I exclude some URNs for swagger:
@Override
public void configure(WebSecurity web) {
    web.ignoring().antMatchers("/v2/api-docs", "/swagger-resources/**",
        "/swagger-ui.html", "/webjars/**", "/null/swagger-resources/configuration/ui");
}

But then i open http://localhost:8080/swagger-ui.html i see authentication dialog twice because springfox.js try loads this resources:

How i can disable it?

@alexeyvip as @olOwOlo this is a result of assuming CSRF protection.

Wow, it's need feature  :)

1

jo puta, contesta que me quedo con las ganas

authors: alexeyvip dilipkrish fyerte minhnguyenvan95

repo: springfox/springfox


text:
NoSuchMethodError: springfox.documentation.service.ApiInfo...

Version: 2.92
I'm getting this error, and I can't figure out why. I'm not using ApiInfo myself anywhere, and I don't think I have any other packages that interact with Springfox.
It seems like it's trying to create ApiInfo with the wrong signature, missing vendorExtensions? But I don't know why.
Failed to instantiate [springfox.documentation.spring.web.plugins.Docket]: Factory method 'api' threw exception; nested exception is java.lang.NoSuchMethodError: springfox.documentation.service.ApiInfo.<init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lspringfox/documentation/service/Contact;Ljava/lang/String;Ljava/lang/String;)V
	at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:599)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1123)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1018)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:510)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:772)
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:839)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:538)
	at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:118)
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:766)
	at org.springframework.boot.SpringApplication.createAndRefreshContext(SpringApplication.java:361)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:307)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1191)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1180)
	at se.fgirot.ik.apigateway.Application.main(Application.java:55)

Nevermind, turns out a consultant had long ago added an older version of SpringFox to a shared config.


text:
minor POM fixes

upgraded dbunit to 2.5.0
removed slf4j dep because dbunit imports it transitively
set newest version of spring-test-dbunit

Cool, thanks. I've merged but kept the slf4j dependency in because I prefer it to be explicit.

authors: The-Alchemist philwebb

repo: springtestdbunit/spring-test-dbunit


text:
Support publicKeyBase58 for Ed25519Signature2018

Support the publicKeyBase58 property of verification material, for the Ed25519 Signature 2018 verification method.
DID Core allows either publicKeyJwk or publicKeyBase58. Although there is discussion of the spec replacing publicKeyBase58 with publicKeyMultibase, there is currently a test case in vc-http-api-test-suite that relies on it.

@sbihel I would suggest using publicKeyJwk where possible. Tezos uses base58 with prefixes e.g. edpk, but this is not consistent with other linked data proof types; for example the Ed25519Signature2018 spec uses just the 32-byte public key in publicKeyBase58. I think it could create confusion/noninteroperability if we allow both Tezos-prefixed keys and raw bytes in publicKeyBase58.
I have leaned away from publicKeyBase58 because it doesn't seem as clear how the public keys should be serialized. I see now that did-method-key has test vectors for EcdsaSecp256k1VerificationKey2019 using publicKeyBase58. But I am unable to find any examples or specification for EcdsaSecp256r1VerificationKey2019 (P-256), e.g. to know whether it should use compressed, uncompressed or untagged representation.  publicKeyJwk is more well-specified, in IETF RFCs.
If the smart contract and/or other tools need to use Tezos-style base58 keys, we could probably convert them to JWK internally.

repo: spruceid/ssi


text:
🛑 Wissensdatenbank (Bücherregal) is down

Wir haben im Moment Probleme mit verschiedenen unserer IT-Services, insb. sind die Telefonanlage, der Terminalserver und das Bücherregal momentan nicht verfügbar. Die Ursache sind Serverprobleme bei einem unserer Provider.
In f68351b, Wissensdatenbank (Bücherregal) ($URL_BOOKS) was down:

HTTP code: 0
Response time: 0 ms

Wir haben im Moment Probleme mit verschiedenen unserer IT-Services, insb. sind die Telefonanlage, der Terminalserver und das Bücherregal momentan nicht verfügbar. Die Ursache sind Serverprobleme bei einem unserer Provider.

Resolved: Wissensdatenbank (Bücherregal) is back up in 5b501c0.

authors: anweibel spschweiz

repo: spschweiz/status

license: MIT


text:
🛑 Sektionsportal is down

In 599ed8f, Sektionsportal (https://login.sp-ps.ch/) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Sektionsportal is back up in 495410e.


text:
How to connect to moto standalone server?

I just installed moto and tried to connect to the standalone server with the following node.js code:
const AWS = require('aws-sdk')
const ep = new AWS.Endpoint('http://127.0.0.1:5000')
const route53 = new AWS.Route53({endpoint: ep})

const params = {}
console.log(route53.listHostedZones(params))

The code sets AWS service's endpoint, which points to the standalone server of moto. And then sends listHostedZones request to the endpoint. The output of this program is
Request {
domain: null,
service:
Service {
    config:
    Config {
        credentials: [Object],
        credentialProvider: [Object],
        region: undefined,
        logger: null,
        apiVersions: {},
        apiVersion: null,
        endpoint: [Object],
        httpOptions: [Object],
        maxRetries: undefined,
        maxRedirects: 10,
        paramValidation: true,
        sslEnabled: true,
        s3ForcePathStyle: false,
        s3BucketEndpoint: false,
        s3DisableBodySigning: true,
        computeChecksums: true,
        convertResponseTypes: true,
        correctClockSkew: false,
        customUserAgent: null,
        dynamoDbCrc32: true,
        systemClockOffset: 0,
        signatureVersion: null,
        signatureCache: true,
        retryDelayOptions: {},
        useAccelerateEndpoint: false },
    endpoint:
    Endpoint {
        protocol: 'http:',
        host: '127.0.0.1:5000',
        port: 5000,
        hostname: '127.0.0.1',
        pathname: '/',
        path: '/',
        href: 'http://127.0.0.1:5000/',
        constructor: [Object] },
    _clientId: 1 },
operation: 'listHostedZones',
params: {},
httpRequest:
HttpRequest {
    method: 'POST',
    path: '/',
    headers: { 'User-Agent': 'aws-sdk-nodejs/2.166.0 darwin/v6.2.2' },
    body: '',
    endpoint:
    Endpoint {
        protocol: 'http:',
        host: '127.0.0.1:5000',
        port: 5000,
        hostname: '127.0.0.1',
        pathname: '/',
        path: '/',
        href: 'http://127.0.0.1:5000/',
        constructor: [Object] },
    region: undefined,
    _userAgent: 'aws-sdk-nodejs/2.166.0 darwin/v6.2.2' },
startTime: 2017-12-18T13:27:48.148Z,
response:
Response {
    request: [Circular],
    data: null,
    error: null,
    retryCount: 0,
    redirectCount: 0,
    httpResponse:
    HttpResponse {
        statusCode: undefined,
        headers: {},
        body: undefined,
        streaming: false,
        stream: null },
    maxRetries: 3,
    maxRedirects: 10 },
_asm:
AcceptorStateMachine {
    currentState: 'validate',
    states:
    { validate: [Object],
        build: [Object],
        afterBuild: [Object],
        sign: [Object],
        retry: [Object],
        afterRetry: [Object],
        send: [Object],
        validateResponse: [Object],
        extractError: [Object],
        extractData: [Object],
        restart: [Object],
        success: [Object],
        error: [Object],
        complete: [Object] } },
_haltHandlersOnError: false,
_events:
{ validate:
    [ [Object],
        [Function: VALIDATE_REGION],
        [Function: BUILD_IDEMPOTENCY_TOKENS],
        [Function: VALIDATE_PARAMETERS] ],
    afterBuild:
    [ [Object],
        [Function: SET_CONTENT_LENGTH],
        [Function: SET_HTTP_HOST] ],
    restart: [ [Function: RESTART] ],
    sign: [ [Object] ],
    validateResponse: [ [Function: VALIDATE_RESPONSE] ],
    send: [ [Object] ],
    httpHeaders: [ [Function: HTTP_HEADERS] ],
    httpData: [ [Function: HTTP_DATA] ],
    httpDone: [ [Function: HTTP_DONE] ],
    retry:
    [ [Function: FINALIZE_ERROR],
        [Function: INVALIDATE_CREDENTIALS],
        [Function: EXPIRED_SIGNATURE],
        [Function: CLOCK_SKEWED],
        [Function: REDIRECT],
        [Function: RETRY_CHECK] ],
    afterRetry: [ [Object] ],
    build: [ [Function: buildRequest], [Function: sanitizeUrl] ],
    extractData: [ [Function: extractData], [Function: extractRequestId] ],
    extractError: [ [Function: extractError], [Function: extractRequestId] ],
    httpError: [ [Function: ENOTFOUND_ERROR] ] },
emit: [Function: emit] }

As you can see in the above output, there's an ENOTFOUND_ERROR error in it. And I couldn't find any new connection in the console output of moto.
The way I start moto is moto_server route53:
> moto_server route53
* Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)

What's wrong with my configurations? I think there's something wrong with my node.js code. Do I misinterpret the meaning of endpoint?

const AWS = require('aws-sdk')
const ep = new AWS.Endpoint('http://127.0.0.1:5000')
const initParam = {
  endpoint: ep,
  region: 'ap-northeast-1'
}
const route53 = new AWS.Route53(initParam)

let params = {
  CallerReference: 'unique_string_affh38h98hasd8f76a',
  Name: 'www.example.com'
}
route53.createHostedZone(params, (err, data) => {
  if (err) {
    console.error(`createHostedZone err: ${err}`)
  } else {
    console.log(`createHostedZone data: ${JSON.stringify(data)}`)
  }
})

I didn't set the region option. After setting the region, it works.

repo: spulec/moto


text:
Tech Debt - Remove unknown ImageID in internal tests

Unknown image ID's would show this warning:
PendingDeprecationWarning: Could not find AMI with image-id:ami-123456, in the near future this will cause an error.\nUse ec2_backend.describe_images() to find suitable image for your test
The build log was completely full of warnings like this.
Not all warnings are gone with this change, but it's a start.

Coverage decreased (-0.1%) to 94.418% when pulling c75807d9878f2fcf380ff41da88968aee19f2c80 on bblommers:techdebt/remove_ec2_image_warnings into a31599d000688185698c22a6d11d7c23e942c177 on spulec:master.

This is now part of moto >= 1.3.16.dev197

This is now part of moto >= 1.3.16.dev197

authors: bblommers coveralls


text:
Add volume attachment status

Adds volume attachment status for filtering.
Current possible statuses are attached or detached, the intermediate states (attaching and detaching) are not implemented yet, because I couldn't figure out a good implementation.  The detached status is tricky to test, since you have to keep the VolumeAttachment from detach_volume.

Coverage decreased (-0.06%) to 94.971% when pulling b4176050e2b53eb2b8b8e3991baaec6f8362c88b on andrewgross:feature/add-volume-attachment-status into 1f618a3cb53d167b65c1d051c7a06011b417364f on spulec:master.

thanks!

authors: andrewgross coveralls spulec


text:
can't open spyder in conda environment

I have installed spyder in a env by conda install, but can't open it , here are the problems:

Traceback (most recent call last):
File "/home/slam/.conda/envs/deepl/lib/python2.7/site-packages/spyder/app/mainwindow.py", line 3285, in main
mainwindow = run_spyder(app, options, args)
File "/home/slam/.conda/envs/deepl/lib/python2.7/site-packages/spyder/app/mainwindow.py", line 3140, in run_spyder
main.setup()
File "/home/slam/.conda/envs/deepl/lib/python2.7/site-packages/spyder/app/mainwindow.py", line 831, in setup
from spyder.plugins.help import Help
File "/home/slam/.conda/envs/deepl/lib/python2.7/site-packages/spyder/plugins/help.py", line 32, in
from spyder.utils.help.sphinxify import (CSS_PATH, generate_context,
File "/home/slam/.conda/envs/deepl/lib/python2.7/site-packages/spyder/utils/help/sphinxify.py", line 32, in
from sphinx.application import Sphinx
File "/home/slam/.conda/envs/deepl/lib/python2.7/site-packages/sphinx/application.py", line 34, in
from sphinx.environment import BuildEnvironment
File "/home/slam/.conda/envs/deepl/lib/python2.7/site-packages/sphinx/environment/init.py", line 38, in
from sphinx.util.websupport import is_commentable
File "/home/slam/.conda/envs/deepl/lib/python2.7/site-packages/sphinx/util/websupport.py", line 11, in
from sphinxcontrib.websupport.utils import is_commentable  # NOQA
File "/home/slam/.conda/envs/deepl/lib/python2.7/site-packages/sphinxcontrib/websupport/init.py", line 16, in
from sphinxcontrib.websupport.core import WebSupport  # NOQA
File "/home/slam/.conda/envs/deepl/lib/python2.7/site-packages/sphinxcontrib/websupport/core.py", line 29, in
from sphinxcontrib.serializinghtml.jsonimpl import dumps as dump_json
File "/home/slam/.conda/envs/deepl/lib/python2.7/site-packages/sphinxcontrib/serializinghtml/init.py", line 177
def setup(app: Sphinx) -> Dict[str, Any]:
^
SyntaxError: invalid syntax

And my version

Spyder version: 3.3.6
Python version: 2.7
Qt version: 5.9.7
PyQt version: 5.9.2
sphinx version: 1.8.5
Operating System name/version:ubuntu16.04

def setup(app: Sphinx) -> Dict[str, Any]:
^
SyntaxError: invalid syntax

This means that you installed a Python 3 version of Sphinx in a Python 2 environment. There's no way that this could have happened if you use conda to install packages on that env, so I guess you used pip for that (which we've warned against multiple times in the past).
In short, I don't know how you ended up in such a situation, but it's up to you to solve it (perhaps by recreating your deepl and avoiding pip to install packages on it if they are available through conda).

repo: spyder-ide/spyder


text:
Outline explorer seeing impported symbols from relative import with tuple syntax

What steps will reproduce the problem?

I have a django project that does some imports as follows:
from .models import Marksheet, MarkType, ProjectAssignment, Project, StudentReport
from .forms import (
    MarksheetListForm,
    ProjectAssignmentForm,
    FinalizeMarksForm,
    ProjectCopySourceForm,
    ProjectAssignmentFilter,
    BulkMarksheetsImportForm,
    BulkTurnitinImportForm,
    BulkUploadMinervaAssignmentForm,
)
from .tables import BaseTable, MarkColumn, ProjectTable, AllProjectTable

In 5.1.2 nearly all of these symbols are correctly suppressed in the outline explorer EXCEPT for the import from .forms.
It's not as simple as the tuple syntax in the import as I also have the following lines which are all correctly suppressed:
from phys_utils.views import (
    IsStaffViewMixin,
    IsSuperuserViewMixin,
    MultiFormMixin,
    FormListView,
)
from phys_utils.response import PDF_TemplateResponse, CSV_TemplateResponse

So it seems like it is a combination of both the relative package import and the tuple syntax.
Unfortunately, black is rath fond of the tuple formatting of the long import :-) !

Hey @gb119, thanks for reporting. I'll take a look at this one for 5.2.0 (hopefully it won't be too hard to solve).