NServiceBus icon indicating copy to clipboard operation
NServiceBus copied to clipboard

No permission for queue causing process kill

Open rosieks opened this issue 14 years ago • 5 comments

When there is no permission to queue, NServiceBus is killing current process. It isn't so good because if I have wcf or web application hosted on IIS that cause Application Pool stop and shutdown all web sites running under that pool. I think that NServiceBus shouldn't decide if I want to kill my application (at least in self hosted scenario) - it's not NServiceBus responsibility.

rosieks avatar Jan 11 '12 19:01 rosieks

Yes, that makes sense. We should add a check to see if we're running in self hosted mode and not kill the process if that is true

On Wed, Jan 11, 2012 at 7:47 PM, rosieks < [email protected]

wrote:

When there is no permission to queue, NServiceBus is killing current process. It isn't so good because if I have wcf or web application hosted on IIS that cause Application Pool stop and shutdown all web sites running under that pool. I think that NServiceBus shouldn't decide if I want to kill my application (at least in self hosted scenario) - it's not NServiceBus responsibility.


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

andreasohlund avatar Jan 11 '12 22:01 andreasohlund

If not running in self-hosted mode, will NServiceBus kill the process if the error queue doesn't exist or doesn't have the correct permissions? I know that in v2.0, the existence and permissions of the error queue were not being checked during the startup sequence of NServiceBus.Host.exe. We had a situation where we went to production with a non-existent error queue defined in the host configuration.

Bishbulb avatar Jan 23 '12 13:01 Bishbulb

Hi Dan,

The implemented default behavior is not killing the process. The default behavior is setting the number of receiving threads to zero. There is a check for non-existent and for no-permission. So the OnCriticalErrorAction will be triggered in those cases. Regarding your comment "We had a situation where we went to production with a non-existent error queue defined in the host configuration." did you mention this as it is a required behavior? or something NServiceBus should not allow?

shlomii avatar Jan 23 '12 13:01 shlomii

I think it would be great if NServiceBus performed the appropriate validation of all input & error queues when the host is started up. That way, you would get immediate feedback that there is something wrong with your configuration.

It seems reasonable that the process would just get killed if you are using the generic NServiceBus.Host.exe, but I'd be fine with a critical error being thrown & logged.

Its possible that NSB is already implementing the behaviour that I describe. I know that with v2.0 the error queue was not validated on startup.

Dan

On Mon, Jan 23, 2012 at 8:34 AM, Shlomi Izikovich < [email protected]

wrote:

Hi Dan,

The implemented default behavior is not killing the process. The default behavior is setting the number of receiving threads to zero. There is a check for non-existent and for no-permission. So the OnCriticalErrorAction will be triggered in those cases. Regarding your comment "We had a situation where we went to production with a non-existent error queue defined in the host configuration." did you mention this as it is a required behavior? or something NServiceBus should not allow?


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

Bishbulb avatar Jan 23 '12 13:01 Bishbulb

Dan, we can only check local queues (which we should). But the fact that both audit and error queues probably are going to be remote there is nothing we can do to be 100% certain. Shlomi: Can you verify that we check that the error queue is good if its a local queue

On Mon, Jan 23, 2012 at 2:46 PM, Dan Bishop < [email protected]

wrote:

I think it would be great if NServiceBus performed the appropriate validation of all input & error queues when the host is started up. That way, you would get immediate feedback that there is something wrong with your configuration.

It seems reasonable that the process would just get killed if you are using the generic NServiceBus.Host.exe, but I'd be fine with a critical error being thrown & logged.

Its possible that NSB is already implementing the behaviour that I describe. I know that with v2.0 the error queue was not validated on startup.

Dan

On Mon, Jan 23, 2012 at 8:34 AM, Shlomi Izikovich < [email protected]

wrote:

Hi Dan,

The implemented default behavior is not killing the process. The default behavior is setting the number of receiving threads to zero. There is a check for non-existent and for no-permission. So the OnCriticalErrorAction will be triggered in those cases. Regarding your comment "We had a situation where we went to production with a non-existent error queue defined in the host configuration." did you mention this as it is a required behavior? or something NServiceBus should not allow?


Reply to this email directly or view it on GitHub:

https://github.com/NServiceBus/NServiceBus/issues/176#issuecomment-3613783


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

andreasohlund avatar Jan 23 '12 20:01 andreasohlund