NServiceBus icon indicating copy to clipboard operation
NServiceBus copied to clipboard

Queue permission error when running NServiceBus.Host.exe from the command line

Open Bishbulb opened this issue 14 years ago • 5 comments

In v3.2.2279, when I run the NServiceBus.Host.exe from a command line, I get the following error:

"The queue does not exist or you do not have sufficient permissions to perform the operation."

I have Windows 7 with UAC disabled. I opened the command window by right clicking and selecting "Run as Administrator". Running in Powershell yields the same error.

I have found two ways to get around this:

  1. Run NServiceBus.Host.exe /installinfrastructure
  2. Run NServiceBus.Host.exe from a Visual Studio debugger (without special command line switches)

Any ideas why the behaviour is different between the command line and Visual Studio? Is the expectation that people will run the host with "/installinfrastructure" at least once before ever trying to just run the handler?

Bishbulb avatar Jun 01 '12 04:06 Bishbulb

It is worth noting that I have ran these endpoints many times in the past on version 3.0.2; its only after upgrading to 3.2.2279 that I am seeing this issue. I'm pretty sure the error is occurring because NSB is trying to create the queues for the second-level retry feature that is new in 3.2.

Bishbulb avatar Jun 01 '12 04:06 Bishbulb

Nsb now defaults to the production profile. This means that installers are only invoked on /install or if you run inside vs. Would this explain your issues?

Sent from my iPhone

On 1 jun 2012, at 06:10, Dan Bishop [email protected] wrote:

In v3.2.2279, when I run the NServiceBus.Host.exe from a command line, I get the following error:

"The queue does not exist or you do not have sufficient permissions to perform the operation."

I have Windows 7 with UAC disabled. I opened the command window by right clicking and selecting "Run as Administrator". Running in Powershell yields the same error.

There are two ways to resolve this:

  1. Run NServiceBus.Host.exe /installinfrastructure
  2. Run NServiceBus.Host.exe from a Visual Studio debugger (without special command line switches)

Any ideas why the behaviour is different between the command line and Visual Studio? Is the expectation that people will run the host with "/installinfrastructure" at least once before ever trying to just run the handler?


Reply to this email directly or view it on GitHub: https://github.com/NServiceBus/NServiceBus/issues/434

andreasohlund avatar Jun 01 '12 05:06 andreasohlund

Yes, that explains it then. Do you know when the switch was made to run the Production profile by default?

Bishbulb avatar Jun 01 '12 12:06 Bishbulb

That was somewhere around 3.0.1-3.0.2

On Fri, Jun 1, 2012 at 2:00 PM, Dan Bishop < [email protected]

wrote:

Yes, that explains it then. Do you know when the switch was made to run the Production profile by default?


Reply to this email directly or view it on GitHub: https://github.com/NServiceBus/NServiceBus/issues/434#issuecomment-6058822

http://andreasohlund.net http://twitter.com/andreasohlund

andreasohlund avatar Jun 01 '12 12:06 andreasohlund

No problem exists here. It was just a training issue about the switch to using the Production profile instead of the Lite profile by default.

Bishbulb avatar Jun 01 '12 12:06 Bishbulb