Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The catalog service is not loading and so the products page is throwing an error #189

Closed
justinfraz opened this issue Sep 6, 2023 · 11 comments

Comments

@justinfraz
Copy link

Hello!

In the Tye dashboard, all the other services are loading fine except for the catalog service. It is throwing an error like so:

This site can’t be reachedlocalhost refused to connect.
Try:

Checking the connection
Checking the proxy and the firewall
ERR_CONNECTION_REFUSED

Is there a firewall configuration that I should implement?

As a result of the catalog service being down, the Products page is throwing an error like so:

An error has occurred!
Http failure response for https://localhost:44354/api/catalog/product/paged: 0 Unknown Error

Best Regards,

Justin

@jflaga
Copy link

jflaga commented Sep 8, 2023

Please check the logs of the Catalog microservice, then paste here the error you see in there.

@justinfraz
Copy link
Author

Could you please tell me the location where I can check the logs?

@jflaga
Copy link

jflaga commented Sep 11, 2023

The logs for Catalog microservice is in \eShopOnAbp\services\catalog\src\EShopOnAbp.CatalogService.HttpApi.Host\Logs\logs.txt

@justinfraz
Copy link
Author

The log file is quite long. Is there an email address that I could mail it to?

@gterdem
Copy link
Contributor

gterdem commented Sep 12, 2023

Delete all the lines of the log.
Start the request for the catalog view. Check the logs for [ERR] and share it please.

@justinfraz
Copy link
Author

justinfraz commented Sep 12, 2023

I ran run-tye.ps1 and all the services were up and running in the Tye dashboard. The catalog service loaded fine. The PublicWeb site loaded fine and I was able to login. All good.

@justinfraz
Copy link
Author

The PublicWeb site is loading fine but when I proceed to complete the payment using the home or work addresses, demo card or paypal, I'm getting the following exception:

Volo.Abp.Http.Client.AbpRemoteCallException: Unauthorized
at Volo.Abp.Http.Client.ClientProxying.ClientProxyBase1.ThrowExceptionForResponseAsync(HttpResponseMessage response) at Volo.Abp.Http.Client.ClientProxying.ClientProxyBase1.RequestAsync(ClientProxyRequestContext requestContext)
at Volo.Abp.Http.Client.ClientProxying.ClientProxyBase1.RequestAsync[T](ClientProxyRequestContext requestContext) at Volo.Abp.Http.Client.ClientProxying.ClientProxyBase1.RequestAsync[T](String methodName, ClientProxyRequestTypeValue arguments)
at EShopOnAbp.OrderingService.Orders.ClientProxies.OrderClientProxy.CreateAsync(OrderCreateDto input) in C:\Users\jstnf\Downloads\ABPeShop\services\ordering\src\EShopOnAbp.OrderingService.HttpApi.Client\ClientProxies\OrderClientProxy.Generated.cs:line 85
at EShopOnAbp.PublicWeb.Pages.PaymentModel.OnPostAsync(PaymentPageViewModel model) in C:\Users\jstnf\Downloads\ABPeShop\apps\public-web\src\EShopOnAbp.PublicWeb\Pages\Payment.cshtml.cs:line 59
at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.ExecutorFactory.GenericTaskHandlerMethod.Convert[T](Object taskAsObject)
at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.ExecutorFactory.GenericTaskHandlerMethod.Execute(Object receiver, Object[] arguments)
at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.InvokeHandlerMethodAsync()
at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.InvokeNextPageFilterAsync()
at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.Rethrow(PageHandlerExecutedContext context)
at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.InvokeInnerFilterAsync()
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|26_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ExceptionContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Logged|17_1(ResourceInvoker invoker)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Logged|17_1(ResourceInvoker invoker)
at Microsoft.AspNetCore.Routing.EndpointMiddleware.g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
at EShopOnAbp.PublicWeb.AnonymousUser.AnonymousUserMiddleware.InvokeAsync(HttpContext context) in C:\Users\jstnf\Downloads\ABPeShop\apps\public-web\src\EShopOnAbp.PublicWeb\AnonymousUser\AnonymousUserMiddleware.cs:line 35
at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
at Volo.Abp.AspNetCore.Serilog.AbpSerilogMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<b__1>d.MoveNext()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
at Volo.Abp.AspNetCore.Tracing.AbpCorrelationIdMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<b__1>d.MoveNext()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Localization.RequestLocalizationMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.RequestLocalization.AbpRequestLocalizationMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<b__1>d.MoveNext()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddlewareImpl.Invoke(HttpContext context)

@jflaga
Copy link

jflaga commented Sep 13, 2023

Hi @justinfraz , you might find the more specific error if you look at the logs in the Payment microservice: \eShopOnAbp\services\payment\src\EShopOnAbp.PaymentService.HttpApi.Host\Logs\logs.txt

Scroll to the bottommost messages, then look for the date and time which matches with the date-time when the error occurred. The error message looks similar to this (with [ERR]

...
2023-05-08 03:08:20.453 +08:00 [ERR] ...
...

Paste the error message here.

If you see two error messages which looks different, paste the two messages here.

An example error message looks like this:

2023-05-08 03:34:09.256 +08:00 [ERR] 42P01: relation "AbpPermissionGroups" does not exist

POSITION: 69
Npgsql.PostgresException (0x80004005): 42P01: relation "AbpPermissionGroups" does not exist

POSITION: 69
   at Npgsql.Internal.NpgsqlConnector.<ReadMessage>g__ReadMessageLong|222_0(NpgsqlConnector connector, Boolean async, DataRowLoadingMode dataRowLoadingMode, Boolean readingNotifications, Boolean isReadingPrependedMessage)
   ...

or like this:

2023-05-04 20:30:21.209 +08:00 [ERR] An exception occurred while iterating over the results of a query for context type 'EShopOnAbp.AdministrationService.EntityFrameworkCore.AdministrationServiceDbContext'.
Npgsql.PostgresException (0x80004005): 42P01: relation "AbpPermissionGroups" does not exist

POSITION: 69
   at Npgsql.Internal.NpgsqlConnector.<ReadMessage>g__ReadMessageLong|222_0(NpgsqlConnector connector, Boolean async, DataRowLoadingMode 
   ...

@justinfraz
Copy link
Author

Here are pretty much the errors of the type that you described above that I have located in the log file:

2023-08-27 18:24:05.963 +10:00 [ERR] ---------- Exception Data ----------
Severity = FATAL
InvariantSeverity = FATAL
SqlState = 3D000
MessageText = database "EShopOnAbp_Administration" does not exist
File = postinit.c
Line = 885
Routine = InitPostgres

2023-09-06 11:36:27.348 +10:00 [ERR] ---------- Exception Data ----------
Severity = FATAL
InvariantSeverity = FATAL
SqlState = 3D000
MessageText = database "EShopOnAbp_Administration" does not exist
File = postinit.c
Line = 885
Routine = InitPostgres

2023-09-06 16:44:24.502 +10:00 [ERR] ---------- Exception Data ----------
Severity = FATAL
InvariantSeverity = FATAL
SqlState = 3D000
MessageText = database "EShopOnAbp_Administration" does not exist
File = postinit.c
Line = 885
Routine = InitPostgres

2023-09-06 16:44:44.551 +10:00 [ERR] ---------- Exception Data ----------
Severity = FATAL
InvariantSeverity = FATAL
SqlState = 3D000
MessageText = database "EShopOnAbp_Administration" does not exist
File = postinit.c
Line = 885
Routine = InitPostgres

2023-09-13 09:58:13.130 +10:00 [ERR] ---------- RemoteServiceErrorInfo ----------
{
"code": null,
"message": "An internal error occurred during your request!",
"details": null,
"data": {},
"validationErrors": null
}

@gterdem
Copy link
Contributor

gterdem commented Sep 13, 2023

Volo.Abp.Http.Client.AbpRemoteCallException: Unauthorized

This is related to #197

The database errors you receive are related to race condition. They have retry mechanisms so it is normal to log errors. We expect them to be consistent eventually.

I'm closing this issue to prevent it flooded with different issues, since the main problem seems resolved.

Please open new issues if you are still having problems.

@gterdem gterdem closed this as completed Sep 13, 2023
@justinfraz
Copy link
Author

Thank you very much @gterdem for helping me resolve this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants