Skip to content
This repository has been archived by the owner on Jun 4, 2024. It is now read-only.

Health check UI is not working (Apple M1 with Docker) #93

Closed
ChristianWeyer opened this issue Apr 1, 2022 · 7 comments
Closed

Health check UI is not working (Apple M1 with Docker) #93

ChristianWeyer opened this issue Apr 1, 2022 · 7 comments
Labels
bug Something isn't working

Comments

@ChristianWeyer
Copy link

I am starting the solution with docker-compose up.

The shop UI works, as well as the services/APIs.
However, when trying to navigate to the health check UI at http://localhost:5107/healthchecks-ui, I get this:

image

Did anyone ever see this?
Where to best look for errors?

Thanks.

@ChristianWeyer
Copy link
Author

BTW: I changed SQL Server to this version, for it to work on M1:
mcr.microsoft.com/azure-sql-edge

@amolenk
Copy link
Collaborator

amolenk commented Apr 2, 2022

Hi @ChristianWeyer

I can repro this on my M1 Mac Mini

Looking at the container logs of the xabarilcoding/healthchecksui container, I see the following:

Unhandled exception. System.IO.IOException: Function not implemented
   at System.IO.FileSystemWatcher.StartRaisingEvents()
   at System.IO.FileSystemWatcher.StartRaisingEventsIfNotDisposed()
   at System.IO.FileSystemWatcher.set_EnableRaisingEvents(Boolean value)
   at Microsoft.Extensions.FileProviders.Physical.PhysicalFilesWatcher.TryEnableFileSystemWatcher()
   at Microsoft.Extensions.FileProviders.Physical.PhysicalFilesWatcher.CreateFileChangeToken(String filter)
   at Microsoft.Extensions.FileProviders.PhysicalFileProvider.Watch(String filter)
   at Microsoft.Extensions.Configuration.FileConfigurationProvider.<.ctor>b__1_0()
   at Microsoft.Extensions.Primitives.ChangeToken.OnChange(Func`1 changeTokenProducer, Action changeTokenConsumer)
   at Microsoft.Extensions.Configuration.FileConfigurationProvider..ctor(FileConfigurationSource source)
   at Microsoft.Extensions.Configuration.Json.JsonConfigurationSource.Build(IConfigurationBuilder builder)
   at Microsoft.Extensions.Configuration.ConfigurationBuilder.Build()
   at Microsoft.Extensions.Hosting.HostBuilder.BuildAppConfiguration()
   at Microsoft.Extensions.Hosting.HostBuilder.Build()
   at HealthChecks.UI.Image.Program.Main(String[] args) in /src/build/docker-images/HealthChecks.UI.Image/Program.cs:line 13
qemu: uncaught target signal 6 (Aborted) - core dumped

Looks like the container cannot start a file system watcher. I suspect this to be a M1 specific issue.

@ChristianWeyer
Copy link
Author

Would it make sense to report this as an issue to the .NET team? @amolenk?

@ChristianWeyer
Copy link
Author

FYI @amolenk: docker/for-mac#5328

@ChristianWeyer
Copy link
Author

Do you have any idea and/or plans to fix this @amolenk ?

@amolenk amolenk added the bug Something isn't working label Apr 14, 2022
@amolenk
Copy link
Collaborator

amolenk commented Apr 14, 2022

Hi @ChristianWeyer,

Yes, I'm planning to find a fix for this (my main desktop is a M1 Mac Mini, so I'd really like eShopOnDapr to run smoothly on it 😉 ). However, I'm unable to give an exact date for a fix as I don't have much time at the moment to spend on this project. It'll probably be second half of May.

It's interesting that it's only the xabarilcoding/healthchecksui container that has the issue. The other containers also use .NET app settings with the JSON file configuration provider and don't have the issue. Perhaps a difference in .NET version?
My first try for a fix would be to create a new WebStatus microservice that uses the AspNetCore.Diagnostics.HealthChecks package to incorporate the health dashboard instead of directly using their container image (in fact, this is actually the way it was in the original solution). PR's very welcome 😊

@amolenk
Copy link
Collaborator

amolenk commented May 31, 2022

Created a custom container for health status. Now everything works on M1. Tested by pulling repo on a clean M1 machine and running docker-compose up

@amolenk amolenk closed this as completed May 31, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants