我添加到我的项目proxies.json文件但是在该运行时无法以异常启动之后。有任何想法吗?我已经看过GitHub的问题而没有任何运气。
在和我添加带有* .csproj和proxies.json文件的gist进行复制。
非常感谢
[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上。
答案 0 :(得分:1)
我创建了一个httptrigger模板并在你的gits中复制文件,但无法重现你的整个例外。
我只有Error processing configuration of Function Proxies
并且主机已成功启动。
此单个错误消息是由"backendUri": ""
文件中的proxies.json
引起的。由于您直接在代理中设置了响应,因此应删除此参数而不是将其设置为空字符串。请参阅document。
此外,我在您的异常消息中看到Access to the path '/Users/YourName\LogFiles\Application\Proxies\DetailedTrace' is denied
,因此您可以尝试将您的cli作为administartor / superuesr运行。
<强>更新强>
您的示例在我这边(OS:Windows)运行良好,无需以管理员身份运行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中,代理应按预期工作。