Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Azure Service Bus 1.1 Failing to Start

Service Bus Gateway is not starting.

First of all I have tried completely uninstalling all Azure/Fabric/Service Bus type SDKs and installations. I have installed both Windows Azure Pack: Service Bus 1.1 and Windows Azure Pack: Security Update for Service Bus 1.1 (KB2972621) from scratch.

After deleting all service bus related databases I start the Service Bus Configuration wizard and begin starting a new farm with custom settings.

I leave everything default except adding my own certificates, and of course entering my password.

After clicking go the the service bus configuration wizard eventually gets stuck in progress:

Starting
Created and configured Service Bus farm management database.
Created and configured Service Bus gateway database.
Creating default container.

Processing completed
Validating input and configuration parameters.
Granting 'Log on as Service' privilege to the run as account.
Windows Fabric configuration started.
Running Windows Fabric deployment.
Windows Fabric starting.
Service Bus configuration started.
Updating database.
Service Bus services starting.

The event viewer logs for Microsoft-Service Bus > Operational has the following errors. Top error received first...

Exception during fabric service creation for container 1, Exception System.ArgumentException: At least one address must be provided if hostEndpoints is non-null
Parameter name: hostEndpoints
   at System.Fabric.FabricClient.InitializeFabricClient(SecurityCredentials credential, TimeSpan keepAliveInterval, String[] hostEndpoints)
   at System.Fabric.FabricClient..ctor(SecurityCredentials credential, String[] hostEndpoints)
   at Microsoft.ServiceBus.Commands.ServiceBusGetCommands.CreateFabricClient()
   at Microsoft.ServiceBus.Commands.ServiceBusCommandBase.RegisterWinFabricService(Int64 containerId)  

And then:

Service Bus Gateway service failed to start, retry count 1.  Exception message: An error occurred creating the configuration section handler for namespacePolicyDataStoreFactory: Could not load file or assembly 'Microsoft.Cloud.Common.AzureStorage, Version=2.1.0.0, Culture=neutral, PublicKeyToken=4fe77f22fa8374f3' or one of its dependencies. The system cannot find the file specified..  Stack Trace:    at System.Configuration.BaseConfigurationRecord.CallCreateSection(Boolean inputIsTrusted, FactoryRecord factoryRecord, SectionRecord sectionRecord, Object parentConfig, ConfigXmlReader reader, String filename, Int32 line)
   at System.Configuration.BaseConfigurationRecord.CreateSectionDefault(String configKey, Boolean getRuntimeObject, FactoryRecord factoryRecord, SectionRecord sectionRecord, Object& result, Object& resultRuntimeObject)
   at System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Boolean requestIsHere, Object& result, Object& resultRuntimeObject)
   at Microsoft.Cloud.ServiceBus.ServiceRegistryManagerContext.CreateNamespacePolicyDataManager(IComponentSite site)
   at Microsoft.Cloud.ServiceBus.ServiceRegistryManagerContext.LoadServices(IComponentSite site)
   at Microsoft.Cloud.ServiceBus.Common.Components.ComponentFactoryBase`1.CreateComponent()
   at Microsoft.Cloud.HostingModel.ComponentHost.CreateComponent(IComponentFactory componentFactory)
   at Microsoft.Cloud.HostingModel.ComponentHost.CreateComponents()
   at Microsoft.Cloud.HostingModel.ComponentHost.Open()
   at Microsoft.ServiceBus.Gateway.Gateway.OnStart(String[] args)

In Services the relevant services have the following statuses:

  • Service Bus Gateway: Starting
  • Service Bus Message Broker: Stopped
  • Service Bus Resource Provider: Stopped

Thanks

like image 777
Matt Canty Avatar asked Jun 08 '15 18:06

Matt Canty


People also ask

How do I enable an Azure Service Bus?

Using Azure CLI To create a queue with message sessions enabled, use the az servicebus queue create command with --enable-session set to true . To create a subscription for a topic with message sessions enabled, use the az servicebus topic subscription create command with --enable-session set to true .

What is user error in Azure Service Bus?

The following two types of errors are classified as user errors: - Client-side errors (In HTTP that would be 400 errors). - Errors that occur while processing messages, such as MessageLockLostException. The 400 error can occur due to multiple reason due to user coding error etc.

How do I check my Azure Service Bus queue?

With the peek functionality, you can use the Service Bus Explorer to view the top 100 messages in a queue, subscription or dead-letter queue. To peek messages, select Peek Mode in the Service Bus Explorer dropdown.

How do I connect to Azure Service Bus?

In order to connect to Azure Service Bus go to Azure portal, open the Service Bus namespace you want, then go to: Settings -> Shared access policies -> RootManageSharedAccessKey -> Primary connection string.


2 Answers

If you received this error after updating to NET framework v4.6+ then Microsoft have a fix for this now, download this Update for Service Bus Server 1.1 (KB3086798) http://www.microsoft.com/en-us/download/details.aspx?id=49496

like image 173
Jafin Avatar answered Oct 15 '22 16:10

Jafin


TL;DR;

  1. Download dropbox.com/s/cb5fro1rv... - thanks Arash Rahimi
  2. Navigate to your SDK tools
  3. sn -Vr Microsoft.Cloud.Common.AzureStorage.dll
  4. gacutil /i Microsoft.Cloud.Common.AzureStorage.dll

This issue was caused by installing the Visual Studio 2015 RC. Thankfully someone else has already experienced this and an answer has been posted.

Please see this answer on How do I report a bug in Windows Server Service Bus?

For whatever reason if the Dropbox link becomes obsolete. I have added it to Github.

like image 24
Matt Canty Avatar answered Oct 15 '22 15:10

Matt Canty