{"action":"closed","issue":{"url":"https://api.github.com/repos/Azure/azure-webjobs-sdk/issues/1579","repository_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk","labels_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk/issues/1579/labels{/name}","comments_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk/issues/1579/comments","events_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk/issues/1579/events","html_url":"https://github.com/Azure/azure-webjobs-sdk/issues/1579","id":297825675,"number":1579,"title":"EventProcessorHost Exception: A receiver with a higher epoch","user":{"login":"charlesw23","id":36480937,"avatar_url":"https://avatars0.githubusercontent.com/u/36480937?v=4","gravatar_id":"","url":"https://api.github.com/users/charlesw23","html_url":"https://github.com/charlesw23","followers_url":"https://api.github.com/users/charlesw23/followers","following_url":"https://api.github.com/users/charlesw23/following{/other_user}","gists_url":"https://api.github.com/users/charlesw23/gists{/gist_id}","starred_url":"https://api.github.com/users/charlesw23/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/charlesw23/subscriptions","organizations_url":"https://api.github.com/users/charlesw23/orgs","repos_url":"https://api.github.com/users/charlesw23/repos","events_url":"https://api.github.com/users/charlesw23/events{/privacy}","received_events_url":"https://api.github.com/users/charlesw23/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-02-16T15:39:01Z","updated_at":"2018-03-09T21:25:49Z","closed_at":"2018-03-09T21:25:49Z","author_association":"NONE","body":"**SUMMARY:**\r\nWhen an EventProcessorHost is holding open a connection and the Receiver with a higher epoch and another instance of the webjob tries to connect.  An exception gets thrown internally that does not bubble up.  The EventProcessorHost does not receive any events due to the  error and then the [EventHubTrigger] does not fire\r\n\r\n**REPRO:**\r\n1. In azure Create the following resources: EventHub, StorageAccount1, StorageAccount2, ApplicationServicePlan with your Webjob\r\n\r\n3. Create a consumer group in your EventHub\r\n\r\n2. Create an application that implements EventProcessorHost using StorageAccount1.\r\n\r\nProgram.cs\r\n\r\n```csharp\r\npublic static void Setup()\r\n        {\r\n_eventProcessorHost = new EventProcessorHost(eventProcessorHostName, EventHubName, ConsumerGroupName, EvnetHubConnectionString, eventProcessorStorageString);\r\n\r\nJobHostConfig.DashboardConnectionString = storageConnectionStirng; \r\nJobHostConfig.StorageConnectionString = storageConnectionStirng;\r\n\r\n EventHubConfig.AddEventProcessorHost(\"EventHubListener\", _eventProcessorHost);\r\n JobHostConfig.UseEventHub(EventHubConfig);\r\n JobHostConfig.Tracing.ConsoleLevel = TraceLevel.Verbose;  //want to see all the things\r\n var host = new JobHost(JobHostConfig);\r\n host.RunAndBlock();\r\n}\r\n```\r\n\r\nFunctions.cs\r\n```csharp\r\n public static async Task Trigger([EventHubTrigger(\"EventHubListener\")] EventData[] inEventDatas)\r\n{\r\nvar SetBreakPointHere = 1;\r\n}\r\n```\r\n\r\n3. Deploy Application to Azure and Run Against your EventHub \r\n\r\n4. In your local Dev environment change the application to use StorageAccount2 for all of the things.\r\n\r\n5. Run the application in your local dev environment and create a breakpoint at the following line in functions.cs\r\nvar SetBreakPointHere = 1;\r\n\r\n6. Send Events to the EventHub\r\n\r\nnote: you can get the Exceptions that bubble up out of the event hub libs by attaching to the event hub with ServiceBusExplorer.exe found \r\n\r\n[ServiceBusExplorer](https://github.com/paolosalvatori/ServiceBusExplorer)\r\n\r\n\r\n#### Expected behavior\r\n\r\nApplication should bubble up the following error for the partition listeners\r\n\r\n<14:00:15> Exception: A receiver with a higher epoch '14084' already exists. A new receiver with epoch 0 cannot be created. Make sure you are creating receiver with increasing epoch value to ensure connectivity, or ensure all old epoch receivers are closed or disconnected. TrackingId:ddd20f17-3daf-4d6b-a146-9d9b49e65196_B21, SystemTracker:dec2017:eventhub:dec2017sub~18431|consumergroup, Timestamp:2/15/2018 7:00:14 PM Reference:3547ee92-3e03-4419-8361-712f96e50f48, TrackingId:f6d2380f-9496-400d-942a-89707c7dcff3_B21, SystemTracker:dec2017:eventhub:dec2017sub~18431|consumergroup, Timestamp:2/15/2018 7:00:14 PM TrackingId:937226b8a5c24c80a3c546862c303f68_G17, SystemTracker:gateway2, Timestamp:2/15/2018 7:00:14 PM\r\n\r\n\r\n#### Actual behavior\r\n\r\nNothing, no error break point does not fire\r\n\r\n\r\n#### Related information \r\n\r\nProvide any related information \r\n\r\nFeel free to contact me if you need help with reproduction of this bug.\r\n"}}
{"actor":{"display_login":"pragnagopa"}}