rtdip / core

Easy access to high volume, historical and real time process data for analytics applications, engineers, and data scientists wherever they are.
Apache License 2.0
46 stars 25 forks source link

Failed to run Docker image on Mac OS #625

Open apletnev opened 10 months ago

apletnev commented 10 months ago

Describe the bug

I'm trying to run RTDP on my local laptop running Mac OS - Sonoma 14.2 (M1 Max), but it fails. Before starting, I've successfully created a docker image as described here (For Macbooks with Apple Silicon chips) section: https://github.com/rtdip/core/tree/develop/src/api#docker-development

Run docker

docker run --platform linux/amd64 -p 8080:80 -it rtdip-api:v0.1.0

The output is next:

docker run --platform linux/amd64 -p 8080:80 -it rtdip-api:v0.1.0
info: Host.Triggers.Warmup[0]
      Initializing Warmup Extension.
info: Host.Startup[503]
      Initializing Host. OperationId: '9393bb9c-ef79-46e2-bec6-e9239ca00503'.
info: Host.Startup[504]
      Host initialization: ConsecutiveErrors=0, StartupCount=1, OperationId=9393bb9c-ef79-46e2-bec6-e9239ca00503
info: Microsoft.Azure.WebJobs.Hosting.OptionsLoggingService[0]
      LoggerFilterOptions
      {
        "MinLevel": "None",
        "Rules": [
          {
            "ProviderName": null,
            "CategoryName": null,
            "LogLevel": null,
            "Filter": "<AddFilter>b__0"
          },
          {
            "ProviderName": null,
            "CategoryName": "Host.Function.ToolingConsoleLog",
            "LogLevel": "Information",
            "Filter": null
          },
          {
            "ProviderName": "Microsoft.Azure.WebJobs.Script.WebHost.Diagnostics.SystemLoggerProvider",
            "CategoryName": null,
            "LogLevel": "None",
            "Filter": null
          },
          {
            "ProviderName": "Microsoft.Azure.WebJobs.Script.WebHost.Diagnostics.SystemLoggerProvider",
            "CategoryName": null,
            "LogLevel": null,
            "Filter": "<AddFilter>b__0"
          }
        ]
      }
info: Microsoft.Azure.WebJobs.Hosting.OptionsLoggingService[0]
      ConcurrencyOptions
      {
        "DynamicConcurrencyEnabled": false,
        "MaximumFunctionConcurrency": 500,
        "CPUThreshold": 0.8,
        "SnapshotPersistenceEnabled": true
      }
info: Microsoft.Azure.WebJobs.Hosting.OptionsLoggingService[0]
      FunctionResultAggregatorOptions
      {
        "BatchSize": 1000,
        "FlushTimeout": "00:00:30",
        "IsEnabled": true
      }
info: Microsoft.Azure.WebJobs.Hosting.OptionsLoggingService[0]
      SingletonOptions
      {
        "LockPeriod": "00:00:15",
        "ListenerLockPeriod": "00:01:00",
        "LockAcquisitionTimeout": "10675199.02:48:05.4775807",
        "LockAcquisitionPollingInterval": "00:00:05",
        "ListenerLockRecoveryPollingInterval": "00:01:00"
      }
info: Microsoft.Azure.WebJobs.Hosting.OptionsLoggingService[0]
      ScaleOptions
      {
        "ScaleMetricsMaxAge": "00:02:00",
        "ScaleMetricsSampleInterval": "00:00:10",
        "MetricsPurgeEnabled": true,
        "IsTargetScalingEnabled": true,
        "IsRuntimeScalingEnabled": false
      }
info: Microsoft.Azure.WebJobs.Hosting.JobHostService[0]
      Starting JobHost
info: Host.Startup[401]
      Starting Host (HostId=68752f21fa61-2137340777, InstanceId=99304db3-aadc-4f8f-b67a-93ebc7ecc22f, Version=4.28.3.3, ProcessId=14, AppDomainId=1, InDebugMode=False, InDiagnosticMode=False, FunctionsExtensionVersion=(null))
info: Host.Startup[314]
      Loading functions metadata
info: Host.Startup[326]
      Reading functions metadata (Custom)
info: Host.Startup[327]
      1 functions found (Custom)
info: Host.Startup[315]
      1 functions loaded
info: Host.Startup[0]
      Generating 1 job function(s)
info: Microsoft.Azure.WebJobs.Script.Workers.Rpc.RpcFunctionInvocationDispatcher[0]
      Worker process started and initialized.
info: Host.Startup[0]
      Found the following functions:
      Host.Functions.v1

info: Microsoft.Azure.WebJobs.Hosting.OptionsLoggingService[0]
      HttpOptions
      {
        "DynamicThrottlesEnabled": false,
        "EnableChunkedRequestBinding": false,
        "MaxConcurrentRequests": -1,
        "MaxOutstandingRequests": -1,
        "RoutePrefix": ""
      }
info: Microsoft.Azure.WebJobs.Script.WebHost.WebScriptHostHttpRoutesManager[0]
      Initializing function HTTP routes
      Mapped function route '/{*route}' [get,post] to 'v1'

info: Host.Startup[412]
      Host initialized (455ms)
info: Host.Startup[413]
      Host started (528ms)
info: Host.Startup[0]
      Job host started
fail: Host.Startup[515]
      A host error has occurred during startup operation '9393bb9c-ef79-46e2-bec6-e9239ca00503'.
      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.Azure.WebJobs.Script.IO.AutoRecoveringFileSystemWatcher.InitializeWatcher() in /src/azure-functions-host/src/WebJobs.Script/IO/AutoRecoveringFileSystemWatcher.cs:line 64
         at Microsoft.Azure.WebJobs.Script.IO.AutoRecoveringFileSystemWatcher..ctor(String path, String filter, Boolean includeSubdirectories, WatcherChangeTypes changeTypes, ILoggerFactory loggerFactory) in /src/azure-functions-host/src/WebJobs.Script/IO/AutoRecoveringFileSystemWatcher.cs:line 43
         at Microsoft.Azure.WebJobs.Script.Eventing.File.FileWatcherEventSource..ctor(IScriptEventManager eventManager, String source, String path, String filter, Boolean includeSubdirectories, WatcherChangeTypes changeTypes, ILoggerFactory loggerFactory) in /src/azure-functions-host/src/WebJobs.Script/Eventing/File/FileWatcherEventSource.cs:line 28
         at Microsoft.Azure.WebJobs.Script.WebHost.FileMonitoringService.InitializeFileWatchers() in /src/azure-functions-host/src/WebJobs.Script.WebHost/FileMonitoringService.cs:line 157
         at Microsoft.Azure.WebJobs.Script.WebHost.FileMonitoringService.StartAsync(CancellationToken cancellationToken) in /src/azure-functions-host/src/WebJobs.Script.WebHost/FileMonitoringService.cs:line 93
         at Microsoft.Extensions.Hosting.Internal.Host.StartAsync(CancellationToken cancellationToken)
         at Microsoft.Azure.WebJobs.Script.WebHost.WebJobsScriptHostService.UnsynchronizedStartHostAsync(ScriptHostStartupOperation activeOperation, Int32 attemptCount, JobHostStartupMode startupMode) in /src/azure-functions-host/src/WebJobs.Script.WebHost/WebJobsScriptHostService.cs:line 362
info: Microsoft.Azure.WebJobs.Hosting.JobHostService[0]
      Stopping JobHost
info: Host.Startup[0]
      Job host stopped
info: Host.Startup[314]
      Loading functions metadata
Hosting environment: Production
Content root path: /azure-functions-host
Now listening on: http://[::]:80
Application started. Press Ctrl+C to shut down.

Use chrome browser: http://localhost:8080/

The output is next: Function host is not running.

To Reproduce

Use Docker development section in official README for Macbook with Apple Silicon https://github.com/rtdip/core/tree/develop/src/api#docker-development

Expected behavior

Should be a Swagger UI

Installation Setup (please complete the following information):

github-actions[bot] commented 1 week ago

This issue is stale because it has been open for 30 days with no activity.