Azure / Azure/azure-functions-host

Functions v2 blob trigger fails for blob only storage account

Open
#3,266 12 comments 2 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
2k
Forks
482
Avg merge
2d 12h
Merged PRs (30d)
38

Description

As per #3039 we have run into an issue with Functions v2 (haven't tried v1) and the blob trigger.

Compiled Class Library, created in Visual Studio 2017; latest updates to VS and the Functions extensions; Core tools v 44.

It fails to run the function with the following: **Error indexing method 'Function1.Run'. Microsoft.WindowsAzure.Storage: No such host is known. System.Net.Http: No such host is known. System.Private.CoreLib: No such host is known.**

We figured out this is because the blob storage account was a "storage only" storage account. We changed to a generic storage account and it started working fine.

Full output from host:
```
[15.08.2018 21:59:09] Reading host configuration file 'c:\users\jgranlund\source\repos\blobtriggerTest\FunctionApp1\bin\Debug\netstandard2.0\host.json'
[15.08.2018 21:59:09] Host configuration file read:
[15.08.2018 21:59:09] {}
[15.08.2018 21:59:09] Starting Host (HostId=communij0n4s10-1948761026, InstanceId=363fb87c-595c-4422-9115-da5c2cd0e6d2, Version=2.0.11946.0, ProcessId=31512, AppDomainId=1, Debug=False, ConsecutiveErrors=0, StartupCount=1, FunctionsExtensionVersion=)
[15.08.2018 21:59:09] Generating 1 job function(s)
[15.08.2018 21:59:10] Host lock lease acquired by instance ID '000000000000000000000000FA106ED3'.
[15.08.2018 21:59:36] Error indexing method 'Function1.Run'
[15.08.2018 21:59:36] Microsoft.Azure.WebJobs.Host: Error indexing method 'Function1.Run'. Microsoft.WindowsAzure.Storage: No such host is known. System.Net.Http: No such host is known. System.Private.CoreLib: No such host is known.
[15.08.2018 21:59:36] Function 'Function1.Run' failed indexing and will be disabled.
[15.08.2018 21:59:36] No job functions found. Try making your job classes and methods public. If you're using binding extensions (e.g. ServiceBus, Timers, etc.) make sure you've called the registration method for the extension(s) in your startup code (e.g. config.UseServiceBus(), config.UseTimers(), etc.).
[15.08.2018 21:59:36] Host initialized (27125ms)
[15.08.2018 21:59:36] Host started (27148ms)
[15.08.2018 21:59:36] Job host started
[15.08.2018 21:59:36] The following 1 functions are in error:
[15.08.2018 21:59:36] Run: Microsoft.Azure.WebJobs.Host: Error indexing method 'Function1.Run'. Microsoft.WindowsAzure.Storage: No such host is known. System.Net.Http: No such host is known. System.Private.CoreLib: No such host is known.
[15.08.2018 21:59:36]
[15.08.2018 21:59:36]
Listening on http://0.0.0.0:7071/
Hit CTRL-C to exit...
```

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the Functions v2 blob-trigger failure from Function1.Run with the host.json configuration and a blob-only storage account, using the reported Core Tools setup. Trace the indexing error and host-name resolution path; done means the function indexes and runs successfully without requiring a generic storage account.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, csharp
Domain
backend, cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.