I have following spring-boot setup.
- Client/Postman is calling API gateway (which is also acting as load balancer).
- The API gateway and Albums are spring boot application with are registered with Eureka Discovery Service (Also Spring Boot Application).
- I run the applications in following order: Eureka discovery service, API Gateway, Albums
- When I try to access the Albums resource, which is behind the API Gateway, I get the following error (shown below). This happens for around first < 1 Minutes and then I am able to access the applications successfully.
- I have tried number of links but could not solve this issue.
- Why am I getting an Apache Proxy 503 error?
- Tomcat application not responding with no logs
- What java.security.egd option is for?
- Spring Cloud Gateway not able to load balance and gives error 500
Any help / pointer will be appreciated. Thanks in advance.
Error In Postman
{ "timestamp": "2021-07-21T07:06:15.840+00:00", "path": "/products/status", "status": 500, "error": "Internal Server Error", "message": "Connection refused: no further information: centos/192.168.0.104:60788", "requestId": "ffb03cbf-22", "trace": "io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: no further information: centos/192.168.0.104:60788\r\n\tSuppressed: reactor.core.publisher.FluxOnAssembly$OnAssemblyException: \nError has been observed at the following site(s):\n\t|_ checkpoint ⇢ org.springframework.cloud.gateway.filter.WeightCalculatorWebFilter [DefaultWebFilterChain]\n\t|_ checkpoint ⇢ org.springframework.boot.actuate.metrics.web.reactive.server.MetricsWebFilter [DefaultWebFilterChain]\n\t|_ checkpoint ⇢ HTTP GET "/products/status" [ExceptionHandlingWebHandler]\nStack trace:\r\nCaused by: java.net.ConnectException: Connection refused: no further information\r\n\tat java.base/sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)\r\n\tat java.base/sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:779)\r\n\tat io.netty.channel.socket.nio.NioSocketChannel.doFinishConnect(NioSocketChannel.java:330)\r\n\tat io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:334)\r\n\tat io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:702)\r\n\tat io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:650)\r\n\tat io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:576)\r\n\tat io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493)\r\n\tat io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)\r\n\tat io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)\r\n\tat io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)\r\n\tat java.base/java.lang.Thread.run(Thread.java:834)\r\n" }