These are chat archives for spring-cloud/spring-cloud

16th
May 2018
CH4:D
@chad_d_stud_twitter
May 16 2018 01:05
@TYsewyn actually I already did that. It isn't very helpful. Service 01 executed and returned a result. The feign client execution just complained that it had no fallback method declared.
CH4:D
@chad_d_stud_twitter
May 16 2018 03:20
okay i think i somewhat fixed the problem by increasing the timeout. feign’s default has a lower timeout i believe
Annotation type not found or something like that
vikrantch-hk
@vikrantch-hk
May 16 2018 05:32
I get below exception
2018-05-16 11:02:12.196  WARN 7909 --- [eerNodesUpdater] c.n.discovery.endpoint.EndpointUtils     : DISCOVERY: Could not pick a zone based on preferred zone settings. My zone - ap-south-1a, preferSameZone - true. Defaulting to defaultZone
below is application yaml
eureka.server.registry-sync-retry-wait-ms: 500
eureka.server.a-sgcache-expiry-timeout-ms: 60000
eureka.server.eviction-interval-timer-in-ms: 30000
eureka.server.peer-eureka-nodes-update-interval-ms: 15000
eureka.server.renewal-threshold-update-interval-ms: 300000
aws.region.static: ap-south-1
aws.region.credentials.accessKey: 
aws.region.credentials.secretKey: 
eureka.isAws: true
eureka.datacenter: cloud
eureka.instance.metadataMap.zone: ap-south-1
eureka.client.region: ap-south-1
eureka.client.availability-zones.client.prefer-same-zone-eureka: true
eureka.client.availability-zones.ap-south-1: 'ap-south-1a,ap-south-1b'
eureka.client.serviceUrl.ap-south-1a: http://10.0.10.97:8080/eureka/
eureka.client.serviceUrl.ap-south-1b: http://10.0.20.97:8080/eureka/
CH4:D
@chad_d_stud_twitter
May 16 2018 06:06
i’ve only ever used defaultZone. have you tried making it simple first?
like using defaultZone for ap1 to its respective eureka instance and so on?
vikrantch-hk
@vikrantch-hk
May 16 2018 06:11
my scenario is that we'll be running 2 eureka gateways in 2 different zones and from these 2 zones we'll be redirecting requests to 4 discovery clients(2 clients in 1 zone and other 2 in other zone)
vikrantch-hk
@vikrantch-hk
May 16 2018 06:23
@TYsewyn yes I have tried peer awareness concept and now both eureka servers have all clients information
but I have a doubt in this case to which eureka server client send heartbeat does it prefers same zone eureka server
Tim Ysewyn
@TYsewyn
May 16 2018 06:32
shouldn’t that be eureka.client.preferSameZoneEureka: true?
btw, what version of Spring Cloud are you using?
vikrantch-hk
@vikrantch-hk
May 16 2018 06:33
Finchley
Tim Ysewyn
@TYsewyn
May 16 2018 06:33
RC1?
vikrantch-hk
@vikrantch-hk
May 16 2018 06:34
nope BUILD-SNAPSHOT
Ingo Griebsch
@ingogriebsch
May 16 2018 09:43
Hello
We are just trying to implement a resource server token relay in our service and having problems to get feign respecting the OAuth2ClientContext.
We are using Spring Cloud Dalston.SR5.
The Spring Cloud documentation is explaining the following: "Feign clients will also pick up an interceptor that uses the OAuth2ClientContext if it is available, so they should also do a token relay anywhere where a RestTemplate would."
Therefore we expect that we don't need to configure an interceptor (the OAuth2FeignRequestInterceptor to be precise) to get the mechanism working. But it looks like the interceptor is not created/used.
So we would like to ask if we understand something wrong or if we need to set a specific flag? Or do we create the interceptor on our own in every case?
Ingo Griebsch
@ingogriebsch
May 16 2018 12:24
Sorry guys for the hazzle, it looks like we forgot some configuration inside the application.yml :-\
Junior Monyei
@junior6886_twitter
May 16 2018 13:22
Hey guys. Im working on a migration of my codebase from Brixton.M3 to Camden.SR4
We are currently on spring boot 1.3
There are a couple classes missing and Im having trouble figuring out workarounds
Junior Monyei
@junior6886_twitter
May 16 2018 13:27
For example org.springframework.cloud.sleuth.log.Slf4jSpanListener
and org.springframework.cloud.sleuth.event.SpanReleasedEvent
And I dont know where they were moved or what they were replaced with
Any ideas?
Ryan Baxter
@ryanjbaxter
May 16 2018 14:59
@junior6886_twitter best to ask in the Sleuth channel https://gitter.im/spring-cloud/spring-cloud-sleuth
Junior Monyei
@junior6886_twitter
May 16 2018 15:00
Thanks Ryan I posted my question there after realizing there was a more specific channel for my question :)
Brian Devins-Suresh
@devinsba
May 16 2018 17:29
For those using spring-cloud-aws, or the others like it, how do people run locally? I’m assuming there is a property I can use to disable the Ec2 metadata lookups?
Looks like I’m looking for the answer to spring-cloud/spring-cloud-aws#272
Mario Romano
@magemello
May 16 2018 23:50

Hi guys, I’m using Spring boot 2.0.0.M2 , with spring-cloud-starter-config Finchley.M6 and spring-boot-starter-actuator….I have declared a bean

@RefreshScope
@RestController
class MessageRestController {

    @Value("${message:Hello default}")
    private String message;

    @RequestMapping("/message")
    String getMessage() {
        return this.message;
    }
}

and following config

spring.application.name=clientOne
message = testsssssssssaaaaa
server.port=8080
management.endpoints.web.exposure.include=*
endpoints.actuator.enabled=true

but when I try to call

 curl localhost:8080/actuator/refresh -d {} -H "Content-Type: application/json”

I get 404 and my bean doesn’t refresh
I don’t have a config server…and I wat my bean just to refresh following an update of the propery file
why the actuator/refresh endpoint is not present? am’ I missing some dependecies?
or config properties?
if there is a better way to do it I’m also open to suggestions….