Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.0.1-beta.28 fails to start host with proxy on MacOS #2942

Closed
JohnReeson opened this issue Jun 5, 2018 · 12 comments
Closed

2.0.1-beta.28 fails to start host with proxy on MacOS #2942

JohnReeson opened this issue Jun 5, 2018 · 12 comments
Assignees

Comments

@JohnReeson
Copy link

JohnReeson commented Jun 5, 2018

Issue is from SO.

CLI installed on MacOS using brew has such trouble. While on windows, things works.

The sample to repro includes two files below and one host.json file with only {}.
proxies.json

{
    "$schema": "http://json.schemastore.org/proxies",
    "proxies": {
        "HelloWorldProxy": {
            "matchCondition": {
                "route": "api/hello/{name}"
            },
            "responseOverrides": {
                "response.statusCode": "200",
                "response.statusReason": "OK",
                "response.headers.Content-Type": "application/json",
                "response.body":{
                    "message":"Hello, {name}"
                }
            }
        }
    }
}

local.settings.json

{
  "IsEncrypted": false,
  "Values": {
    "FUNCTIONS_WORKER_RUNTIME": "dotnet",
    "AzureWebJobsStorage": "UseDevelopmentStorage=true"
  }
}

Error messgae

[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

@maciejgos
Copy link

I execute func start as superuser and it works. So issue is related to macOS. Problem is only related to proxies functionality.

@JohnReeson
Copy link
Author

JohnReeson commented Jun 6, 2018

Another simple question: Have seen that cli(both v1&v2) output uri with proxy name like http://localhost:7071/api/HelloWorldProxy instead of the route like http://localhost:7071/api/hello/{name}, is it by design?

@JohnReeson
Copy link
Author

@safihamid Could you have a look at this issue? Thanks.

@safihamid
Copy link
Contributor

Yes we’ll be looking at this.

@safihamid
Copy link
Contributor

@vfedonkin would you please look into this? thanks

@vfedonkin
Copy link
Contributor

Looking

@ChristianWeyer
Copy link

I have the same issue with 2.0.1-beta.29 @vfedonkin

@ChristianWeyer
Copy link

ChristianWeyer commented Jun 19, 2018

Do you have any idea what could be wrong @vfedonkin or @safihamid ? This blocks me/us (and running elevated with sudo is not really an option ;-) )
Thanks!

@safihamid
Copy link
Contributor

@ChristianWeyer yes we have identified the bug and the fix will be released within the next few weeks.

@ChristianWeyer
Copy link

ChristianWeyer commented Jun 19, 2018

Thank you! Is there any workaround right now other than 'sudo'? @safihamid ?

@alexkarcher-msft
Copy link

@ChristianWeyer , if you make a folder in your /users foder called "[username]\LogFiles\Application\Proxies\DetailedTrace" that should allow the proxies to run successfully.

proxiesmac

@fabiocav
Copy link
Member

fabiocav commented Jul 5, 2018

Fixed by 110aefe

This will be available in the next release.

@fabiocav fabiocav closed this as completed Jul 5, 2018
@ghost ghost locked as resolved and limited conversation to collaborators Jan 1, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants