6

Im trying to set up push notifications with Azure at the moment but every time i go and try to set up a notification hub, it gives me an error saying the "Namespace already exists. Please enter a different name" enter image description here

Does anyone know a solution to this very strange issue?

Thanks

ADuggan
  • 501
  • 2
  • 8
  • 20

6 Answers6

4

The namespace has to be globally unique, since it forms part of the dns address of the service. You will have to add some more uniqueness to it for your purpose, else it's clashing with another azure service that someone else has already created.enter image description here

Russell Young
  • 2,033
  • 1
  • 14
  • 12
  • Ive tried a few other ones and it keeps showing that message. I could have something very unique and still get an error. – ADuggan Jun 27 '16 at 13:38
  • Ill try a few more i guess. – ADuggan Jun 27 '16 at 13:38
  • Problem with the names in your screenshot is theyre very generic and would be the kind of thing everyone might think of when building a test namespace. – Russell Young Jun 27 '16 at 13:45
  • Ive just tried "azurenamespacesareannoying", "moonbase02b2b", and "push-not-hub-service" there but Im still getting the same error...do they have to be in any particular format or anything? – ADuggan Jun 27 '16 at 14:00
  • Ive just tried a few and not had any problems - eg. "rypushnotificationhub-ns" – Russell Young Jun 27 '16 at 14:41
  • Thats very strange. I tried the portal in a different browser and still no luck. – ADuggan Jun 28 '16 at 07:48
  • 1
    I've tried 'asdfsdfsdcsadcasdcasdcsadcaSCa' and still get the same error. – c.lamont.dev Jul 07 '18 at 07:57
  • This solved my problem. globally unique is very hard to accomplish on a mature platform like azure... but I added some random letters and it works. :) – FelixH Aug 22 '20 at 09:03
  • I tried generating a couple of new GUIDs and used them in for the namespace name - same error, namespace already exists. Seems that Microsoft managed to break the uniqueness of guids! So useless... – Valery Gavrilov May 11 '21 at 21:33
  • Old issue, but in case this helps someone. Experiencing the same issue as others. I solved the issue by deploying resource using ARM template. – vcraigc Oct 27 '21 at 18:21
4

Please check if you are (co-)administrator for the subscription you try to create the namespace in. If you only are owner of the ResourceGroup you try to create the namespace in, you will receive this misleading error message.

The reason for this is: Notification Hubs are implemented based on Service Bus, but Service Bus needs subscription level admin rights to be created.

I got the same error when I tried to create a namespace when I was only Resource Group admin but not subscription admin, but once I became subscription admin I had no problems whatsoever.

Masterfu
  • 1,191
  • 3
  • 14
  • 26
2

I ran into this issue and determined that it was because my free trail had ended. I created a new account, started a new free trial and it worked.

Dave Justen
  • 151
  • 5
0

I just start using Azure for the first time and encounter the same problem. each time I try to create a ServiceBus, I got this error message: Namespace already exists. Enter a different name.

Before we can create a Service Bus we should follow the below steps:

  • 1st Activate your Subscriptions: From the Azure home page, go into your Subscriptions. (If you don't see it, at the top-middle of Azure home page search for Subscriptions) On the Subscriptions page, create a new one, if you do not have any or an Activate subscription. If you have one Disabled subscription then try to Activate it.
  • 2nd Create a Resource Groups: Go to this page and create one!
  • 3rd Create Service Bus: Now we are ready to create a Service Bus! Search for it in the search box then go into its page and hit the "Create a Service Bus" button and follow the wizard pages.

NOTE 1: Some of our friends already mentioned some of these steps in more detail, so make sure to check them out!

NOTE 2: The worse thing about this problem is that Microsoft shows: Namespace already exists. Enter a different name. message over and over without saying why and what is the problem!!??

Happy Coding!

MRK
  • 320
  • 5
  • 11
-1

In general try to resolve <namespace name>.servicebus.windows.net IP address, for example on Windows it is nslookup <namespace name>.servicebus.windows.net. If you can get the IP address, then the namespace name is already taken, otherwise you should be able to create namespace.

Dmitry P.
  • 159
  • 4
-1

Namespace is supposed to be a unique name. The namespace name PushNotificationHub-ns is already taken. I am not having any issues using any name. Can you try using a different browser or use the old azure portal and see if you can create a namespace there

  • 1
    You posted the same answer that someone else already posted several hours earlier, and the OP already responded to that answer, stating they tried other names as well. – David Makogon Jun 27 '16 at 22:03