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

Does not work: Service Unavailable - https://functions.azure.com/api/passthrough #20

Open
tjhgit opened this issue Oct 6, 2018 · 2 comments

Comments

@tjhgit
Copy link

tjhgit commented Oct 6, 2018

Also not with the latest dockerfile image .

Also changed to new v2 format of host.json wo. success.

{
"version": "2.0",
"healthMonitor": {
"enabled": true,
"healthCheckInterval": "00:00:10",
"healthCheckWindow": "00:02:00",
"healthCheckThreshold": 6,
"counterThreshold": 0.80
},
"functionTimeout": "00:05:00",
"logging": {
"fileLoggingMode": "debugOnly"
},
"extensions": {
"http": {
"routePrefix": "api",
"maxConcurrentRequests": 5,
"maxOutstandingRequests": 30
},
"queues": {
"visibilityTimeout": "00:00:10"
},
"eventHubs": {
"batchCheckpointFrequency": 1,
"eventProcessorOptions": {
"maxBatchSize": 1000,
"prefetchCount": 1000
}
}
},
"swagger": {
"enabled": true
}
}

@tjhgit tjhgit changed the title Does not work Does not work: Service Unavailable - https://functions.azure.com/api/passthrough Oct 6, 2018
@nuochen
Copy link

nuochen commented Oct 11, 2018

I am also encountering the same issue. The dockerfile image I am using is: microsoft/azure-functions-python3.6:v2.0.11961-alpha

@tjhgit
Copy link
Author

tjhgit commented Oct 15, 2018

I made it work.
You first need to update the host.json to:

{
"version": "2.0",
"healthMonitor": {
"enabled": true,
"healthCheckInterval": "00:00:10",
"healthCheckWindow": "00:02:00",
"healthCheckThreshold": 6,
"counterThreshold": 0.80
},
"functionTimeout": "00:05:00",
"logging": {
"fileLoggingMode": "debugOnly"
},
"extensions": {
"http": {
"routePrefix": "api",
"maxConcurrentRequests": 5,
"maxOutstandingRequests": 30
},
"queues": {
"visibilityTimeout": "00:00:10"
},
"eventHubs": {
"batchCheckpointFrequency": 1,
"eventProcessorOptions": {
"maxBatchSize": 1000,
"prefetchCount": 1000
}
}
},
"swagger": {
"enabled": true
}
}

This is my Dockerfile:

FROM microsoft/azure-functions-python3.6:2.0.12121

ENV host:logger:consoleLoggingMode=always

COPY . /home/site/wwwroot

RUN cd /home/site/wwwroot && pip install -r requirements.txt

The I issued docker build and pushed the image to an azure registry.

Then using the portal add a Function App of type Linux Preview Docker (the az commands did not work for me however the deployment via portal). For the container image choose the one previously pushed.

Finally issue these 2 commands that configure parameters of the app:

storageConnectionString=$(az storage account show-connection-string --resource-group XXXX --name YYYYYY --query connectionString --output tsv)

az functionapp config appsettings set --name ZZZZZZ --resource-group XXXXX --settings AzureWebJobsDashboard=$storageConnectionString AzureWebJobsStorage=$storageConnectionString

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants