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

Microservices eBook & Samples updated to .NET Core 2.2 #26

Open
nishanil opened this Issue Jan 9, 2019 · 9 comments

Comments

Projects
None yet
3 participants
@nishanil
Copy link

nishanil commented Jan 9, 2019

πŸŽ‰We just published the v2.2 of the Microservices eBook.πŸŽ‰

The new version covers the built-in health checks feature that was released in ASP .NET Core 2.2 and other updates from .NET Core 2.2.

Download: https://aka.ms/microservicesebook βœ”

The Reference Sample https://github.com/dotnet-architecture/eshopOnContainers is also updated.

cover-med

Do check them out and let us know your feedback!

Thank You!

@wdhastings

This comment has been minimized.

Copy link

wdhastings commented Jan 9, 2019

Working fine for me on docker compose, but failing on a local kubernetes deployment. The containers for both the webmvc and webspa will not run. I don't think they have to run on docker-compose but kubernetes will not keep the pods alive if the program exits.

Here's the error being thrown in the kubernetes log from webspa:

Unhandled Exception: System.ArgumentNullException: Value cannot be null. Parameter name: url at Guard.ArgumentNotNullOrEmpty(String argumentName, String value) in /src/src/BuildingBlocks/HealthChecks/src/common/Guard.cs:line 21 at Microsoft.Extensions.HealthChecks.HealthCheckBuilderExtensions.AddUrlCheck(HealthCheckBuilder builder, String url, Func2 checkFunc, TimeSpan cacheDuration) in /src/src/BuildingBlocks/HealthChecks/src/Microsoft.Extensions.HealthChecks/Checks/UrlChecks.cs:line 76
at Microsoft.Extensions.HealthChecks.HealthCheckBuilderExtensions.AddUrlCheck(HealthCheckBuilder builder, String url, TimeSpan cacheDuration) in /src/src/BuildingBlocks/HealthChecks/src/Microsoft.Extensions.HealthChecks/Checks/UrlChecks.cs:line 23
at eShopConContainers.WebSPA.Startup.b__6_0(HealthCheckBuilder checks) in /src/src/Web/WebSPA/Startup.cs:line 49
at Microsoft.Extensions.DependencyInjection.HealthCheckServiceCollectionExtensions.AddHealthChecks(IServiceCollection services, Action1 checks) in /src/src/BuildingBlocks/HealthChecks/src/Microsoft.Extensions.HealthChecks/HealthCheckServiceCollectionExtensions.cs:line 27 at eShopConContainers.WebSPA.Startup.ConfigureServices(IServiceCollection services) in /src/src/Web/WebSPA/Startup.cs:line 42 --- End of stack trace from previous location where exception was thrown --- at Microsoft.AspNetCore.Hosting.ConventionBasedStartup.ConfigureServices(IServiceCollection services) at Microsoft.AspNetCore.Hosting.Internal.WebHost.EnsureApplicationServices() at Microsoft.AspNetCore.Hosting.Internal.WebHost.Initialize() at Microsoft.AspNetCore.Hosting.WebHostBuilder.Build() at eShopConContainers.WebSPA.Program.Main(String[] args) in /src/src/Web/WebSPA/Program.cs:line 13

All other pods are running. Webstatus is reachable but is reporting all services as unhealthy.

Update: If you'd like to fix this, the problem is that you have incorrect URL strings in your Startup.cs. You're referencing strings with "HC" at the end, e.g. "PurchaseUrlHC" when those aren't defined in your config file.

@nishanil

This comment has been minimized.

Copy link

nishanil commented Jan 9, 2019

@wdhastings We're looking into this right now. I will keep you posted.

@wdhastings

This comment has been minimized.

Copy link

wdhastings commented Jan 9, 2019

@nishanil Thank you. I noticed that the basket service is also not working on kubernetes even though the service is up and reports healthy. It does work on docker-compose. I haven't had a chance to troubleshoot it, but I'll look later if you don't get to it.

@nishanil

This comment has been minimized.

Copy link

nishanil commented Jan 10, 2019

@wdhastings It looks like our CI systems did not push newer images to Docker Hub. Can you check now?

@fabricioveronez

This comment has been minimized.

Copy link

fabricioveronez commented Jan 10, 2019

Where is the ePub version ?

@wdhastings

This comment has been minimized.

Copy link

wdhastings commented Jan 10, 2019

@nishanil All seems good now, at least on Edge. Chrome is giving me a security violation trying to load jquery:

Refused to load the script 'http://localhost/identity/lib/jquery/jquery.js' because it violates the following Content Security Policy directive: "script-src 'unsafe-inline'". Note that 'script-src-elem' was not explicitly set, so 'script-src' is used as a fallback.

@wdhastings

This comment has been minimized.

Copy link

wdhastings commented Jan 10, 2019

@nishanil I spoke too soon. I'm still getting a 500 error trying to add to the cart, even on Edge. The error returned is:

HTTP500: SERVER ERROR - The server encountered an unexpected condition that prevented it from fulfilling the request. (XHR)POST - http://localhost/webshoppingapigw/api/v1/basket/

The webstatus service is reporting all services as healthy. I'm sorry I don't have more time to investigate right now.

@nishanil

This comment has been minimized.

Copy link

nishanil commented Jan 11, 2019

@fabricioveronez eReader formats will be available soon.

@nishanil

This comment has been minimized.

Copy link

nishanil commented Jan 17, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment