473,387 Members | 1,512 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 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 5392
"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Jon Rista | last post by:
Hello. I'm trying to automate Excel in a C# Windows Service. This windows service has to be able to access files on network shares, so it uses a domain account on a WinNT 4.0 domain server, rather...
17
by: Peter Ericsson | last post by:
Does anyone know if Microsoft plans to implement an C# (.net) API for MS Cluster like the one in C++? Or has someone else written a C# wrapper for the C++ API?
2
by: Kosic | last post by:
i wrote this js function in HTML: function OpenWord() { var a = new ActiveXObject("Word.Application"); a.Visible = true; a.WindowState = 1; window.blur(); a.Activate(); } if the it runs at...
4
by: Andy | last post by:
I am trying to do the following from an ASP.NET Web Application (C#). User fills out a form. The program takes those answers and merges them with a WORD document. I have tried the few examples...
1
by: Ron | last post by:
Hi there, We have a web application written in C# that need to deal with MS word 2003. it works fine on developer's machine but when we deployed it on web server, we got error msg says "Access...
2
by: Ron | last post by:
Hi there, We have a web application written in C# that need to deal with MS word 2003. it works fine on developer's machine but when I deployed it on web server, we got error msg says "Access is...
1
by: Ron | last post by:
Hi there, We have a web application written in C# that need to deal with MS word 2003. it works fine on developer's machine but when I deployed it on web server, we got error msg says "Access is...
0
by: abdellatif | last post by:
hi all i have installed a 2 nodes cluster (active/passive)win2003 sp1 containing an exchange2003 virtual server and sqlserver2000(sp3) virtual server. everything work well, after 1 month the...
3
by: Bruno LIVERNAIS | last post by:
Hi, We are currently installing a DB2 V9 ESE on a Linux server (RHEL4U4-x86_64). Installation runs successfully on each node. Database user environment is OK and the instance is well created. To...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

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.