代码之家  ›  专栏  ›  技术社区  ›  maciejgos

cli v2.0.1-beta.28 proxies.json问题

  •  1
  • maciejgos  · 技术社区  · 8 年前

    我将添加到project 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 .

    1 回复  |  直到 8 年前
        1
  •  1
  •   Jerry Liu Phantom    8 年前

    我创建了一个httptrigger模板并在gits中复制文件,但是不能在我这边复制整个异常。

    我只有 Error processing configuration of Function Proxies 主机启动成功。

    这条错误消息是由 "backendUri": "" 在里面 proxies.json 文件。应该删除此参数,而不是将其设置为空字符串,因为您直接在代理中设置了响应。见 document .

    我也明白了 Access to the path '/Users/YourName\LogFiles\Application\Proxies\DetailedTrace' is denied 在异常消息中,这样您就可以尝试以administratortor/superuesr的身份运行cli。

    更新

    您的示例在我这边(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中,代理应按预期工作。