Good afternoon,
I'm a rookie working with ABP framework, i'm having some difficulties. I have two microservices created in two different solutions, and i want to use the enpoints of one microservice into the other integrating the two. I was thinking generating a nugget package to install in the other service. But your tutorial for the deveopment of the microservices in the ABP framework are created in the same solution. What methodology do you recommend for this integration?
Best regards, Renata Mendes
3 Answer(s)
-
0
Hello,
I would suggest checking microservice startup template docs to understand the components of the microservice template.
If you are only interested in communication between microservices, there are two ways to achieve this; synchronous communication and asynchronous communication.
-
0
Good afternoon,
I decided to test the microservice startup template indicated for microservices development. I Created with ui blazor server and abp in version 5.0.0. I executed the solution with Tye, but when run the AuthServer application it's not working. AuthServer's log file:
[WRN] None of the specified endpoints were reachable RabbitMQ.Client.Exceptions.BrokerUnreachableException: None of the specified endpoints were reachable ---> RabbitMQ.Client.Exceptions.AuthenticationFailureException: ACCESS_REFUSED - Login was refused using authentication mechanism PLAIN. For details see the broker logfile. at RabbitMQ.Client.Framing.Impl.Connection.StartAndTune() at RabbitMQ.Client.Framing.Impl.Connection.Open(Boolean insist) at RabbitMQ.Client.Framing.Impl.Connection..ctor(IConnectionFactory factory, Boolean insist, IFrameHandler frameHandler, String clientProvidedName) at RabbitMQ.Client.Framing.Impl.AutorecoveringConnection.Init(IFrameHandler fh) at RabbitMQ.Client.Framing.Impl.AutorecoveringConnection.Init(IEndpointResolver endpoints) at RabbitMQ.Client.ConnectionFactory.CreateConnection(IEndpointResolver endpointResolver, String clientProvidedName) --- End of inner exception stack trace --- at RabbitMQ.Client.ConnectionFactory.CreateConnection(IEndpointResolver endpointResolver, String clientProvidedName) at RabbitMQ.Client.ConnectionFactory.CreateConnection(String clientProvidedName) at RabbitMQ.Client.ConnectionFactory.CreateConnection() at Volo.Abp.RabbitMQ.ConnectionPool.<>c__DisplayClass8_0.<Get>b__1() at System.Lazy
1.ViaFactory(LazyThreadSafetyMode mode) --- End of stack trace from previous location --- at System.Lazy
1.CreateValue() at System.Lazy1.CreateValue() at System.Lazy
1.get_Value() at Volo.Abp.RabbitMQ.ConnectionPool.Get(String connectionName) at Volo.Abp.RabbitMQ.ChannelPool.CreateChannel(String channelName, String connectionName) at Volo.Abp.RabbitMQ.ChannelPool.<>c__DisplayClass19_0.<Acquire>b__0(String _) at System.Collections.Concurrent.ConcurrentDictionary2.GetOrAdd(TKey key, Func
2 valueFactory) at Volo.Abp.RabbitMQ.ChannelPool.Acquire(String channelName, String connectionName) at Volo.Abp.BackgroundJobs.RabbitMQ.JobQueue1.EnsureInitializedAsync() at Volo.Abp.BackgroundJobs.RabbitMQ.JobQueue
1.StartAsync(CancellationToken cancellationToken) at Volo.Abp.BackgroundJobs.RabbitMQ.JobQueueManager.StartAsync(CancellationToken cancellationToken) at Nito.AsyncEx.Synchronous.TaskExtensions.WaitAndUnwrapException(Task task) at Nito.AsyncEx.AsyncContext.<>c__DisplayClass15_0.<Run>b__0(Task t) at System.Threading.Tasks.ContinuationTaskFromTask.InnerInvoke() at System.Threading.Tasks.Task.<>c.<.cctor>b__272_0(Object obj) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) --- End of stack trace from previous location --- at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread) --- End of stack trace from previous location --- at Nito.AsyncEx.Synchronous.TaskExtensions.WaitAndUnwrapException(Task task) at Nito.AsyncEx.AsyncContext.Run(Func1 action) at Volo.Abp.Threading.AsyncHelper.RunSync(Func
1 action) at Volo.Abp.BackgroundJobs.RabbitMQ.AbpBackgroundJobsRabbitMqModule.StartJobQueueManager(ApplicationInitializationContext context) at Volo.Abp.BackgroundJobs.RabbitMQ.AbpBackgroundJobsRabbitMqModule.OnApplicationInitialization(ApplicationInitializationContext context) at Volo.Abp.Modularity.OnApplicationInitializationModuleLifecycleContributor.Initialize(ApplicationInitializationContext context, IAbpModule module) at Volo.Abp.Modularity.ModuleManager.InitializeModules(ApplicationInitializationContext context) 2022-01-31 16:24:40.788 +00:00 [FTL] Application startup exception Volo.Abp.AbpInitializationException: An error occurred during the initialize Volo.Abp.Modularity.OnApplicationInitializationModuleLifecycleContributor phase of the module Volo.Abp.BackgroundJobs.RabbitMQ.AbpBackgroundJobsRabbitMqModule, Volo.Abp.BackgroundJobs.RabbitMQ, Version=5.0.0.0, Culture=neutral, PublicKeyToken=null: None of the specified endpoints were reachable. See the inner exception for details. ---> RabbitMQ.Client.Exceptions.BrokerUnreachableException: None of the specified endpoints were reachable ---> RabbitMQ.Client.Exceptions.AuthenticationFailureException: ACCESS_REFUSED - Login was refused using authentication mechanism PLAIN. For details see the broker logfile. at RabbitMQ.Client.Framing.Impl.Connection.StartAndTune() at RabbitMQ.Client.Framing.Impl.Connection.Open(Boolean insist) at RabbitMQ.Client.Framing.Impl.Connection..ctor(IConnectionFactory factory, Boolean insist, IFrameHandler frameHandler, String clientProvidedName) at RabbitMQ.Client.Framing.Impl.AutorecoveringConnection.Init(IFrameHandler fh) at RabbitMQ.Client.Framing.Impl.AutorecoveringConnection.Init(IEndpointResolver endpoints) at RabbitMQ.Client.ConnectionFactory.CreateConnection(IEndpointResolver endpointResolver, String clientProvidedName) --- End of inner exception stack trace --- at RabbitMQ.Client.ConnectionFactory.CreateConnection(IEndpointResolver endpointResolver, String clientProvidedName) at RabbitMQ.Client.ConnectionFactory.CreateConnection(String clientProvidedName) at RabbitMQ.Client.ConnectionFactory.CreateConnection() at Volo.Abp.RabbitMQ.ConnectionPool.<>c__DisplayClass8_0.<Get>b__1() at System.Lazy1.ViaFactory(LazyThreadSafetyMode mode) --- End of stack trace from previous location --- at System.Lazy
1.CreateValue() at System.Lazy1.CreateValue() at System.Lazy
1.get_Value() at Volo.Abp.RabbitMQ.ConnectionPool.Get(String connectionName) at Volo.Abp.RabbitMQ.ChannelPool.CreateChannel(String channelName, String connectionName) at Volo.Abp.RabbitMQ.ChannelPool.<>c__DisplayClass19_0.<Acquire>b__0(String _) at System.Collections.Concurrent.ConcurrentDictionary2.GetOrAdd(TKey key, Func
2 valueFactory) at Volo.Abp.RabbitMQ.ChannelPool.Acquire(String channelName, String connectionName) at Volo.Abp.BackgroundJobs.RabbitMQ.JobQueue1.EnsureInitializedAsync() at Volo.Abp.BackgroundJobs.RabbitMQ.JobQueue
1.StartAsync(CancellationToken cancellationToken) at Volo.Abp.BackgroundJobs.RabbitMQ.JobQueueManager.StartAsync(CancellationToken cancellationToken) at Nito.AsyncEx.Synchronous.TaskExtensions.WaitAndUnwrapException(Task task) at Nito.AsyncEx.AsyncContext.<>c__DisplayClass15_0.<Run>b__0(Task t) at System.Threading.Tasks.ContinuationTaskFromTask.InnerInvoke() at System.Threading.Tasks.Task.<>c.<.cctor>b__272_0(Object obj) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) --- End of stack trace from previous location --- at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread) --- End of stack trace from previous location --- at Nito.AsyncEx.Synchronous.TaskExtensions.WaitAndUnwrapException(Task task) at Nito.AsyncEx.AsyncContext.Run(Func1 action) at Volo.Abp.Threading.AsyncHelper.RunSync(Func
1 action) at Volo.Abp.BackgroundJobs.RabbitMQ.AbpBackgroundJobsRabbitMqModule.StartJobQueueManager(ApplicationInitializationContext context) at Volo.Abp.BackgroundJobs.RabbitMQ.AbpBackgroundJobsRabbitMqModule.OnApplicationInitialization(ApplicationInitializationContext context) at Volo.Abp.Modularity.OnApplicationInitializationModuleLifecycleContributor.Initialize(ApplicationInitializationContext context, IAbpModule module) at Volo.Abp.Modularity.ModuleManager.InitializeModules(ApplicationInitializationContext context) --- End of inner exception stack trace --- at Volo.Abp.Modularity.ModuleManager.InitializeModules(ApplicationInitializationContext context) at Volo.Abp.AbpApplicationBase.InitializeModules() at Volo.Abp.AbpApplicationWithExternalServiceProvider.Initialize(IServiceProvider serviceProvider) at Microsoft.AspNetCore.Builder.AbpApplicationBuilderExtensions.InitializeApplication(IApplicationBuilder app) at NBTW.AuthServer.Startup.Configure(IApplicationBuilder app, IWebHostEnvironment env) in ....\source\repos\WorkSpace\NB.Microservice\NBTW\apps\auth-server\src\NBTW.AuthServer\Startup.cs:line 16 at System.RuntimeMethodHandle.InvokeMethod(Object target, Span1& arguments, Signature sig, Boolean constructor, Boolean wrapExceptions) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at Microsoft.AspNetCore.Hosting.ConfigureBuilder.Invoke(Object instance, IApplicationBuilder builder) at Microsoft.AspNetCore.Hosting.ConfigureBuilder.<>c__DisplayClass4_0.<Build>b__0(IApplicationBuilder builder) at Microsoft.AspNetCore.Hosting.GenericWebHostBuilder.<>c__DisplayClass15_0.<UseStartup>b__1(IApplicationBuilder app) at Microsoft.AspNetCore.Mvc.Filters.MiddlewareFilterBuilderStartupFilter.<>c__DisplayClass0_0.<Configure>g__MiddlewareFilterBuilder|0(IApplicationBuilder builder) at Microsoft.AspNetCore.HostFilteringStartupFilter.<>c__DisplayClass0_0.<Configure>b__0(IApplicationBuilder app) at Microsoft.AspNetCore.Hosting.GenericWebHostService.StartAsync(CancellationToken cancellationToken) at Microsoft.Extensions.Hosting.Internal.Host.StartAsync(CancellationToken cancellationToken) at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token) 2022-01-31 16:24:40.798 +00:00 [DBG] Disposed channel pool with no channels in the pool. 2022-01-31 16:24:40.808 +00:00 [FTL] NBTW.AuthServer terminated unexpectedly! Volo.Abp.AbpInitializationException: An error occurred during the initialize Volo.Abp.Modularity.OnApplicationInitializationModuleLifecycleContributor phase of the module Volo.Abp.BackgroundJobs.RabbitMQ.AbpBackgroundJobsRabbitMqModule, Volo.Abp.BackgroundJobs.RabbitMQ, Version=5.0.0.0, Culture=neutral, PublicKeyToken=null: None of the specified endpoints were reachable. See the inner exception for details. ---> RabbitMQ.Client.Exceptions.BrokerUnreachableException: None of the specified endpoints were reachable ---> RabbitMQ.Client.Exceptions.AuthenticationFailureException: ACCESS_REFUSED - Login was refused using authentication mechanism PLAIN. For details see the broker logfile. at RabbitMQ.Client.Framing.Impl.Connection.StartAndTune() at RabbitMQ.Client.Framing.Impl.Connection.Open(Boolean insist) at RabbitMQ.Client.Framing.Impl.Connection..ctor(IConnectionFactory factory, Boolean insist, IFrameHandler frameHandler, String clientProvidedName) at RabbitMQ.Client.Framing.Impl.AutorecoveringConnection.Init(IFrameHandler fh) at RabbitMQ.Client.Framing.Impl.AutorecoveringConnection.Init(IEndpointResolver endpoints) at RabbitMQ.Client.ConnectionFactory.CreateConnection(IEndpointResolver endpointResolver, String clientProvidedName) --- End of inner exception stack trace --- at RabbitMQ.Client.ConnectionFactory.CreateConnection(IEndpointResolver endpointResolver, String clientProvidedName) at RabbitMQ.Client.ConnectionFactory.CreateConnection(String clientProvidedName) at RabbitMQ.Client.ConnectionFactory.CreateConnection() at Volo.Abp.RabbitMQ.ConnectionPool.<>c__DisplayClass8_0.<Get>b__1() at System.Lazy
1.ViaFactory(LazyThreadSafetyMode mode) --- End of stack trace from previous location --- at System.Lazy1.CreateValue() at System.Lazy
1.CreateValue() at System.Lazy1.get_Value() at Volo.Abp.RabbitMQ.ConnectionPool.Get(String connectionName) at Volo.Abp.RabbitMQ.ChannelPool.CreateChannel(String channelName, String connectionName) at Volo.Abp.RabbitMQ.ChannelPool.<>c__DisplayClass19_0.<Acquire>b__0(String _) at System.Collections.Concurrent.ConcurrentDictionary
2.GetOrAdd(TKey key, Func2 valueFactory) at Volo.Abp.RabbitMQ.ChannelPool.Acquire(String channelName, String connectionName) at Volo.Abp.BackgroundJobs.RabbitMQ.JobQueue
1.EnsureInitializedAsync() at Volo.Abp.BackgroundJobs.RabbitMQ.JobQueue1.StartAsync(CancellationToken cancellationToken) at Volo.Abp.BackgroundJobs.RabbitMQ.JobQueueManager.StartAsync(CancellationToken cancellationToken) at Nito.AsyncEx.Synchronous.TaskExtensions.WaitAndUnwrapException(Task task) at Nito.AsyncEx.AsyncContext.<>c__DisplayClass15_0.<Run>b__0(Task t) at System.Threading.Tasks.ContinuationTaskFromTask.InnerInvoke() at System.Threading.Tasks.Task.<>c.<.cctor>b__272_0(Object obj) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) --- End of stack trace from previous location --- at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread) --- End of stack trace from previous location --- at Nito.AsyncEx.Synchronous.TaskExtensions.WaitAndUnwrapException(Task task) at Nito.AsyncEx.AsyncContext.Run(Func
1 action) at Volo.Abp.Threading.AsyncHelper.RunSync(Func1 action) at Volo.Abp.BackgroundJobs.RabbitMQ.AbpBackgroundJobsRabbitMqModule.StartJobQueueManager(ApplicationInitializationContext context) at Volo.Abp.BackgroundJobs.RabbitMQ.AbpBackgroundJobsRabbitMqModule.OnApplicationInitialization(ApplicationInitializationContext context) at Volo.Abp.Modularity.OnApplicationInitializationModuleLifecycleContributor.Initialize(ApplicationInitializationContext context, IAbpModule module) at Volo.Abp.Modularity.ModuleManager.InitializeModules(ApplicationInitializationContext context) --- End of inner exception stack trace --- at Volo.Abp.Modularity.ModuleManager.InitializeModules(ApplicationInitializationContext context) at Volo.Abp.AbpApplicationBase.InitializeModules() at Volo.Abp.AbpApplicationWithExternalServiceProvider.Initialize(IServiceProvider serviceProvider) at Microsoft.AspNetCore.Builder.AbpApplicationBuilderExtensions.InitializeApplication(IApplicationBuilder app) at NBTW.AuthServer.Startup.Configure(IApplicationBuilder app, IWebHostEnvironment env) in ...\source\repos\WorkSpace\NB.Microservice\NBTW\apps\auth-server\src\NBTW.AuthServer\Startup.cs:line 16 at System.RuntimeMethodHandle.InvokeMethod(Object target, Span
1& arguments, Signature sig, Boolean constructor, Boolean wrapExceptions) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at Microsoft.AspNetCore.Hosting.ConfigureBuilder.Invoke(Object instance, IApplicationBuilder builder) at Microsoft.AspNetCore.Hosting.ConfigureBuilder.<>c__DisplayClass4_0.<Build>b__0(IApplicationBuilder builder) at Microsoft.AspNetCore.Hosting.GenericWebHostBuilder.<>c__DisplayClass15_0.<UseStartup>b__1(IApplicationBuilder app) at Microsoft.AspNetCore.Mvc.Filters.MiddlewareFilterBuilderStartupFilter.<>c__DisplayClass0_0.<Configure>g__MiddlewareFilterBuilder|0(IApplicationBuilder builder) at Microsoft.AspNetCore.HostFilteringStartupFilter.<>c__DisplayClass0_0.<Configure>b__0(IApplicationBuilder app) at Microsoft.AspNetCore.Hosting.GenericWebHostService.StartAsync(CancellationToken cancellationToken) at Microsoft.Extensions.Hosting.Internal.Host.StartAsync(CancellationToken cancellationToken) at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token) at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token) at NBTW.AuthServer.Program.Main(String[] args) in ....\source\repos\WorkSpace\NB.Microservice\NBTW\apps\auth-server\src\NBTW.AuthServer\Program.cs:line 22 -
0
This is a different and duplicate question. You can check the answer for this problem in issue#2512.