471,620 Members | 1,184 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,620 software developers and data experts.

Cluster Automation Server: Access Denied for [NT AUTHORITY\SYSTEM]

Hi All,

I'm hoping someone will have some words of wisdom for me regarding MS
Clustering on Windows 2003.

I have a service that runs on a cluster. During invocation it's
supposed to determine from the cluster which node is active (this is a
active/standby configuration) and either proceed or sleep depending on
the status. The interface to the cluster is that advertised by the
standard interop layer built by Visual Studio for the Microsoft Cluster
Service Automation Classes (MSClusterLib)

The problem is that when the service runs under the Local System
context the call to the open the cluster object fails with an Access
Denied exception being reported from the underlying COM interface.

System.UnauthorizedAccessException: Access is denied. (Exception from
HRESULT: 0x80070005 (E_ACCESSDENIED)) at
MSClusterLib.ClusterClass.Open(String bstrClusterName)

Strangely, when running under a domain account (granted, one that is a
member of the local administators group) it works fine (either as a
service, or from a console based app that invokes the same clustering
wrapper that I wrote). A low privileged, local account account also
fails. According to the cluster adminstator application, SYSTEM has
Full Control granted for the cluster. I've also verified that I am
actually running under the correct context after setting
AppDomain.CurrentDomain.SetSecurityPrincipal(Princ ipalPolicy.WindowsPrincipal)

I guess what I'm looking for are some ideas of where to start looking.
The infuriating this is that this *has* worked previously, and the fact
that I can get success when executing under my own account context at
least proves that the code is not fundamentally flawed.

Hopefully someone has some thoughts that they'd care to share. I'm
enclosing a sample (vb rather than C#) so you can see what I'm talking
about (and how there's not a lot that I can actually mess up here)

Public Sub New(ByVal cluster As String)
clusterToQuery = cluster
clusterIntf = New MSClusterLib.Cluster
Try
If Not clusterIntf Is Nothing Then
clusterIntf.Open(cluster) <------ the
exception is raised here.
Else
Throw New ClusterOpenFailException(cluster, "Cannot
open cluster")
End If
Catch ex As System.Runtime.InteropServices.COMException
Throw New ClusterOpenFailNoRPC("Cluster", ex)
Catch ex As Exception
Throw New ClusterOpenFailException(cluster, "Cannot
open cluster", ex)
End Try
End Sub

Regards

Simon

Dec 7 '06 #1
3 5241
"Simon" <si**********@gmail.comwrote in message
news:11*********************@73g2000cwn.googlegrou ps.com...
Hi All,

I'm hoping someone will have some words of wisdom for me regarding MS
Clustering on Windows 2003.

I have a service that runs on a cluster. During invocation it's
supposed to determine from the cluster which node is active (this is a
active/standby configuration) and either proceed or sleep depending on
the status. The interface to the cluster is that advertised by the
standard interop layer built by Visual Studio for the Microsoft Cluster
Service Automation Classes (MSClusterLib)

The problem is that when the service runs under the Local System
context the call to the open the cluster object fails with an Access
Denied exception being reported from the underlying COM interface.

System.UnauthorizedAccessException: Access is denied. (Exception from
HRESULT: 0x80070005 (E_ACCESSDENIED)) at
MSClusterLib.ClusterClass.Open(String bstrClusterName)

Strangely, when running under a domain account (granted, one that is a
member of the local administators group) it works fine (either as a
service, or from a console based app that invokes the same clustering
wrapper that I wrote). A low privileged, local account account also
fails. According to the cluster adminstator application, SYSTEM has
Full Control granted for the cluster. I've also verified that I am
actually running under the correct context after setting
AppDomain.CurrentDomain.SetSecurityPrincipal(Princ ipalPolicy.WindowsPrincipal)

I guess what I'm looking for are some ideas of where to start looking.
The infuriating this is that this *has* worked previously, and the fact
that I can get success when executing under my own account context at
least proves that the code is not fundamentally flawed.

Hopefully someone has some thoughts that they'd care to share. I'm
enclosing a sample (vb rather than C#) so you can see what I'm talking
about (and how there's not a lot that I can actually mess up here)

Public Sub New(ByVal cluster As String)
clusterToQuery = cluster
clusterIntf = New MSClusterLib.Cluster
Try
If Not clusterIntf Is Nothing Then
clusterIntf.Open(cluster) <------ the
exception is raised here.
Else
Throw New ClusterOpenFailException(cluster, "Cannot
open cluster")
End If
Catch ex As System.Runtime.InteropServices.COMException
Throw New ClusterOpenFailNoRPC("Cluster", ex)
Catch ex As Exception
Throw New ClusterOpenFailException(cluster, "Cannot
open cluster", ex)
End Try
End Sub

Regards

Simon


Please (cross)post the the appropriate NG, VB is not Csharp. That said, IMO you are using
"localsytem" account to open a remote cluster server, this is simply not possible, you have
to run your code in an account that has administrative privileges on the (remote) cluster.

Willy.

Dec 7 '06 #2
I was sure I'd posted a response to this, but it looks like it never
showed up.

It's not obvious from my posting, but this code is executing directly
on the cluster servers rather than from a remote workstation or server.
The end application is performing audits against SQL Server instances
and the idea is for it to determine if the hosting server is clustered
and if so to query the cluster and only execute on the node that is
owning the sql server resource but for to sleep on the standby members
(so I don't have extra audits originating from standby cluster members)

My example was just to show that I was essentially calling the open
method of the interop assembly that VS2005 produces and IMO there's
likely to be more experience with clustering here than in the vb groups
as more places *seem* to use c# for this type of enterprise stuff. I'm
looking for people with a bit of experience with clustering under .NET
rather than for a specific language resolution as I suspect that this
is a COM/Clustering issue. Hope that clarifies things a bit.

Cheers

On Dec 7, 8:43 pm, "Willy Denoyette [MVP]"
<willy.denoye...@telenet.bewrote:
"Simon" <simon.dev...@gmail.comwrote in messagenews:11*********************@73g2000cwn.goo glegroups.com...


Hi All,
I'm hoping someone will have some words of wisdom for me regarding MS
Clustering on Windows 2003.
I have a service that runs on a cluster. During invocation it's
supposed to determine from the cluster which node is active (this is a
active/standby configuration) and either proceed or sleep depending on
the status. The interface to the cluster is that advertised by the
standard interop layer built by Visual Studio for the Microsoft Cluster
Service Automation Classes (MSClusterLib)
The problem is that when the service runs under the Local System
context the call to the open the cluster object fails with an Access
Denied exception being reported from the underlying COM interface.
System.UnauthorizedAccessException: Access is denied. (Exception from
HRESULT: 0x80070005 (E_ACCESSDENIED)) at
MSClusterLib.ClusterClass.Open(String bstrClusterName)
Strangely, when running under a domain account (granted, one that is a
member of the local administators group) it works fine (either as a
service, or from a console based app that invokes the same clustering
wrapper that I wrote). A low privileged, local account account also
fails. According to the cluster adminstator application, SYSTEM has
Full Control granted for the cluster. I've also verified that I am
actually running under the correct context after setting
AppDomain.CurrentDomain.SetSecurityPrincipal(Princ ipalPolicy.WindowsPrincip*al)
I guess what I'm looking for are some ideas of where to start looking.
The infuriating this is that this *has* worked previously, and the fact
that I can get success when executing under my own account context at
least proves that the code is not fundamentally flawed.
Hopefully someone has some thoughts that they'd care to share. I'm
enclosing a sample (vb rather than C#) so you can see what I'm talking
about (and how there's not a lot that I can actually mess up here)
Public Sub New(ByVal cluster As String)
clusterToQuery = cluster
clusterIntf = New MSClusterLib.Cluster
Try
If Not clusterIntf Is Nothing Then
clusterIntf.Open(cluster) <------ the
exception is raised here.
Else
Throw New ClusterOpenFailException(cluster, "Cannot
open cluster")
End If
Catch ex As System.Runtime.InteropServices.COMException
Throw New ClusterOpenFailNoRPC("Cluster", ex)
Catch ex As Exception
Throw New ClusterOpenFailException(cluster, "Cannot
open cluster", ex)
End Try
End Sub
Regards
SimonPlease (cross)post the the appropriate NG, VB is not Csharp. That said, IMO you are using
"localsytem" account to open a remote cluster server, this is simply not possible, you have
to run your code in an account that has administrative privileges on the (remote) cluster.

Willy.- Hide quoted text -- Show quoted text -
Dec 12 '06 #3
"Simon" <si**********@gmail.comwrote in message
news:11**********************@n67g2000cwd.googlegr oups.com...
I was sure I'd posted a response to this, but it looks like it never
showed up.

It's not obvious from my posting, but this code is executing directly
on the cluster servers rather than from a remote workstation or server.
The end application is performing audits against SQL Server instances
and the idea is for it to determine if the hosting server is clustered
and if so to query the cluster and only execute on the node that is
owning the sql server resource but for to sleep on the standby members
(so I don't have extra audits originating from standby cluster members)

My example was just to show that I was essentially calling the open
method of the interop assembly that VS2005 produces and IMO there's
likely to be more experience with clustering here than in the vb groups
as more places *seem* to use c# for this type of enterprise stuff. I'm
looking for people with a bit of experience with clustering under .NET
rather than for a specific language resolution as I suspect that this
is a COM/Clustering issue. Hope that clarifies things a bit.

Cheers

You are running this as a service in the "localsystem" account, this account is a LOCAL
account which has not network access privilege, that is, the service cannot access a "remote
"resource and that's exactly what *MSClusterLib.ClusterClass.Open(String bstrClusterName)*
is trying to do. The argument bstrClusterName denotes a "network resource", the COM client
doesn't care whether it's actually pointing to a local or remote resource, the client's
token has no network access privileges, result Access Denied for [NT AUTHORITY\SYSTEM]. Your
only option is to run this in the "cluster administrator account" (a domain account).

Willy.

Dec 12 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

17 posts views Thread by Peter Ericsson | last post: by
2 posts views Thread by Kosic | last post: by
4 posts views Thread by Andy | last post: by
1 post views Thread by Ron | last post: by
3 posts views Thread by Bruno LIVERNAIS | last post: by
reply views Thread by leo001 | last post: by
1 post views Thread by ZEDKYRIE | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.