Comments on: Part 3: Creating Microservices: Circuit Breaker, Fallback and Load Balancing with Spring Cloud https://piotrminkowski.com/2017/05/15/part-3-creating-microservices-circuit-breaker-fallback-and-load-balancing-with-spring-cloud/ Java, Spring, Kotlin, microservices, Kubernetes, containers Tue, 20 Oct 2020 14:13:41 +0000 hourly 1 https://wordpress.org/?v=6.9.1 By: Shaan https://piotrminkowski.com/2017/05/15/part-3-creating-microservices-circuit-breaker-fallback-and-load-balancing-with-spring-cloud/#comment-323 Sun, 07 Jan 2018 17:18:40 +0000 https://piotrminkowski.wordpress.com/?p=3168#comment-323 Sorry, for my late reply.. I was able to solve the issue and it worked for me.

One more question – when the circuit is open due to an issue in the following service call, how long it is kept open before the hystrix tries again to see if the service is working or not. Is there a setting to control it?

]]>
By: Shaan https://piotrminkowski.com/2017/05/15/part-3-creating-microservices-circuit-breaker-fallback-and-load-balancing-with-spring-cloud/#comment-335 Sun, 07 Jan 2018 17:18:40 +0000 https://piotrminkowski.wordpress.com/?p=3168#comment-335 Sorry, for my late reply.. I was able to solve the issue and it worked for me.

One more question – when the circuit is open due to an issue in the following service call, how long it is kept open before the hystrix tries again to see if the service is working or not. Is there a setting to control it?

]]>
By: Piotr Mińkowski https://piotrminkowski.com/2017/05/15/part-3-creating-microservices-circuit-breaker-fallback-and-load-balancing-with-spring-cloud/#comment-322 Thu, 04 Jan 2018 15:36:38 +0000 https://piotrminkowski.wordpress.com/?p=3168#comment-322 In reply to Shaan.

Did you try to send some test requests to the service?

]]>
By: Piotr Mińkowski https://piotrminkowski.com/2017/05/15/part-3-creating-microservices-circuit-breaker-fallback-and-load-balancing-with-spring-cloud/#comment-334 Thu, 04 Jan 2018 15:36:38 +0000 https://piotrminkowski.wordpress.com/?p=3168#comment-334 In reply to Shaan.

Did you try to send some test requests to the service?

]]>
By: Shaan https://piotrminkowski.com/2017/05/15/part-3-creating-microservices-circuit-breaker-fallback-and-load-balancing-with-spring-cloud/#comment-321 Thu, 04 Jan 2018 11:16:50 +0000 https://piotrminkowski.wordpress.com/?p=3168#comment-321 In reply to Piotr Mińkowski.

Hi Piotr

When I try this url, i keep getting ping: in the browser, nothing else.

In the logs i see –
Mapped “{[/hystrix.stream/**]}” onto public org.springframework.web.servlet.ModelAndView org.springframework.cloud.netflix.endpoint.ServletWrappingEndpoint.handle(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse) throws java.lang.Exception

]]>
By: Shaan https://piotrminkowski.com/2017/05/15/part-3-creating-microservices-circuit-breaker-fallback-and-load-balancing-with-spring-cloud/#comment-333 Thu, 04 Jan 2018 11:16:50 +0000 https://piotrminkowski.wordpress.com/?p=3168#comment-333 In reply to Piotr Mińkowski.

Hi Piotr

When I try this url, i keep getting ping: in the browser, nothing else.

In the logs i see –
Mapped “{[/hystrix.stream/**]}” onto public org.springframework.web.servlet.ModelAndView org.springframework.cloud.netflix.endpoint.ServletWrappingEndpoint.handle(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse) throws java.lang.Exception

]]>
By: Piotr Mińkowski https://piotrminkowski.com/2017/05/15/part-3-creating-microservices-circuit-breaker-fallback-and-load-balancing-with-spring-cloud/#comment-320 Thu, 04 Jan 2018 10:22:51 +0000 https://piotrminkowski.wordpress.com/?p=3168#comment-320 In reply to Shaan.

Hi Shaan,
Did you check out the application logs just after startup if hystrix.stream is available for the application? Did you try to download that file just by calling this URL http://localhost:3333/hystrix.stream from your web browser?

]]>
By: Piotr Mińkowski https://piotrminkowski.com/2017/05/15/part-3-creating-microservices-circuit-breaker-fallback-and-load-balancing-with-spring-cloud/#comment-332 Thu, 04 Jan 2018 10:22:51 +0000 https://piotrminkowski.wordpress.com/?p=3168#comment-332 In reply to Shaan.

Hi Shaan,
Did you check out the application logs just after startup if hystrix.stream is available for the application? Did you try to download that file just by calling this URL http://localhost:3333/hystrix.stream from your web browser?

]]>
By: Shaan https://piotrminkowski.com/2017/05/15/part-3-creating-microservices-circuit-breaker-fallback-and-load-balancing-with-spring-cloud/#comment-319 Thu, 04 Jan 2018 00:55:35 +0000 https://piotrminkowski.wordpress.com/?p=3168#comment-319 Hi Piotr,

I have done the set up as explained in the article above, but i am getting following error when i use the hystrix dashboard to monitor hystrix stream – http://localhost:3333/hystrix.stream
Any help would be greatly appreciated.

2018-01-04 00:51:50.178 ERROR [account-service,b6efcafa1087ff38,b6efcafa1087ff38,true] 12792 — [nio-2222-exec-2] ashboardConfiguration$ProxyStreamServlet : Error proxying request: http://localhost:3333/hystrix.stream?delay=0

java.net.ConnectException: Connection refused: connect
at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method) ~[na:1.8.0_102]
at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:85) ~[na:1.8.0_102]
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) ~[na:1.8.0_102]
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) ~[na:1.8.0_102]
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) ~[na:1.8.0_102]
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172) ~[na:1.8.0_102]
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) ~[na:1.8.0_102]
at java.net.Socket.connect(Socket.java:589) ~[na:1.8.0_102]
at org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:121) ~[httpclient-4.5.3.jar:4.5.3]
at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:180) ~[httpclient-4.5.3.jar:4.5.3]
at org.apache.http.impl.conn.ManagedClientConnectionImpl.open(ManagedClientConnectionImpl.java:326) ~[httpclient-4.5.3.jar:4.5.3]
at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:610) ~[httpclient-4.5.3.jar:4.5.3]
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:445) ~[httpclient-4.5.3.jar:4.5.3]
at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:835) ~[httpclient-4.5.3.jar:4.5.3]
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83) ~[httpclient-4.5.3.jar:4.5.3]

]]>
By: Shaan https://piotrminkowski.com/2017/05/15/part-3-creating-microservices-circuit-breaker-fallback-and-load-balancing-with-spring-cloud/#comment-331 Thu, 04 Jan 2018 00:55:35 +0000 https://piotrminkowski.wordpress.com/?p=3168#comment-331 Hi Piotr,

I have done the set up as explained in the article above, but i am getting following error when i use the hystrix dashboard to monitor hystrix stream – http://localhost:3333/hystrix.stream
Any help would be greatly appreciated.

2018-01-04 00:51:50.178 ERROR [account-service,b6efcafa1087ff38,b6efcafa1087ff38,true] 12792 — [nio-2222-exec-2] ashboardConfiguration$ProxyStreamServlet : Error proxying request: http://localhost:3333/hystrix.stream?delay=0

java.net.ConnectException: Connection refused: connect
at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method) ~[na:1.8.0_102]
at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:85) ~[na:1.8.0_102]
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) ~[na:1.8.0_102]
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) ~[na:1.8.0_102]
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) ~[na:1.8.0_102]
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172) ~[na:1.8.0_102]
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) ~[na:1.8.0_102]
at java.net.Socket.connect(Socket.java:589) ~[na:1.8.0_102]
at org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:121) ~[httpclient-4.5.3.jar:4.5.3]
at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:180) ~[httpclient-4.5.3.jar:4.5.3]
at org.apache.http.impl.conn.ManagedClientConnectionImpl.open(ManagedClientConnectionImpl.java:326) ~[httpclient-4.5.3.jar:4.5.3]
at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:610) ~[httpclient-4.5.3.jar:4.5.3]
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:445) ~[httpclient-4.5.3.jar:4.5.3]
at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:835) ~[httpclient-4.5.3.jar:4.5.3]
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83) ~[httpclient-4.5.3.jar:4.5.3]

]]>