Reputation: 469
I have following spring-boot setup.
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" }
Upvotes: 2
Views: 3742
Reputation: 469
I mentioned in the original post as follows:
After some thought and R & D, I realized that I need to start Albums before API Gateway. So the final order is Eureka discovery service, Albums, API Gateway.
The reason being as follows:
If I start API Gateway first, then it will not fetch the address of Albums Microservice from Eureka because the Albums Microservice has not started yet.
Just by changing the order solved my problem. As soon as the API gateway start I am able to access the Albums (without having to wait).
Upvotes: 2