serverlessworkflow / synapse

Serverless Workflow Management System (WFMS)
https://serverlessworkflow.io
Apache License 2.0
222 stars 35 forks source link

Docker images do not work on M1 machine #327

Closed kushalhalder closed 2 months ago

kushalhalder commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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

cdavernas commented 1 year ago

@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!

vsai-zuora commented 1 year ago

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 commented 3 months ago

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

cdavernas commented 2 months ago

Closing as stale