英文:
What's missing from our custom Linux OS that causes "Function not implemented" when building the Grapevine web server?
问题
我们在尝试在自定义的Linux操作系统上运行Grapevine时遇到以下跟踪信息(在Ubuntu 20.04或树莓派上运行时没有看到此问题):
警告:System.IO.IOException:未实现的功能
在System.IO.FileSystemWatcher.StartRaisingEvents()中
在System.IO.FileSystemWatcher.StartRaisingEventsIfNotDisposed()中
在System.IO.FileSystemWatcher.set_EnableRaisingEvents(Boolean value)中
在Microsoft.Extensions.FileProviders.Physical.PhysicalFilesWatcher.TryEnableFileSystemWatcher()中
在Microsoft.Extensions.FileProviders.Physical.PhysicalFilesWatcher.CreateFileChangeToken(String filter)中
在Microsoft.Extensions.FileProviders.PhysicalFileProvider.Watch(String filter)中
在Microsoft.Extensions.Configuration.FileConfigurationProvider.<.ctor>b__1_0()中
在Microsoft.Extensions.Primitives.ChangeToken.ChangeTokenRegistration<1>.<.ctor>(Func<1> changeTokenProducer, Action<1> changeTokenConsumer, TState state)中
在Microsoft.Extensions.Primitives.ChangeToken.OnChange(Func<1> changeTokenProducer, Action changeTokenConsumer)中
在Microsoft.Extensions.Configuration.FileConfigurationProvider..ctor(FileConfigurationSource source)中
在Microsoft.Extensions.Configuration.Json.JsonConfigurationProvider..ctor(JsonConfigurationSource source)中
在Microsoft.Extensions.Configuration.Json.JsonConfigurationSource.Build(IConfigurationBuilder builder)中
在Microsoft.Extensions.Configuration.ConfigurationBuilder.Build()中
显然,我们的自定义操作系统缺少dotnet(以及Grapevine)所依赖的某些内容。是否有人能提供一些关于可能是什么的线索?
我们尝试根据此链接关闭“更改时重新加载”:
(https://stackoverflow.com/questions/60295562/turn-reloadonchange-off-in-config-source-for-webapplicationfactory/69433780#69433780)
但这对我们没有产生任何影响。顺便说一下,关闭文件系统监视器以避免引发此异常将是可接受的解决方法。
英文:
We are seeing the following trace when attempting to run Grapevine on a custom Linux OS (we don't see this running on Ubuntu 20.04 or Raspberry Pi):
WARNING: 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.ChangeTokenRegistration`1..ctor(Func`1 changeTokenProducer, Action`1 changeTokenConsumer, TState state)
at Microsoft.Extensions.Primitives.ChangeToken.OnChange(Func`1 changeTokenProducer, Action changeTokenConsumer)
at Microsoft.Extensions.Configuration.FileConfigurationProvider..ctor(FileConfigurationSource source)
at Microsoft.Extensions.Configuration.Json.JsonConfigurationProvider..ctor(JsonConfigurationSource source)
at Microsoft.Extensions.Configuration.Json.JsonConfigurationSource.Build(IConfigurationBuilder builder)
at Microsoft.Extensions.Configuration.ConfigurationBuilder.Build()
Clearly we're missing something in our custom OS that dotnet (and Grapevine) depends upon. Can anyone provide a clue on what that might be?
We tried turning off 'Reload on change' per this link:
That didn't do anything for us. By the way, turning off the file system watcher so this exception isn't raised would be an acceptable work-around.
答案1
得分: 0
我们已经找到了我们自定义的Linux中缺失的部分!如果您遇到此问题,请确保已将“inotify”功能构建到您的内核中。 Inotify手册页面
英文:
We've found what's missing in our custom Linux! In case you're encountering this issue, make sure you've built "inotify" functionality into your kernel. Inotify Man Page
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论