0

I have deployed microservice on docker-desktop for windows and feign is not able to make a call to another service.

person ms calling organization ms through feign. I can see in the logs of person pod

 2019-11-10 12:58:34.000  INFO [personservice,13631e6ef2efe358,15c75b9a4006485a,true] 6 --- [ionThreadPool-1] c.p.service.OrganizationServiceData      : Get the value from the organization ms hystrix-organizationThreadPool-1
2019-11-10 12:58:34.293  INFO [personservice,13631e6ef2efe358,e0bbcecf5f7c349f,true] 6 --- [zationservice-1] c.netflix.config.ChainedDynamicProperty  : Flipping property: organizationservice.ribbon.ActiveConnectionsLimit to use NEXT property: niws.loadbalancer.availabilityFilteringRule.activeConnectionsLimit = 2147483647
2019-11-10 12:58:34.319  INFO [personservice,13631e6ef2efe358,e0bbcecf5f7c349f,true] 6 --- [zationservice-1] c.netflix.loadbalancer.BaseLoadBalancer  : Client: organizationservice instantiated a LoadBalancer: DynamicServerListLoadBalancer:{NFLoadBalancer:name=organizationservice,current list of Servers=[],Load balancer stats=Zone stats: {},Server stats: []}ServerList:null
2019-11-10 12:58:34.332  INFO [personservice,13631e6ef2efe358,e0bbcecf5f7c349f,true] 6 --- [zationservice-1] c.n.l.DynamicServerListLoadBalancer      : Using serverListUpdater PollingServerListUpdater
2019-11-10 12:58:34.535  INFO [personservice,13631e6ef2efe358,e0bbcecf5f7c349f,true] 6 --- [zationservice-1] c.netflix.config.ChainedDynamicProperty  : Flipping property: organizationservice.ribbon.ActiveConnectionsLimit to use NEXT property: niws.loadbalancer.availabilityFilteringRule.activeConnectionsLimit = 2147483647
2019-11-10 12:58:34.556  INFO [personservice,13631e6ef2efe358,e0bbcecf5f7c349f,true] 6 --- [zationservice-1] c.n.l.DynamicServerListLoadBalancer      : DynamicServerListLoadBalancer for client organizationservice initialized: DynamicServerListLoadBalancer:{NFLoadBalancer:name=organizationservice,current list of Servers=[10.1.0.190:8085],Load balancer stats=Zone stats: {unknown=[Zone:unknown; Instance count:1;       Active connections count: 0;       Circuit breaker tripped count: 0;       Active connections per server: 0.0;]
},Server stats: [[Server:10.1.0.190:8085;       Zone:UNKNOWN;   Total Requests:0;       Successive connection failure:0;        Total blackout seconds:0;       Last connection made:Thu Jan 01 00:00:00 GMT 1970;
First connection made: Thu Jan 01 00:00:00 GMT 1970;    Active Connections:0;   total failure count in last (1000) msecs:0;     average resp time:0.0;  90 percentile resp time:0.0;    95 percentile resp time:0.0;       min resp time:0.0;      max resp time:0.0;      stddev resp time:0.0]
]}ServerList:org.springframework.cloud.kubernetes.ribbon.KubernetesServerList@5bae3a6b
2019-11-10 12:58:35.345  INFO [personservice,,,] 6 --- [erListUpdater-0] c.netflix.config.ChainedDynamicProperty  : Flipping property: organizationservice.ribbon.ActiveConnectionsLimit to use NEXT property: niws.loadbalancer.availabilityFilteringRule.activeConnectionsLimit = 2147483647
2019-11-10 12:58:35.502  INFO [personservice,13631e6ef2efe358,15c75b9a4006485a,true] 6 --- [ionThreadPool-1] c.p.service.OrganizationServiceData      : calling fallback method to get the organization data for id 1

The ribbon client gets the IP-address of the pod running organization service. current list of Servers=[10.1.0.190:8085]

Here is my person service application.yml

spring:
  cloud:
    kubernetes:
      ribbon:
          mode: SERVICE
organizationservice:
        ribbon:
            MaxAutoRetries: 2
            MaxAutoRetriesNextServer: 0
            OkToRetryOnAllOperations: true
            ServerListRefreshInterval: 2000
            ConnectTimeout: 10000
            ReadTimeout: 1000

person ms dependecy

compile "org.springframework.cloud:spring-cloud-starter-kubernetes-all"
compile('org.springframework.cloud:spring-cloud-starter-netflix-ribbon')

upon checking the logs for organization pod. No calls have been made to it.

Edit 1: Upon changing the log level for feign in person service I found that JWT token is begin passed by default. I solved the issue using filters but the same application was working with out filters when I was using not using spring cloud kubernetes.

Chandresh Mishra
  • 1,081
  • 3
  • 24
  • 45
  • Pleas provide more information about your environment. Are thoses services in the same cluster? Did you expose your service? Your cluster is on bare metal? – PjoterS Nov 12 '19 at 07:06
  • I am running everthing on docker for windows i.e same node. yes I have exposed both the microservice as kuberntes service. – Chandresh Mishra Nov 12 '19 at 13:05
  • To clarify, fein is also inside the cluster? Exposed as service but what type? Could you provide your service YAML. – PjoterS Nov 15 '19 at 11:39
  • Also could you check if th traffic arrives to the pod using `tcpdump`? Is there any output? – PjoterS Nov 18 '19 at 13:05
  • After changing the log level for the feign I found that there is issue with JWT passing to next service. Earlier when I was using spring cloud Netflix only token passing was working fine without writing any extra code but stopped after moving to spring cloud kubernetes. – Chandresh Mishra Nov 19 '19 at 17:14
  • Could you elaborate? Issue with passing to next service, which one? Kubernetes? – PjoterS Nov 20 '19 at 10:23
  • Please see the edit 1 @PjoterS – Chandresh Mishra Nov 25 '19 at 13:17

0 Answers0