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

Docker images do not work on M1 machine #327

Open
kushalhalder opened this issue Dec 2, 2022 · 6 comments
Open

Docker images do not work on M1 machine #327

kushalhalder opened this issue Dec 2, 2022 · 6 comments
Assignees
Labels
type: bug Something isn't working

Comments

@kushalhalder
Copy link

What happened:
Docker run fails on M1 machines
What you expected to happen:
Atleast docker pull .... --platform linux/amd64 or x86_64 to work
How to reproduce it:
Run

docker run --name synapse -v /var/run/docker.sock:/var/run/docker.sock -p 42286:42286 -p 41387:41387 ghcr.io/serverlessworkflow/synapse:latest --platform linux/x86_64

Anything else we need to know?:

Environment: M1 machine

@cdavernas
Copy link
Member

Hello @kushalhalder! I do not have an M1 at hand to check that issue. Do you have further info? What is the error returned by Docker? Can you also try without the platform flag?

@kushalhalder
Copy link
Author

Hi @cdavernas
Thanks for looking into the issue.
The following are the 3 ways I am trying to start the server.

$ synctl system install docker

WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
da42e827f6f93173313c9369e67ac27f0a0b2935f80f8868c5ba735a3ded49a9

With Docker run:

$ docker run --name synapse -v /var/run/docker.sock:/var/run/docker.sock -p 42286:42286 -p 41387:41387 ghcr.io/serverlessworkflow/synapse:latest --platform linux/x86_64

WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested

With docker run without platform:

$ docker run --name synapse -v /var/run/docker.sock:/var/run/docker.sock -p 42286:42286 -p 41387:41387 ghcr.io/serverlessworkflow/synapse:latest

WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested

However, with all the above 3 commands, the server shuts down with this:

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.ConfigurationManager.AddSource(IConfigurationSource source)
   at Microsoft.Extensions.Configuration.ConfigurationManager.Microsoft.Extensions.Configuration.IConfigurationBuilder.Add(IConfigurationSource source)
   at Microsoft.Extensions.Configuration.ConfigurationExtensions.Add[TSource](IConfigurationBuilder builder, Action`1 configureSource)
   at Microsoft.Extensions.Configuration.JsonConfigurationExtensions.AddJsonFile(IConfigurationBuilder builder, IFileProvider provider, String path, Boolean optional, Boolean reloadOnChange)
   at Microsoft.Extensions.Configuration.JsonConfigurationExtensions.AddJsonFile(IConfigurationBuilder builder, String path, Boolean optional, Boolean reloadOnChange)
   at Microsoft.Extensions.Hosting.HostingHostBuilderExtensions.<>c__DisplayClass11_0.<ConfigureDefaults>b__1(HostBuilderContext hostingContext, IConfigurationBuilder config)
   at Microsoft.AspNetCore.Hosting.BootstrapHostBuilder.RunDefaultCallbacks(ConfigurationManager configuration, HostBuilder innerBuilder)
   at Microsoft.AspNetCore.Builder.WebApplicationBuilder..ctor(WebApplicationOptions options, Action`1 configureDefaults)
   at Microsoft.AspNetCore.Builder.WebApplication.CreateBuilder(String[] args)
   at Program.<Main>$(String[] args) in /src/src/apps/Synapse.Server/Program.cs:line 32
   at Program.<Main>(String[] args)
qemu: uncaught target signal 6 (Aborted) - core dumped

@kushalhalder
Copy link
Author

Hi @cdavernas,
I have an M1 machine, if you need me to build an image for you, I can do that :)

@cdavernas
Copy link
Member

@kushalhalder sorry for the long delay, I've been working on the alpha and the HA refactoring.
Could you work around the issue? Looks like a missing .ET feature on Mac: FileWatcher's raise events..
Yeah, the image would be a bug plus indeed, thank you!

@cdavernas cdavernas self-assigned this Dec 22, 2022
@cdavernas cdavernas added the type: bug Something isn't working label Dec 22, 2022
@vsai-zuora
Copy link

Hi @kushalhalder, I am also facing the same issue on my M1 mac. could you elaborate on how to work around this issue? thanks.

@cdavernas
Copy link
Member

@kushalhalder @vsai-zuora did you manage to resolve that issue? Wanna make sure to fix it in 1.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants