Code Monkey home page Code Monkey logo

microservices's Introduction

Microservices

Screenshot 2021-11-30 at 12 32 51

microservices's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

microservices's Issues

nested exception is reactor.netty.http.client.PrematureCloseException: Connection prematurely closed BEFORE response

When I run docker logs apigw I get this error

ERROR [api-gateway,,] 1 --- [or-http-epoll-2] reactor.core.publisher.Operators         : Operator called default onErrorDropped

reactor.core.Exceptions$ErrorCallbackNotImplemented: org.springframework.web.reactive.function.client.WebClientRequestException: Connection prematurely closed BEFORE response; nested exception is reactor.netty.http.client.PrematureCloseException: Connection prematurely closed BEFORE response
Caused by: org.springframework.web.reactive.function.client.WebClientRequestException: Connection prematurely closed BEFORE response; nested exception is reactor.netty.http.client.PrematureCloseException: Connection prematurely closed BEFORE response
        at org.springframework.web.reactive.function.client.ExchangeFunctions$DefaultExchangeFunction.lambda$wrapException$9(ExchangeFunctions.java:141) ~[spring-webflux-5.3.19.jar:5.3.19]
        Suppressed: reactor.core.publisher.FluxOnAssembly$OnAssemblyException:
Error has been observed at the following site(s):
        *__checkpoint ⇢ Request to POST http://zipkin:9411/api/v2/spans [DefaultWebClient]
Original Stack Trace:
                at org.springframework.web.reactive.function.client.ExchangeFunctions$DefaultExchangeFunction.lambda$wrapException$9(ExchangeFunctions.java:141) ~[spring-webflux-5.3.19.jar:5.3.19]
                at reactor.core.publisher.MonoErrorSupplied.subscribe(MonoErrorSupplied.java:55) ~[reactor-core-3.4.17.jar:3.4.17]
                at reactor.core.publisher.Mono.subscribe(Mono.java:4400) ~[reactor-core-3.4.17.jar:3.4.17]
                at reactor.core.publisher.FluxOnErrorResume$ResumeSubscriber.onError(FluxOnErrorResume.java:103) ~[reactor-core-3.4.17.jar:3.4.17]
                at reactor.core.publisher.FluxPeek$PeekSubscriber.onError(FluxPeek.java:222) ~[reactor-core-3.4.17.jar:3.4.17]
                at reactor.core.publisher.FluxPeek$PeekSubscriber.onError(FluxPeek.java:222) ~[reactor-core-3.4.17.jar:3.4.17]
                at reactor.core.publisher.FluxPeek$PeekSubscriber.onError(FluxPeek.java:222) ~[reactor-core-3.4.17.jar:3.4.17]
                at reactor.core.publisher.MonoNext$NextSubscriber.onError(MonoNext.java:93) ~[reactor-core-3.4.17.jar:3.4.17]
                at reactor.core.publisher.MonoFlatMapMany$FlatMapManyMain.onError(MonoFlatMapMany.java:204) ~[reactor-core-3.4.17.jar:3.4.17]
                at reactor.core.publisher.SerializedSubscriber.onError(SerializedSubscriber.java:124) ~[reactor-core-3.4.17.jar:3.4.17]
                at reactor.core.publisher.FluxRetryWhen$RetryWhenMainSubscriber.whenError(FluxRetryWhen.java:225) ~[reactor-core-3.4.17.jar:3.4.17]
                at reactor.core.publisher.FluxRetryWhen$RetryWhenOtherSubscriber.onError(FluxRetryWhen.java:274) ~[reactor-core-3.4.17.jar:3.4.17]
                at reactor.core.publisher.FluxConcatMap$ConcatMapImmediate.drain(FluxConcatMap.java:415) ~[reactor-core-3.4.17.jar:3.4.17]
                at reactor.core.publisher.FluxConcatMap$ConcatMapImmediate.onNext(FluxConcatMap.java:251) ~[reactor-core-3.4.17.jar:3.4.17]
                at reactor.core.publisher.EmitterProcessor.drain(EmitterProcessor.java:491) ~[reactor-core-3.4.17.jar:3.4.17]
                at reactor.core.publisher.EmitterProcessor.tryEmitNext(EmitterProcessor.java:299) ~[reactor-core-3.4.17.jar:3.4.17]
                at reactor.core.publisher.SinkManySerialized.tryEmitNext(SinkManySerialized.java:100) ~[reactor-core-3.4.17.jar:3.4.17]
                at reactor.core.publisher.InternalManySink.emitNext(InternalManySink.java:27) ~[reactor-core-3.4.17.jar:3.4.17]
                at reactor.core.publisher.FluxRetryWhen$RetryWhenMainSubscriber.onError(FluxRetryWhen.java:190) ~[reactor-core-3.4.17.jar:3.4.17]
                at reactor.core.publisher.MonoCreate$DefaultMonoSink.error(MonoCreate.java:201) ~[reactor-core-3.4.17.jar:3.4.17]
                at reactor.netty.http.client.HttpClientConnect$HttpObserver.onUncaughtException(HttpClientConnect.java:399) ~[reactor-netty-http-1.0.18.jar:1.0.18]
                at reactor.netty.ReactorNetty$CompositeConnectionObserver.onUncaughtException(ReactorNetty.java:670) ~[reactor-netty-core-1.0.18.jar:1.0.18]
                at reactor.netty.resources.DefaultPooledConnectionProvider$DisposableAcquire.onUncaughtException(DefaultPooledConnectionProvider.java:205) ~[reactor-netty-core-1.0.18.jar:1.0.18]
                at reactor.netty.resources.DefaultPooledConnectionProvider$PooledConnection.onUncaughtException(DefaultPooledConnectionProvider.java:454) ~[reactor-netty-core-1.0.18.jar:1.0.18]
                at reactor.netty.http.client.HttpClientOperations.onInboundClose(HttpClientOperations.java:294) ~[reactor-netty-http-1.0.18.jar:1.0.18]
                at reactor.netty.channel.ChannelOperationsHandler.channelInactive(ChannelOperationsHandler.java:73) ~[reactor-netty-core-1.0.18.jar:1.0.18]
                at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:262) ~[netty-transport-4.1.76.Final.jar:4.1.76.Final]        
                at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:248) ~[netty-transport-4.1.76.Final.jar:4.1.76.Final]
                at io.netty.channel.AbstractChannelHandlerContext.fireChannelInactive(AbstractChannelHandlerContext.java:241) ~[netty-transport-4.1.76.Final.jar:4.1.76.Final]
                at io.netty.channel.ChannelInboundHandlerAdapter.channelInactive(ChannelInboundHandlerAdapter.java:81) ~[netty-transport-4.1.76.Final.jar:4.1.76.Final]
                at io.netty.handler.codec.http.HttpContentDecoder.channelInactive(HttpContentDecoder.java:235) ~[netty-codec-http-4.1.76.Final.jar:4.1.76.Final]
                at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:262) ~[netty-transport-4.1.76.Final.jar:4.1.76.Final]        
                at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:248) ~[netty-transport-4.1.76.Final.jar:4.1.76.Final]        
                at io.netty.channel.AbstractChannelHandlerContext.fireChannelInactive(AbstractChannelHandlerContext.java:241) ~[netty-transport-4.1.76.Final.jar:4.1.76.Final]
                at io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelInactive(CombinedChannelDuplexHandler.java:418) ~[netty-transport-4.1.76.Final.jar:4.1.76.Final]
                at io.netty.handler.codec.ByteToMessageDecoder.channelInputClosed(ByteToMessageDecoder.java:392) ~[netty-codec-4.1.76.Final.jar:4.1.76.Final]
                at io.netty.handler.codec.ByteToMessageDecoder.channelInactive(ByteToMessageDecoder.java:357) ~[netty-codec-4.1.76.Final.jar:4.1.76.Final]
                at io.netty.handler.codec.http.HttpClientCodec$Decoder.channelInactive(HttpClientCodec.java:326) ~[netty-codec-http-4.1.76.Final.jar:4.1.76.Final]
                at io.netty.channel.CombinedChannelDuplexHandler.channelInactive(CombinedChannelDuplexHandler.java:221) ~[netty-transport-4.1.76.Final.jar:4.1.76.Final]
                at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:262) ~[netty-transport-4.1.76.Final.jar:4.1.76.Final]        
                at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:248) ~[netty-transport-4.1.76.Final.jar:4.1.76.Final]        
                at io.netty.channel.AbstractChannelHandlerContext.fireChannelInactive(AbstractChannelHandlerContext.java:241) ~[netty-transport-4.1.76.Final.jar:4.1.76.Final]
                at io.netty.channel.DefaultChannelPipeline$HeadContext.channelInactive(DefaultChannelPipeline.java:1405) ~[netty-transport-4.1.76.Final.jar:4.1.76.Final]
                at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:262) ~[netty-transport-4.1.76.Final.jar:4.1.76.Final]        
                at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:248) ~[netty-transport-4.1.76.Final.jar:4.1.76.Final]        
                at io.netty.channel.DefaultChannelPipeline.fireChannelInactive(DefaultChannelPipeline.java:901) ~[netty-transport-4.1.76.Final.jar:4.1.76.Final]
                at io.netty.channel.AbstractChannel$AbstractUnsafe$7.run(AbstractChannel.java:813) ~[netty-transport-4.1.76.Final.jar:4.1.76.Final]
                at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:164) ~[netty-common-4.1.76.Final.jar:4.1.76.Final]
                at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:469) ~[netty-common-4.1.76.Final.jar:4.1.76.Final]
                at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:391) ~[netty-transport-classes-epoll-4.1.76.Final.jar:4.1.76.Final]
                at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:986) ~[netty-common-4.1.76.Final.jar:4.1.76.Final]
                at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[netty-common-4.1.76.Final.jar:4.1.76.Final]
                at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[netty-common-4.1.76.Final.jar:4.1.76.Final]
                at java.base/java.lang.Thread.run(Thread.java:833) ~[na:na]
Caused by: reactor.netty.http.client.PrematureCloseException: Connection prematurely closed BEFORE response

2022-07-24 14:25:29.789  WARN [api-gateway,,] 1 --- [or-http-epoll-1] io.netty.channel.epoll.EpollEventLoop    : Unexpected exception in the selector loop.

io.netty.channel.unix.Errors$NativeIoException: epoll_wait(..) failed: Function not implemented

Any idea on how to fix this cant get past this

Request processing error; nested exception is fake.Exception RetryableException: Connection timeout expired when executing GET http://fraud:8081/api/v1/fraud-check/6

I'm doing a microservices deployment in k8s.
Zipkin shows error: Request processing error; nested exception is fake.Exception RetryableException: Connection timeout expired when executing GET http://fraud:8081/api/v1/fraud-check/6 .
Rabbitmq is not working.
I can't figure out what's going on.

https://github.com/codersergg/microservices-and-distributed-systems

NAME READY STATUS RESTARTS AGE
pod/customer-5b8d7cd7dd-7ppkv 1/1 Running 2 (22m ago) 45m
pod/fraud-bc6fb777c-6fkdp 1/1 Running 2 (22m ago) 43m
pod/notification-79997f988c-snwx7 1/1 Running 2 (22m ago) 44m
pod/postgres-0 1/1 Running 2 (22m ago) 55m
pod/rabbitmq-0 1/1 Running 4 (22m ago) 55m
pod/zipkin-0 1/1 Running 2 (22m ago) 55m

NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/customer LoadBalancer 10.104.88.212 127.0.0.1 80:31989/TCP 45m
service/fraud NodePort 10.102.20.243 80:30348/TCP 43m
service/kubernetes ClusterIP 10.96.0.1 443/TCP 56m
service/notification NodePort 10.101.126.40 80:31045/TCP 44m
service/rabbitmq NodePort 10.97.190.10 15672:31672/TCP,5672:30672/TCP 55m
service/zipkin LoadBalancer 10.107.29.196 127.0.0.1 9411:31734/TCP 55m

NAME READY UP-TO-DATE AVAILABLE AGE
deployment.apps/customer 1/1 1 1 45m
deployment.apps/fraud 1/1 1 1 43m
deployment.apps/notification 1/1 1 1 44m

NAME DESIRED CURRENT READY AGE
replicaset.apps/customer-5b8d7cd7dd 1 1 1 45m
replicaset.apps/fraud-bc6fb777c 1 1 1 43m
replicaset.apps/notification-79997f988c 1 1 1 44m

NAME READY AGE
statefulset.apps/postgres 1/1 55m
statefulset.apps/rabbitmq 1/1 55m
statefulset.apps/zipkin 1/1 55m

salem alaykom brother

i have a problem when i sending request to the notification microservice , rabbitmq didnt receive the request and i got this message

2022-05-08 10:03:34.390 INFO [customer,eafc83ec63be9b99,dbcbc950693251ce] 18336 --- [nio-8080-exec-2] com.bramli.amqp.RabbitMQMessageProducer : Publishing to internal.exchange using routingKey internal.notification.routing-key. Payload: NotificationRequest[toCustomerId=1, toCustomerName=[email protected], message=Hi Mohamed, welcome to Amigoscode...]
2022-05-08 10:03:34.399 INFO [customer,eafc83ec63be9b99,dbcbc950693251ce] 18336 --- [nio-8080-exec-2] o.s.a.r.c.CachingConnectionFactory : Attempting to connect to: [localhost:5672]
2022-05-08 10:03:34.553 INFO [customer,eafc83ec63be9b99,dbcbc950693251ce] 18336 --- [nio-8080-exec-2] o.s.a.r.c.CachingConnectionFactory : Created new connection: rabbitConnectionFactory#62f3ad90:0/SimpleConnection@55adccf1 [delegate=amqp://[email protected]:5672/, localPort= 64503]
2022-05-08 10:03:34.630 INFO [customer,eafc83ec63be9b99,dbcbc950693251ce] 18336 --- [nio-8080-exec-2] com.bramli.amqp.RabbitMQMessageProducer : Published to internal.exchange using routingKey internal.notification.routing-key. Payload: NotificationRequest[toCustomerId=1, toCustomerName=[email protected], message=Hi Mohamed, welcome to Amigoscode...]
2022-05-08 10:03:34.641 ERROR [customer,,] 18336 --- [ 127.0.0.1:5672] o.s.a.r.c.CachingConnectionFactory : Shutdown Signal: channel error; protocol method: #method<channel.close>(reply-code=404, reply-text=NOT_FOUND - no exchange 'internal.exchange' in vhost '/', class-id=60, method-id=40)

It does not create the pom.xml file at module creation

I've started creating the first module, customer and by default it does not create the pom.xml for that module.

Steps to solve:

  • manually create the pom file and try to add the minimum instances so to follow as the course goes, like project, parent artifactId, packaging(jar)
  • issue: invalid packaging for parent POM com.sdbbackend:sergservices:1.0-SNAPSHOT (/Users/path-to-pom/proj/sergservices/pom.xml), must be "pom" but is "jar"
  • checked with your source code, you have jar as packaging

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.