Comments on: Quick Guide to Microservices with Spring Boot 2, Eureka and Spring Cloud https://piotrminkowski.com/2018/04/26/quick-guide-to-microservices-with-spring-boot-2-0-eureka-and-spring-cloud/ Java, Spring, Kotlin, microservices, Kubernetes, containers Fri, 19 Feb 2021 12:47:24 +0000 hourly 1 https://wordpress.org/?v=6.9.1 By: piotr.minkowski https://piotrminkowski.com/2018/04/26/quick-guide-to-microservices-with-spring-boot-2-0-eureka-and-spring-cloud/#comment-1022 Fri, 19 Feb 2021 12:47:24 +0000 https://piotrminkowski.wordpress.com/?p=6436#comment-1022 In reply to fei zhao.

You’re welcome

]]>
By: fei zhao https://piotrminkowski.com/2018/04/26/quick-guide-to-microservices-with-spring-boot-2-0-eureka-and-spring-cloud/#comment-1007 Tue, 26 Jan 2021 14:50:26 +0000 https://piotrminkowski.wordpress.com/?p=6436#comment-1007 I am a coder in China. when learned you microservice implemented by spring cloud, I learned a lot. The source code exists very well. and you write blogs to illustrate it. Thanks a lot.

]]>
By: piotr.minkowski https://piotrminkowski.com/2018/04/26/quick-guide-to-microservices-with-spring-boot-2-0-eureka-and-spring-cloud/#comment-926 Sun, 23 Aug 2020 01:58:24 +0000 https://piotrminkowski.wordpress.com/?p=6436#comment-926 In reply to raghu.

That’s not the same.

]]>
By: piotr.minkowski https://piotrminkowski.com/2018/04/26/quick-guide-to-microservices-with-spring-boot-2-0-eureka-and-spring-cloud/#comment-925 Sun, 23 Aug 2020 01:56:49 +0000 https://piotrminkowski.wordpress.com/?p=6436#comment-925 In reply to Harshit.

Well, as you see they are registered under address 192.168.225.153, not `localhost`.

]]>
By: harshit https://piotrminkowski.com/2018/04/26/quick-guide-to-microservices-with-spring-boot-2-0-eureka-and-spring-cloud/#comment-504 Fri, 24 Jul 2020 13:58:33 +0000 https://piotrminkowski.wordpress.com/?p=6436#comment-504 Thanks a lot Piotor for your detail explanation. I need your help to review one case. My department service is not able to locate employee service and ended up with below exception.

2020-07-24 17:20:57 ERROR [department-service,,,] Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is feign.RetryableException: connect timed out executing GET http://employee-service/department/1%5D with root cause
java.net.SocketTimeoutException: connect timed out

I am running in my local Mac book.

I have bit modified bootstrap.yml to work with docker.

employee
spring:
application:
name: employee-service
cloud:
config:
fail-fast: true
discovery:
enabled: true
service-id: config-service

department
spring:
application:
name: department-service
cloud:
config:
fail-fast: true
discovery:
enabled: true
service-id: config-service

I have searched over net and found that discovery.enabled should be false. Is that the case?

]]>
By: Harshit https://piotrminkowski.com/2018/04/26/quick-guide-to-microservices-with-spring-boot-2-0-eureka-and-spring-cloud/#comment-503 Mon, 20 Jul 2020 08:58:21 +0000 https://piotrminkowski.wordpress.com/?p=6436#comment-503 I am facing issue in routing when I start services in my local machine.

My laptop is connected to my office VPN network and when I start eureka server,conifg, 3 client services, 1 spring cloud gateway in local environment all are registered with Eureka with IP:PORT.

I can see registered services on eureka portal like this : 192.168.225.153:config-service:8081, 192.168.225.153:employee-service:8082, 192.168.225.153:gateway-service:8085

With this configuration my spring cloud gateway not able to connect to downstream services (other 2 client service) on 192.168.225.153 IP.

Call to http://localhost:8085/employee/1 is not working. However when I directly make call to employee service using http://localhost:8082/1, it is working.

There is some issue between how gateway service is locating and connecting to downstream services. (e.g. employee, department)

If I disconnect from internet and restart all the services, Eureka registered services with machine name/host name.

I can see registered services on eureka portal like this : :config-service:8081, :employee-service:8082, :gateway-service:8085

Call to http://localhost:8085/employee/1 is now working. In this case, gateway is able to locate and connect with downstream services.

Any idea why services are not located by gateway when I am connected to my office VPN?

]]>
By: Piotr Mińkowski https://piotrminkowski.com/2018/04/26/quick-guide-to-microservices-with-spring-boot-2-0-eureka-and-spring-cloud/#comment-502 Fri, 15 May 2020 14:50:49 +0000 https://piotrminkowski.wordpress.com/?p=6436#comment-502 In reply to boost.

You can remove the route declarations as well, and then you could access it using /employee-service path. For more details about Spring Cloud Gateway you may watch my online course: https://youtu.be/XIkSWHX38Tg

]]>
By: boost https://piotrminkowski.com/2018/04/26/quick-guide-to-microservices-with-spring-boot-2-0-eureka-and-spring-cloud/#comment-501 Fri, 15 May 2020 14:47:41 +0000 https://piotrminkowski.wordpress.com/?p=6436#comment-501 In reply to Piotr Mińkowski.

I’ve already tried that as well.
Setting the same path, filters, … with pure Java code works though.
But I feel like it’s a less good practice to do it this way. :/

]]>
By: Piotr Mińkowski https://piotrminkowski.com/2018/04/26/quick-guide-to-microservices-with-spring-boot-2-0-eureka-and-spring-cloud/#comment-500 Fri, 15 May 2020 14:43:45 +0000 https://piotrminkowski.wordpress.com/?p=6436#comment-500 In reply to boost.

Thanks 🙂 You should try to access it using just /employee path.

]]>
By: boost https://piotrminkowski.com/2018/04/26/quick-guide-to-microservices-with-spring-boot-2-0-eureka-and-spring-cloud/#comment-499 Fri, 15 May 2020 13:28:01 +0000 https://piotrminkowski.wordpress.com/?p=6436#comment-499 ]]> Hello Piotr,

First of all, thank you for this amazing tutorial !
Altough, I’m having an issue with Spring Gateway.

I set up a route using the following parameters :
” id: employee-service
uri: lb://employee-service
predicates:
– Path=/employee/** ”
However, I can only access my employee-service using the “/employee-service/endpoint” URI, the Path predicate isn’t working. Do you have any idea of what would cause that? 🙂

]]>