CLI v2.0.1-beta.28 proxies.json 问题
CLI v2.0.1-beta.28 proxies.json issue
我添加到我的项目 proxies.json 文件中,但是之后运行时无法启动并出现异常。有任何想法吗?我已经查看了 GitHub 个问题,但没有任何运气。
我添加了带有 *.csproj 和 proxies.json 文件的要点以供复制。
非常感谢
[02/06/2018 17:10:57] Initializing Azure Function proxies
[02/06/2018 17:10:57] Error processig configuration of Function Proxies
[02/06/2018 17:10:57]
Function host is not running.
[02/06/2018 17:10:59] A ScriptHost error has occurred
[02/06/2018 17:10:59] Autofac: An error occurred during the activation of a particular registration. See the inner exception for details. Registration: Activator = ProxyHandler (ReflectionActivator), Services = [Microsoft.Azure.AppService.Proxy.Runtime.ProxyHandler], Lifetime = Autofac.Core.Lifetime.RootScopeLifetime, Sharing = Shared, Ownership = OwnedByLifetimeScope ---> An error occurred during the activation of a particular registration. See the inner exception fordetails. Registration: Activator = ApiInspectorHandler (ReflectionActivator), Services = [Microsoft.Azure.AppService.Proxy.Runtime.Handlers.ApiInspectorHandler], Lifetime = Autofac.Core.Lifetime.RootScopeLifetime, Sharing = Shared, Ownership = OwnedByLifetimeScope ---> An error occurred during the activation of a particular registration. See the inner exception for details. Registration: Activator = DebugLogStorageService (DelegateActivator), Services = [Microsoft.Azure.AppService.Proxy.Runtime.Logging.IDebugLogService], Lifetime = Autofac.Core.Lifetime.RootScopeLifetime, Sharing = Shared, Ownership = OwnedByLifetimeScope ---> An error occurred during the activation of a particular registration. See the inner exception for details. Registration: Activator = FileSystemStorage (DelegateActivator), Services = [DetailedTrace (Microsoft.Azure.AppService.Proxy.Common.Infra.IBlobStorage)], Lifetime = Autofac.Core.Lifetime.RootScopeLifetime,Sharing = Shared, Ownership = OwnedByLifetimeScope ---> Access to the path '/Users/maciejgos\LogFiles\Application\Proxies\DetailedTrace' is denied. (See inner exception for details.) (See inner exception for details.) (See inner exception for details.) (See inner exception for details.). Autofac: An error occurredduring the activation of a particular registration. See the inner exception for details. Registration: Activator = ApiInspectorHandler (ReflectionActivator),Services = [Microsoft.Azure.AppService.Proxy.Runtime.Handlers.ApiInspectorHandler], Lifetime = Autofac.Core.Lifetime.RootScopeLifetime, Sharing = Shared, Ownership = OwnedByLifetimeScope ---> An error occurred during the activation of a particular registration. See the inner exception for details. Registration: Activator = DebugLogStorageService (DelegateActivator), Services = [Microsoft.Azure.AppService.Proxy.Runtime.Logging.IDebugLogService], Lifetime = Autofac.Core.Lifetime.RootScopeLifetime, Sharing = Shared, Ownership = OwnedByLifetimeScope ---> An error occurred during the activation of a particular registration. See the inner exception for details. Registration: Activator = FileSystemStorage (DelegateActivator), Services = [DetailedTrace (Microsoft.Azure.AppService.Proxy.Common.Infra.IBlobStorage)], Lifetime = Autofac.Core.Lifetime.RootScopeLifetime, Sharing = Shared, Ownership = OwnedByLifetimeScope ---> Access to the path '/Users/maciejgos\LogFiles\Application\Proxies\DetailedTrace' is denied. (See inner exception for details.) (See inner exception for details.) (See inner exception for details.). Autofac: An error occurred during the activation of a particular registration. See the inner exception for details. Registration: Activator= DebugLogStorageService (DelegateActivator), Services = [Microsoft.Azure.AppService.Proxy.Runtime.Logging.IDebugLogService], Lifetime = Autofac.Core.Lifetime.RootScopeLifetime, Sharing = Shared, Ownership = OwnedByLifetimeScope ---> An error occurred during the activation of a particular registration. See the inner exception for details. Registration: Activator = FileSystemStorage (DelegateActivator), Services = [DetailedTrace (Microsoft.Azure.AppService.Proxy.Common.Infra.IBlobStorage)], Lifetime = Autofac.Core.Lifetime.RootScopeLifetime, Sharing = Shared, Ownership = OwnedByLifetimeScope ---> Access to the path '/Users/maciejgos\LogFiles\Application\Proxies\DetailedTrace' is denied. (See inner exception for details.) (See inner exception for details.). Autofac: An error occurred during the activation of a particular registration. See the inner exception for details. Registration: Activator = FileSystemStorage (DelegateActivator), Services = [DetailedTrace (Microsoft.Azure.AppService.Proxy.Common.Infra.IBlobStorage)], Lifetime = Autofac.Core.Lifetime.RootScopeLifetime, Sharing = Shared,Ownership = OwnedByLifetimeScope ---> Access to the path '/Users/maciejgos\LogFiles\Application\Proxies\DetailedTrace' is denied. (See inner exception for details.). System.IO.FileSystem: Access to the path '/Users/maciejgos\LogFiles\Application\Proxies\DetailedTrace' is denied. Permission denied.
[02/06/2018 17:10:59] Stopping Host
https://gist.github.com/maciejgos/4bc0650aa72dd94e61b798e94da83aeb
我今天观察到的另一个评论。当我添加空的 proxies.json 文件时,只要我开始添加 json 结构 {}
就一切正常
为了更容易复制,我添加了用于复制的示例源代码https://1drv.ms/u/s!AkqjecaXrgd9469n7iG3ui-4tAnnoA
Azure Functions CLI 使用 homebrew.
安装在 macOS 上
我创建了一个 httptrigger 模板并在您的 git 中复制文件,但无法在我这边重现您的整个异常。
我只得到了Error processing configuration of Function Proxies
主机启动成功
这条错误消息是由 proxies.json
文件中的 "backendUri": ""
引起的。由于您直接在代理中设置响应,因此应删除此参数而不是将其设置为空字符串。见 document.
另外,我在您的异常消息中看到 Access to the path '/Users/YourName\LogFiles\Application\Proxies\DetailedTrace' is denied
,因此您可以尝试 运行 您的 cli 为 administartor/superuesr。
更新
您的示例在我这边运行良好(OS:Windows),无需 运行ning cli 作为管理员。
如果我使用 windows cmd,它不会像您那样创建文件夹。而如果我使用 git bash,则会创建 C:\Users\UserName\LogFiles\Application\Proxies\DetailedTrace
。
所以我想,要在 MacOS 上使用代理启动主机,可能需要以超级用户身份 运行 cli 2.0.1-beta.28
。在 azure-functions-host 上打开了一个问题。您可以跟踪它以获取更多信息。
更新 2
此问题已修复,在 cli 2.0.1-beta.35 中,代理应该可以正常工作。
我添加到我的项目 proxies.json 文件中,但是之后运行时无法启动并出现异常。有任何想法吗?我已经查看了 GitHub 个问题,但没有任何运气。
我添加了带有 *.csproj 和 proxies.json 文件的要点以供复制。
非常感谢
[02/06/2018 17:10:57] Initializing Azure Function proxies
[02/06/2018 17:10:57] Error processig configuration of Function Proxies
[02/06/2018 17:10:57]
Function host is not running.
[02/06/2018 17:10:59] A ScriptHost error has occurred
[02/06/2018 17:10:59] Autofac: An error occurred during the activation of a particular registration. See the inner exception for details. Registration: Activator = ProxyHandler (ReflectionActivator), Services = [Microsoft.Azure.AppService.Proxy.Runtime.ProxyHandler], Lifetime = Autofac.Core.Lifetime.RootScopeLifetime, Sharing = Shared, Ownership = OwnedByLifetimeScope ---> An error occurred during the activation of a particular registration. See the inner exception fordetails. Registration: Activator = ApiInspectorHandler (ReflectionActivator), Services = [Microsoft.Azure.AppService.Proxy.Runtime.Handlers.ApiInspectorHandler], Lifetime = Autofac.Core.Lifetime.RootScopeLifetime, Sharing = Shared, Ownership = OwnedByLifetimeScope ---> An error occurred during the activation of a particular registration. See the inner exception for details. Registration: Activator = DebugLogStorageService (DelegateActivator), Services = [Microsoft.Azure.AppService.Proxy.Runtime.Logging.IDebugLogService], Lifetime = Autofac.Core.Lifetime.RootScopeLifetime, Sharing = Shared, Ownership = OwnedByLifetimeScope ---> An error occurred during the activation of a particular registration. See the inner exception for details. Registration: Activator = FileSystemStorage (DelegateActivator), Services = [DetailedTrace (Microsoft.Azure.AppService.Proxy.Common.Infra.IBlobStorage)], Lifetime = Autofac.Core.Lifetime.RootScopeLifetime,Sharing = Shared, Ownership = OwnedByLifetimeScope ---> Access to the path '/Users/maciejgos\LogFiles\Application\Proxies\DetailedTrace' is denied. (See inner exception for details.) (See inner exception for details.) (See inner exception for details.) (See inner exception for details.). Autofac: An error occurredduring the activation of a particular registration. See the inner exception for details. Registration: Activator = ApiInspectorHandler (ReflectionActivator),Services = [Microsoft.Azure.AppService.Proxy.Runtime.Handlers.ApiInspectorHandler], Lifetime = Autofac.Core.Lifetime.RootScopeLifetime, Sharing = Shared, Ownership = OwnedByLifetimeScope ---> An error occurred during the activation of a particular registration. See the inner exception for details. Registration: Activator = DebugLogStorageService (DelegateActivator), Services = [Microsoft.Azure.AppService.Proxy.Runtime.Logging.IDebugLogService], Lifetime = Autofac.Core.Lifetime.RootScopeLifetime, Sharing = Shared, Ownership = OwnedByLifetimeScope ---> An error occurred during the activation of a particular registration. See the inner exception for details. Registration: Activator = FileSystemStorage (DelegateActivator), Services = [DetailedTrace (Microsoft.Azure.AppService.Proxy.Common.Infra.IBlobStorage)], Lifetime = Autofac.Core.Lifetime.RootScopeLifetime, Sharing = Shared, Ownership = OwnedByLifetimeScope ---> Access to the path '/Users/maciejgos\LogFiles\Application\Proxies\DetailedTrace' is denied. (See inner exception for details.) (See inner exception for details.) (See inner exception for details.). Autofac: An error occurred during the activation of a particular registration. See the inner exception for details. Registration: Activator= DebugLogStorageService (DelegateActivator), Services = [Microsoft.Azure.AppService.Proxy.Runtime.Logging.IDebugLogService], Lifetime = Autofac.Core.Lifetime.RootScopeLifetime, Sharing = Shared, Ownership = OwnedByLifetimeScope ---> An error occurred during the activation of a particular registration. See the inner exception for details. Registration: Activator = FileSystemStorage (DelegateActivator), Services = [DetailedTrace (Microsoft.Azure.AppService.Proxy.Common.Infra.IBlobStorage)], Lifetime = Autofac.Core.Lifetime.RootScopeLifetime, Sharing = Shared, Ownership = OwnedByLifetimeScope ---> Access to the path '/Users/maciejgos\LogFiles\Application\Proxies\DetailedTrace' is denied. (See inner exception for details.) (See inner exception for details.). Autofac: An error occurred during the activation of a particular registration. See the inner exception for details. Registration: Activator = FileSystemStorage (DelegateActivator), Services = [DetailedTrace (Microsoft.Azure.AppService.Proxy.Common.Infra.IBlobStorage)], Lifetime = Autofac.Core.Lifetime.RootScopeLifetime, Sharing = Shared,Ownership = OwnedByLifetimeScope ---> Access to the path '/Users/maciejgos\LogFiles\Application\Proxies\DetailedTrace' is denied. (See inner exception for details.). System.IO.FileSystem: Access to the path '/Users/maciejgos\LogFiles\Application\Proxies\DetailedTrace' is denied. Permission denied.
[02/06/2018 17:10:59] Stopping Host
https://gist.github.com/maciejgos/4bc0650aa72dd94e61b798e94da83aeb
我今天观察到的另一个评论。当我添加空的 proxies.json 文件时,只要我开始添加 json 结构 {}
就一切正常为了更容易复制,我添加了用于复制的示例源代码https://1drv.ms/u/s!AkqjecaXrgd9469n7iG3ui-4tAnnoA
Azure Functions CLI 使用 homebrew.
安装在 macOS 上我创建了一个 httptrigger 模板并在您的 git 中复制文件,但无法在我这边重现您的整个异常。
我只得到了Error processing configuration of Function Proxies
主机启动成功
这条错误消息是由 proxies.json
文件中的 "backendUri": ""
引起的。由于您直接在代理中设置响应,因此应删除此参数而不是将其设置为空字符串。见 document.
另外,我在您的异常消息中看到 Access to the path '/Users/YourName\LogFiles\Application\Proxies\DetailedTrace' is denied
,因此您可以尝试 运行 您的 cli 为 administartor/superuesr。
更新
您的示例在我这边运行良好(OS:Windows),无需 运行ning cli 作为管理员。
如果我使用 windows cmd,它不会像您那样创建文件夹。而如果我使用 git bash,则会创建 C:\Users\UserName\LogFiles\Application\Proxies\DetailedTrace
。
所以我想,要在 MacOS 上使用代理启动主机,可能需要以超级用户身份 运行 cli 2.0.1-beta.28
。在 azure-functions-host 上打开了一个问题。您可以跟踪它以获取更多信息。
更新 2
此问题已修复,在 cli 2.0.1-beta.35 中,代理应该可以正常工作。