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

Common errors when upgrading to 2.0.12050 (or newer) #3363

Closed
paulbatum opened this issue Aug 31, 2018 · 45 comments
Closed

Common errors when upgrading to 2.0.12050 (or newer) #3363

paulbatum opened this issue Aug 31, 2018 · 45 comments

Comments

@paulbatum
Copy link
Member

paulbatum commented Aug 31, 2018

This relates to this announcement: Azure/app-service-announcements#129

Check your versions

First, to understand any error you're getting, its important that you establish which version(s) of functions you are running. If you're working completely from within the portal its simple - go to function app settings and look at the runtime version:

image

If you're developing locally, you'll also need to check the functions version that is being used when you test your app locally. You can check that by looking for a line in the output that looks like this:
[8/30/2018 6:12:53 PM] Starting Host (HostId=xxx, InstanceId=xxx, Version=2.0.12050.0)

If your local version doesn't match the version you're deploying to in Azure, you're probably going to have issues.

Check your logs

If you're developing and testing the app locally, the logs are clearly visible in the terminal and easy to check. If you've deployed to Azure and you're having problems, there are a few approaches you can take to get quick feedback on what is going wrong with your function app:

  1. Go to a particular function in the portal and attempt to run it and check the log stream at the bottom of the screen.
  2. Go to the overview tab, and in configured features select Application Insights. This will open a new view. Find Live Metrics Stream in the left hand list, open that and look at the Sample Telemetry - this will show live error logs for the entire function app (not just a single function)
  3. Go to the platform features tab and select Advanced Tools (kudu). Go to debug console -> CMD and then in the file browser browse to Log Files -> Application -> Functions -> Host and look at the log files there.

Common Errors

[Error] Found functions with more than one language. Select a language for your function app by specifying FUNCTIONS_WORKER_RUNTIME AppSetting

You'll need to specify the language for your function app. See the Choose a language for your Function App section of this page.

My http triggers are returning 404 but I have no idea why

Its possible this is happening because you have the same error as the one above (multiple languages), but you're just not seeing it in the log. Try step approach 3 in the "check your logs" section above to confirm.

Microsoft.Azure.WebJobs.Script.HostConfigurationException : The host.json file is missing the required 'version' property.

You'll need to update your host.json file to the new format. See here for more info.

System.TypeLoadException : Could not load type 'Microsoft.Azure.WebJobs.ExecutionContext' from assembly 'Microsoft.Azure.WebJobs.Extensions, Version=3.0.0.0, Culture=neutral, PublicKeyToken=null'.

You need to update your NuGet references, recompile and publish. See the Update your dependencies, extensions and/or code section of this page.

System.TypeLoadException : Could not load type 'Microsoft.Azure.WebJobs.BlobTriggerAttribute' from assembly 'Microsoft.Azure.WebJobs, Version=3.0.0.0, Culture=neutral, PublicKeyToken=null'.

System.TypeLoadException : Could not load type 'Microsoft.Azure.WebJobs.QueueAttribute' from assembly 'Microsoft.Azure.WebJobs, Version=3.0.0.0, Culture=neutral, PublicKeyToken=null'.

System.TypeLoadException : Could not load type 'Microsoft.Azure.WebJobs.TableAttribute' from assembly 'Microsoft.Azure.WebJobs, Version=3.0.0.0, Culture=neutral, PublicKeyToken=null'.

The binding type(s) 'blob, queue' are not registered. Please ensure the type is correct and the binding extension is installed.

You'll get errors like these if you're using Azure Storage based functionality (blob/queue/tables trigger/input/output) and you haven't installed the Microsoft.Azure.WebJobs.Extensions.Storage extension. See the Update your dependencies, extensions and/or code section of this page.

Could not load type 'Microsoft.Azure.WebJobs.Hosting.IWebJobsStartup' from assembly 'Microsoft.Azure.WebJobs.Host, Version=3.0.0.0, Culture=neutral, PublicKeyToken=null'.

You'll see this if you have published an app that has been updated locally to the latest bits, but the app you're deploying to is running a version older than 2.0.12050.0. See the instructions at the top of this page for checking your versions.

Microsoft.Azure.WebJobs.Script.Rpc.LanguageWorkerChannelException : Failed to start language worker for: node. Error: Your Function App is currently set to use Node.js version v6.5.0, but the runtime requires an Active LTS or Current version (ex: 8.11.1 or 10.6.0).

The JavaScript support in functions V2 works on Node 8 and Node 10. See here for more info.

@kgoderis
Copy link

@paulbatum After upgrading, and within the VS Code IDE, all TraceWriter.Info() calls are written twice to the Terminal that is running func. Once in blue, with inclusion of a date/time stamp, as you would expect (e.g. as before upgrading), once in white, as if it is Console.WriteLine()

@kgoderis
Copy link

@paulbatum See Azure/homebrew-functions#10 . I had to download the .zip manually, and switch over symlinks in order to make it work.

@harjotsmart
Copy link

After updating to new version on local, update all the nugets, when run getting this one.
I m using custom IExtensionConfigProvider to inject interaces on Intialize.

[31-08-2018 14:13:26] Function 'ApiAppService.RunGetAppServices' failed indexing and will be disabled.
[31-08-2018 14:13:26] Error indexing method 'ApiAppService.RunAppServiceDomain'
[31-08-2018 14:13:26] Microsoft.Azure.WebJobs.Host: Error indexing method 'ApiAppService.RunAppServiceDomain'. Microsoft.Azure.WebJobs.Host: Cannot bind parameter 'faaslogger' to type ILogger. Make sure the parameter Type is supported by the binding. 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.).

@davemurphysf
Copy link

I was able to upgrade successfully but I started seeing these dependency errors for the logs. I tried turning log storage on/off and changing containers with no luck. My functions are working fine, but thought I'd mention this.
screen shot 2018-08-31 at 11 54 48 am

@DanRigby
Copy link
Member

I'm seeing the same dependency errors as @davemurphysf along with a few other dependency errors with 409s when attempting to write to https://<function-name>.blob.core.windows.net:443/azure-webjobs-hosts/locks/linkfunctions/host?comp=lease

Both sets of errors are intermittent.

@harjotsmart
Copy link

@paulbatum can u please guide, after migration
public void Initialize(ExtensionConfigContext context)
is not called which was working earlier. because of this, dependencies are not loading on startup.

@hoovercj
Copy link

hoovercj commented Sep 2, 2018

I attempted to follow the migration steps but still get azure functions binding type "blob" not registered in my node/javascript functions app.

In response to that issue, the OP says:

You'll get errors like these if you're using Azure Storage based functionality (blob/queue/tables trigger/input/output) and you haven't installed the Microsoft.Azure.WebJobs.Extensions.Storage extension. See the Update your dependencies, extensions and/or code section of this page.

Following those instructions, in the root directory of my functions app, I ran: func extensions install --package Microsoft.Azure.WebJobs.Extensions.Storage --version 3.0.0-beta8 which simply added a file called extensions.csproj in the root of my project with these contents:

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFramework>netstandard2.0</TargetFramework>
	<WarningsAsErrors></WarningsAsErrors>
	<DefaultItemExcludes>**</DefaultItemExcludes>
  </PropertyGroup>
  <ItemGroup>
    <PackageReference Include="Microsoft.Azure.WebJobs.Extensions.Storage" Version="3.0.0-beta8" />
    <PackageReference Include="Microsoft.Azure.WebJobs.Script.ExtensionsMetadataGenerator" Version="1.0.0-beta3" />
  </ItemGroup>
</Project>

I added that file and published from github, but I still get the error.

Unfortunately all the documentation, including Azure Table storage bindings for Azure Functions, is out of date and does not yet reflect the need to register bindings so it is unclear if there are other necessary steps.

I have have left the code in the state that I tried to use with the newest runtime, but I have pinned the function version in the application settings as a mitigation for now.

Edit: Added link to github repo

@hoovercj
Copy link

hoovercj commented Sep 3, 2018

Somebody created a PR for my repo setting the version value in host.json and correcting the cli-generated version of a package in the .csproj file which solved my initial issue (azure functions binding type "blob" not registered).

However, this quote from the migration notes is a bit confusing about whether updating the hosts file is necessary or not:

The "version": "2.0" setting is now required in host.json. If there are no current settings in the file, the host will automatically add this value.

Based on the quote above, it sounds like the version shouldn't be necessary. So maybe the issue was just the package version in the .csproj file?

But now I have 2 more issues:

  1. After modifying my .csproj and host.json files, all my functions timeout. There were no source changes to the individual functions between upgrading, only touching the .csproj and host.json. Did the runtime change how it handles returned promises in javascript functions? Do I need to explicitly call done() instead of using async/returning promises?

  2. If I roll back the changes to the csproj and host.json files and pin the version, I get Could not load type 'Microsoft.Azure.WebJobs.Hosting.IWebJobsStartup' from assembly 'Microsoft.Azure.WebJobs.Host, Version=3.0.0.0, Culture=neutral, PublicKeyToken=null'.. The post above says:

You'll see this if you have published an app that has been updated locally to the latest bits, but the app you're deploying to is running a version older than 2.0.12050.0

However, I undid the changes and then even redeployed the last known working version from the azure portal "Deployment Options" blade and I still get this issue.

Summary

I have 3 issues:

  1. Documentation is unclear about whether host.json needs modified / what the version setting will be if it is omitted
  2. Javascript functions that worked in v2 before the update now timeout after updating
  3. Reverting back, even to the last known good deployment with a pinned version, results in Could not load type 'Microsoft.Azure.WebJobs.Hosting.IWebJobsStartup' from assembly 'Microsoft.Azure.WebJobs.Host, Version=3.0.0.0, Culture=neutral, PublicKeyToken=null'.
    image

Edit: I have "recovered" from problem 3 by using "slots". I created a new "Test" slot which essentially creates a new functions app which worked fine. I then swapped it into my production slot which made the production app work, but then the test slot was broken. I deleted the test slot and recreated it and now both slots work fine. So basically upgrading and then rolling back broke my function app in a way that could only be fixed by recreating it.

Problems 1 and 2 remain unresolved.

@harshithkashyap
Copy link

@paulbatum We are also seeing the same HTTP 409 dependency errors as mentioned by @DanRigby above across all our function apps. We've temporarily set functions runtime to 2.0.11961-alpha but would request a solution for this issue. All our functions are coded in JavaScript and deployed using Zip Push Deploy + Run from Zip if that helps.

@ThomasWeiss
Copy link

What I did:

  • unpin the Function version by putting the FUNCTIONS_EXTENSION_VERSION app setting back to beta
  • updated my host.json to v2 format
  • updated all my NuGet packages as instructed in the announcement

From the logs, it seems that my Function App is now running version 2.0.12050.0 but it fails to start with an exception saying Microsoft Azure WebJobs SDK ServiceBus connection string 'AzureWebJobsServiceBus' is missing or empty. (I have a function binded on a ServiceBus trigger).
I have tried to add that connection string (it worked fine as a standard app setting before, I just copied the key-value to connection strings) but I still have the same issue.

@kgoderis
Copy link

kgoderis commented Sep 3, 2018

#3367 is still prevailing after upgrading to 2.0.1-beta.37.

@jonbjo
Copy link

jonbjo commented Sep 3, 2018

Azure Functions Core Tools (2.0.1-beta.37)
Function Runtime Version: 2.0.12050.0

I have an issue after the upgrade which I've managed to boil down to something that is easy to reproduce. A function with ServiceBusTrigger that runs longer than 5 minutes succeeds but fails directly after that when trying to complete the trigger message.

[09/03/2018 19:57:03] Executing 'ErrorActionComplete' (Reason='New ServiceBus message detected on 'myTopic/Subscriptions/mySubscription'.', Id=54417f8c-e285-4c52-8057-606d647b5968)
[09/03/2018 19:57:03] Time elapsed: 0 minutes
Time elapsed: 0 minutes
[09/03/2018 19:58:03] Time elapsed: 1 minutes
Time elapsed: 1 minutes
[09/03/2018 19:59:03] Time elapsed: 2 minutes
Time elapsed: 2 minutes
[09/03/2018 20:00:03] Time elapsed: 3 minutes
Time elapsed: 3 minutes
[09/03/2018 20:01:03] Time elapsed: 4 minutes
Time elapsed: 4 minutes
[09/03/2018 20:02:03] Time elapsed: 5 minutes
Time elapsed: 5 minutes
[09/03/2018 20:03:03] Executed 'ErrorActionComplete' (Succeeded, Id=54417f8c-e285-4c52-8057-606d647b5968)
[09/03/2018 20:03:04] MessageReceiver error (Action=Complete, ClientId=MessageReceiver1myTopic/Subscriptions/mySubscription, EntityPath=myTopic/Subscriptions/mySubscription, Endpoint=test-prod.servicebus.windows.net)
[09/03/2018 20:03:04] Microsoft.Azure.ServiceBus: The lock supplied is invalid. Either the lock expired, or the message has already been removed from the queue. Reference:b108c442-3fc2-4108-9718-a625f01b795b, TrackingId:2869602600ab7d4100000f035b8d9209_G1_B15, SystemTracker:test-prod:Topic:mytopic|mysubscription, Timestamp:9/3/2018 8:03:03 PM.

Below function works like expected when loop is less than 5 minutes but not when running longer.

[FunctionName("ErrorActionComplete")]
public static async Task Run(
    [ServiceBusTrigger(topicName: "myTopic", subscriptionName: "mySubscription", Connection = "ServiceBusConnection")]string message,
    TraceWriter logger)
{
    for (int i = 0; i < 6; i++)
    {
        logger.Info("Time elapsed: " + i + " minutes");
        Thread.Sleep(60000);
    }
}

host.json

{
  "version": "2.0",
  "extensions": {
    "serviceBus": {
      "messageHandlerOptions": {
        "maxConcurrentCalls": 1,
        "maxAutoRenewTimeout": "00:30:00"
      }
    }
  }
}

Before the latest release I had the issue that the lock wasn't auto-renewed after 5 minute and hence started a new execution in parallel despite having maxConcurrency set to 1, similar to
#2667. Now it looks like that is fixed and the lock is auto-renewed, but message can't be completed when finished.

@cristinamanitiu
Copy link

cristinamanitiu commented Sep 4, 2018

Hello,

I have an HTTP triggered function which worked until the newest runtime update. Now it sometimes runs and sometimes it responds with 500 Internal Server Error.

The Azure runtime on which it runs is: 2.0.12050.0 (beta).
I have added the FUNCTIONS_WORKER_RUNTIME app setting with value "java".
On the logs I see the following error:

Microsoft.Azure.WebJobs.Host.FunctionInvocationException: at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e) at Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor+<ExecuteWithLoggingAsync>d__17.MoveNext (Microsoft.Azure.WebJobs.Host, Version=3.0.0.0, Culture=neutral, PublicKeyToken=nullMicrosoft.Azure.WebJobs.Host, Version=3.0.0.0, Culture=neutral, PublicKeyToken=null: C:\projects\azure-webjobs-sdk-rqm4t\src\Microsoft.Azure.WebJobs.Host\Executors\FunctionExecutor.csMicrosoft.Azure.WebJobs.Host, Version=3.0.0.0, Culture=neutral, PublicKeyToken=null: 293) at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e) at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e) at System.Runtime.CompilerServices.TaskAwaiter1.GetResult (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor+d__14.MoveNext (Microsoft.Azure.WebJobs.Host, Version=3.0.0.0, Culture=neutral, PublicKeyToken=nullMicrosoft.Azure.WebJobs.Host, Version=3.0.0.0, Culture=neutral, PublicKeyToken=null: C:\projects\azure-webjobs-sdk-rqm4t\src\Microsoft.Azure.WebJobs.Host\Executors\FunctionExecutor.csMicrosoft.Azure.WebJobs.Host, Version=3.0.0.0, Culture=neutral, PublicKeyToken=null: 89)
Inner exception Microsoft.Azure.WebJobs.Script.Rpc.LanguageWorkerChannelException handled at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw:
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter1.GetResult (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e) at Microsoft.Azure.WebJobs.Script.Description.WorkerLanguageInvoker+<InvokeCore>d__6.MoveNext (Microsoft.Azure.WebJobs.Script, Version=2.0.0.0, Culture=neutral, PublicKeyToken=nullMicrosoft.Azure.WebJobs.Script, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null: C:\azure-webjobs-sdk-script\src\WebJobs.Script\Description\Rpc\WorkerLanguageInvoker.csMicrosoft.Azure.WebJobs.Script, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null: 74) at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e) at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e) at System.Runtime.CompilerServices.TaskAwaiter1.GetResult (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at Microsoft.Azure.WebJobs.Script.Description.FunctionInvokerBase+d__24.MoveNext (Microsoft.Azure.WebJobs.Script, Version=2.0.0.0, Culture=neutral, PublicKeyToken=nullMicrosoft.Azure.WebJobs.Script, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null: C:\azure-webjobs-sdk-script\src\WebJobs.Script\Description\FunctionInvokerBase.csMicrosoft.Azure.WebJobs.Script, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null: 84)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter1.GetResult (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e) at Microsoft.Azure.WebJobs.Script.Description.FunctionGenerator+<Coerce>d__31.MoveNext (Microsoft.Azure.WebJobs.Script, Version=2.0.0.0, Culture=neutral, PublicKeyToken=nullMicrosoft.Azure.WebJobs.Script, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null: C:\azure-webjobs-sdk-script\src\WebJobs.Script\Description\FunctionGenerator.csMicrosoft.Azure.WebJobs.Script, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null: 225)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter1.GetResult (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e) at Microsoft.Azure.WebJobs.Host.Executors.FunctionInvoker2+d__9.MoveNext (Microsoft.Azure.WebJobs.Host, Version=3.0.0.0, Culture=neutral, PublicKeyToken=nullMicrosoft.Azure.WebJobs.Host, Version=3.0.0.0, Culture=neutral, PublicKeyToken=null: C:\projects\azure-webjobs-sdk-rqm4t\src\Microsoft.Azure.WebJobs.Host\Executors\FunctionInvoker.csMicrosoft.Azure.WebJobs.Host, Version=3.0.0.0, Culture=neutral, PublicKeyToken=null: 63)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter1.GetResult (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e) at Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor+<InvokeAsync>d__25.MoveNext (Microsoft.Azure.WebJobs.Host, Version=3.0.0.0, Culture=neutral, PublicKeyToken=nullMicrosoft.Azure.WebJobs.Host, Version=3.0.0.0, Culture=neutral, PublicKeyToken=null: C:\projects\azure-webjobs-sdk-rqm4t\src\Microsoft.Azure.WebJobs.Host\Executors\FunctionExecutor.csMicrosoft.Azure.WebJobs.Host, Version=3.0.0.0, Culture=neutral, PublicKeyToken=null: 561) at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e) at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e) at System.Runtime.CompilerServices.TaskAwaiter.GetResult (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e) at Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor+<ExecuteWithWatchersAsync>d__24.MoveNext (Microsoft.Azure.WebJobs.Host, Version=3.0.0.0, Culture=neutral, PublicKeyToken=nullMicrosoft.Azure.WebJobs.Host, Version=3.0.0.0, Culture=neutral, PublicKeyToken=null: C:\projects\azure-webjobs-sdk-rqm4t\src\Microsoft.Azure.WebJobs.Host\Executors\FunctionExecutor.csMicrosoft.Azure.WebJobs.Host, Version=3.0.0.0, Culture=neutral, PublicKeyToken=null: 508) at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e) at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e) at System.Runtime.CompilerServices.TaskAwaiter.GetResult (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e) at Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor+<ExecuteWithLoggingAsync>d__23.MoveNext (Microsoft.Azure.WebJobs.Host, Version=3.0.0.0, Culture=neutral, PublicKeyToken=nullMicrosoft.Azure.WebJobs.Host, Version=3.0.0.0, Culture=neutral, PublicKeyToken=null: C:\projects\azure-webjobs-sdk-rqm4t\src\Microsoft.Azure.WebJobs.Host\Executors\FunctionExecutor.csMicrosoft.Azure.WebJobs.Host, Version=3.0.0.0, Culture=neutral, PublicKeyToken=null: 444) at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e) at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e) at System.Runtime.CompilerServices.TaskAwaiter.GetResult (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e) at Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor+<ExecuteWithLoggingAsync>d__17.MoveNext (Microsoft.Azure.WebJobs.Host, Version=3.0.0.0, Culture=neutral, PublicKeyToken=nullMicrosoft.Azure.WebJobs.Host, Version=3.0.0.0, Culture=neutral, PublicKeyToken=null: C:\projects\azure-webjobs-sdk-rqm4t\src\Microsoft.Azure.WebJobs.Host\Executors\FunctionExecutor.csMicrosoft.Azure.WebJobs.Host, Version=3.0.0.0, Culture=neutral, PublicKeyToken=null: 249) Inner exception System.AggregateException handled at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw: Microsoft.Azure.WebJobs.Script.Rpc.LanguageWorkerProcessExitException: System.TimeoutException: Microsoft.Azure.WebJobs.Script.Rpc.LanguageWorkerProcessExitException:

Could someone please help?

@brettsam
Copy link
Member

brettsam commented Sep 4, 2018

@davemurphysf -- Those dependency errors look to be coming from the Azure Functions dashboard. Do you have the AzureWebJobsDashboard app setting set? If you remove it, do those go away? Ideally those wouldn't show up, even if you had this enabled -- I've filed Azure/azure-webjobs-sdk#1876 to track this.

@DanRigby -- What trigger are you using with the function that is showing your lease dependency error? Or are you using a [Singleton] attribute directly? It's similar to the issue above but I'll likely want to track it separately as a different piece of code is adding that.

FYI for @harshithkashyap and others seeing these:
I should note that these do not reflect errors in your function execution. Behind-the-scenes the functions host does a lot of coordination via Azure Storage for locks, leases, logs, etc. With the addition of automatic dependency tracking with App Insights, some of those host operations are showing up in the context of a function execution (we hide a bunch already). A 404 or 409 in this context is expected and is unfortunately showing up as a dependency error. I'll be filing issues to make sure we hide these, so please keep mentioning them when you see them. Ideally, please file a new issue over at https://github.com/Azure/azure-webjobs-sdk/issues.

@brettsam
Copy link
Member

brettsam commented Sep 4, 2018

@harjotsmart -- See this comment for changes required to existing binding extensions: Azure/app-service-announcements-discussions#64 (comment)

@brettsam
Copy link
Member

brettsam commented Sep 4, 2018

@hoovercj -- The host.json change is not strictly required. An empty host.json is fine. We want to be clear that if you're using custom settings, you need to explicitly acknowledge that there is a change in v2. Since you're not using any custom settings, you're fine.

@mhoeger, can you help with the question about promises/done/etc? #3363 (comment)

@davemurphysf
Copy link

Hi @brettsam, yeah that seems to be the issue for me. I deleted the AzureWebJobsDashboard Application Setting and the dependency errors went away.

@IGx89
Copy link

IGx89 commented Sep 4, 2018

@harshithkashyap We're also using Zip Push Deploy + Run from Zip and have been broken since this update. The "Functions (Read Only)" node in the Portal just hangs and never expands the functions. Anyone else using a similar deployment method have any luck getting it to work?

It gives this message after a few minutes:
Error: Azure Functions Runtime is unreachable. Click here for details on storage configuration. Session Id: 39f3b34e25fa4be4a139dacec38b3d60 Timestamp: 2018-09-04T16:56:31.382Z

@kgoderis
Copy link

kgoderis commented Sep 4, 2018

@IGx89 What worked for me was first stopping the Function in the Portal, then deploying, and then restarting the Function in the portal

@IGx89
Copy link

IGx89 commented Sep 4, 2018

@kgoderis Good suggestion, but no luck -- same error message. It seems to be running based on all the 404/409 Azure Storage requests in AI (which @brettsam says is normal), but not being able to see individual functions in the Portal or manually trigger them is a pretty big problem.

@brettsam
Copy link
Member

brettsam commented Sep 4, 2018

@IGx89 -- can you share your site name with me so I can investigate on our side? See here to share privately: https://github.com/Azure/azure-functions-host/wiki/Sharing-Your-Function-App-name-privately. Although if you're not even able to run a function, maybe that's tough. Any older logs you have would work as well -- I should be able to look up any function invocation guid.

If you need to, you can email me your site name directly. My mail address is in my github profile.

@ltouro
Copy link

ltouro commented Sep 4, 2018

Can't create a blank function app with ~2 version pinned and a basic HTTP trigger. Everything through the interface.

Error: Function (HttpTriggerJS1) Error: Failed to start language worker process for: node. node exited with code 1 .

Also, trying to upgrade an existing app just blew it. Returning to the previous pinned version has no effect.

@mhoeger
Copy link
Contributor

mhoeger commented Sep 4, 2018

@ltouro - what version of node are you using? (note that if your are specifying node version in azure using WEBSITE_NODE_DEFAULT_VERSION, only a few versions are supported. i would recommend trying 8.11.1 or 10.6.0).

@ltouro
Copy link

ltouro commented Sep 4, 2018

@mhoeger I see. Thanks. I did not specify the node version manually. Just set the ~2 runtime version and used the Azure Portal Function creation Wizard. So, the Portal set the Node version to 6.5.0 by itself. Using 8.11.1 and restarting the App works.

Regarding the migration path, fixing the Node Version, stopping the App, deploying through git push remote and starting the app again did the trick.

@pragnagopa
Copy link
Member

@cristinamanitiu - We are tracking issue with Java process timeout exception on consumption plan. Please see #3081 I will continue to follow up on this issue.

@nbevans
Copy link

nbevans commented Sep 4, 2018

Azure Functions Core Tools (2.0.1-beta.35)
Function Runtime Version: 2.0.11960.0

How do I get this Function Runtime Version to update?

@nbevans
Copy link

nbevans commented Sep 5, 2018

Seems chocolately hasn't updated to beta.37 yet and that was why. Had to install node/npm and get it that way. Remind me why Azure Functions Core Tools has an "official dependency" on the god-awful Node/NPM stack again? For a VS .NET developer it makes absolutely no sense at the moment...

@makar-sasha
Copy link

Hello.
After an update to the recent functions version App Insights is not storing the data. I see the logs in Live Metrics Stream and looks like the functions working correctly. But all other App Insights views are empty so the logs were not delivered. Maybe there are some advise how to fix the problem?

@ltouro
Copy link

ltouro commented Sep 5, 2018

@makar-sasha I was about to report the same issue. Can see the logs on live stream but no query results on the AI analytics dashboard. Worker: Node v. 8.11.1

@davidebbo
Copy link
Contributor

There are too many distinct things being discussed in this thread, and it's hard to track/respond properly. Please open a separate issue on https://github.com/Azure/azure-functions-host for each distinct issue that you are having (you can post a link from here). We will get to all of them. Thanks!

@hoovercj
Copy link

hoovercj commented Sep 5, 2018

@brettsam thanks, I have confirmed that simply adding the extensions.csproj file without modifying host.json was sufficient.

I have opened #3391 to address my async issues.

@davidebbo
Copy link
Contributor

@nbevans Chocolatey has been updated with the latest.

@betarabbit
Copy link

I have upgraded a java version of function app to Runtime version: 2.0.12050.0 (beta) and followed instructions to add extensions for storage queueTrigger, but, after restarted function app, it seems all request to httpTrigger not working any more.

@davidebbo
Copy link
Contributor

@betarabbit please open a separate issue, per my previous comment.

@mjul
Copy link

mjul commented Sep 10, 2018

Related issue #3411 listSecrets broken for function keys in V2 (Runtime version: 2.0.12050.0)

@TurtleBeach
Copy link

I am both puzzled and frustrated with inconsistent and (apparently) meaningless errors now being generated by maven and VS Code builds.
I have updated to the 2.0.2 core function tools, yet maven and VS Code builds complain and imply that the core tools were not found:

[INFO] Step 7 of 7: Installing function extensions if needed
[WARNING] Failed to get Azure Functions Core Tools version locally
[WARNING] Local Azure Functions Core Tools does not support extension auto-install, skip it in the package phase.
[WARNING] Local version of Azure Functions Core Tools (null) does not match the latest (2.0.2). Please update it for the best experience. See: https://aka.ms/azfunc-install
[INFO] Function extension installation done.
[INFO] Successfully built Azure Functions.

local.settings.json looks like this (after supposedly installing java extension)
{
"IsEncrypted": false,
"Values": {
"AzureWebJobsStorage": "",
"AzureWebJobsDashboard": "",
"FUNCTION_WORKER_RUNTIME": "java"
},
"ConnectionStrings": {}
}

BUT when I run the package (locally so far) it reports:

[INFO] Azure Function App's staging directory found at: D:\Functions\neuralstudio-create-container\target\azure-functions\neuralstudio-create-container
[INFO] Azure Functions Core Tools found.
your worker runtime is not set. As of 2.0.1-beta.26 a worker runtime setting is required.
Please run func settings add FUNCTIONS_WORKER_RUNTIME <option> or add FUNCTIONS_WORKER_RUNTIME to your local.settings.json
Available options: dotnet, node

< graphic omitted >

Azure Functions Core Tools (2.0.2.0)
Function Runtime Version: 2.0.12115.0

and a few lines later:
[9/20/2018 5:51:50 PM] Initializing Host.
[9/20/2018 5:51:50 PM] Host initialization: ConsecutiveErrors=0, StartupCount=1
[9/20/2018 5:51:50 PM] Starting JobHost
[9/20/2018 5:51:50 PM] Starting Host (HostId=neuralstudio-869013314, InstanceId=631b09b3-8e17-48a2-9c7e-7cf6d0d5a93d, Version=2.0.12115.0, ProcessId=10768, AppDomainId=1, Debug=False, FunctionsExtensionVersion=)

Then the function runs as expected.

Development on Azure is difficult enough without this kind of aggravation - I spent a couple of hours trying to figure out what was going on before I realized the function was working. But now I fear that bad things will happen if I in fact deploy - I am particularly worried that there should be a value for "FunctionsExtensionVersion" in the last line shown above.

What is going on?
Jack

@TurtleBeach
Copy link

In retrospect my comment above should have been a new issue not a comment on list secrets broken.
Apologies.

@pragnagopa
Copy link
Member

@TurtleBeach - We found issue with core tools version. Will roll out a fix.

@pragathikadaganchi
Copy link

I have same error
Microsoft.Azure.WebJobs.Script.Rpc.LanguageWorkerProcessExitException.

Event time 9/25/2018, 4:36:28 PM  
Message D:\Program Files\FunctionsJava\zulu8.30.0.1-jdk8.0.172-win_x64\bin\java exited with code -1  
Exception type Microsoft.Azure.WebJobs.Script.Rpc.LanguageWorkerProcessExitException  
Failed method Unknown  
Sample rate 1  
Telemetry type exception
Telemetry type exception  
-- -- --
Device type PC  
Client IP address 0.0.0.0  
SDK version azurefunctions: 2.0.12115.0  
Cloud role name pragathistagging  
Cloud role instance b6d9dfe51aa28a85d17ea7ce379631fadc8ba4df84486d78a980d26ff66b9ad6  
Severity level Error  
Problem Id Microsoft.Azure.WebJobs.Script.Rpc.LanguageWorkerProcessExitException  
Assembly Unknown

Language used is java.

@ZombiesWithCoffee
Copy link

I'm receiving "The type or namespace name 'JobHostConfiguration' could not be found."

Which assembly did that method move to?

@ZombiesWithCoffee
Copy link

This code no longer compiles.
Where is JobHostConfiguration? I searched and couldn't find it on nuget
Where did RunAndBlock go? All I see now is StartAsync.
The method is now async. How should I change the call?

        var config = new JobHostConfiguration {
            JobActivator = new SimpleInjectorActivator(container),
            NameResolver = new QueueNameResolver()
        };

        if (config.IsDevelopment) {
            config.UseDevelopmentSettings();
        }

        var host = new JobHost(config);
        host.RunAndBlock();

@brettsam
Copy link
Member

@ZombiesWithCoffee -- WebJobs v3 now uses .NET Core hosting patterns with HostBuilder to construct and start the host. See our WebJobs sample here for an example: https://github.com/Azure/azure-webjobs-sdk/blob/dev/sample/SampleHost/Program.cs

@ZombiesWithCoffee
Copy link

Thank you @brettsam! That's a major update.

@scott-lin
Copy link

scott-lin commented Oct 25, 2018

EDIT: I've opened a separate issue (#3719) as I'm not sure if this thread is being triaged.


Let me know if I should open a separate issue, but this seemed like a good place.

I'm migrating from function runtime version 2.0.11961-alpha to 2.0.12134.0 (~2) now that GA for 2.0 has released. My function uses a queue trigger, so I've installed the Microsoft.Azure.WebJobs.Extensions.Storage extension via the Portal prompts. I've waited over 10 minutes for it to complete.

Now I'm seeing the following error toast in the Portal:

The function runtime is unable to start. System.Private.CoreLib: Exception has been thrown by the target of an invocation. Microsoft.Azure.WebJobs.Extensions.Storage: Specified argument was out of the range of valid values.
 Parameter name: value.

I believe I've followed all of the migration instructions, so I'm at a loss right now. Is something wrong with my Function settings, or do I need to take a code change?

Function Information

  • Function App name: devautorest-functions
  • Function name: autorestprocessor
  • Region: west us 2

host.json File

{
  "version": "2.0",
  "functionTimeout": "00:10:00",
  "extensions": {
        "queues": {
            "maxDequeueCount": 5,
            "batchSize": 1,
            "newBatchThreshold": 0
        }
    }
}

Queue Binding

{
    "bindings": [
        {
            "name": "clientLibraryId",
            "type": "queueTrigger",
            "direction": "in",
            "queueName": "clientlibraryrequest",
            "connection": "STORAGEACCOUNT_CONNECTIONSTRING"
        }
    ],
    "disabled": false
}

@brettsam
Copy link
Member

brettsam commented Dec 6, 2018

I'm going to go ahead and close this as we're now sufficiently past this release. If you find any new problems, please create a new issue and we will triage.

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

No branches or pull requests