SchedulerException: Permission DeniedHi,<br/> <br/> A service runs under UserX account. It can make the following call without any problem:<br/> <br/> <pre>var scheduler = new Scheduler(); scheduler.Connect(gridHeadNodeName);</pre> <br/> but when it actually submits a job<br/>   <pre>scheduler.SubmitJob(schedulerJob, UserXDomainName, UserXPassword);</pre> <br/>  the follwoing exception is thrown:<br/> <pre lang="x-c#">SchedulerException: Permission denied. at Microsoft.Hpc.Scheduler.Store.StoreServer.Task_AddTaskToJob(Int32 jobId, Int32&amp;amp; taskId, StoreProperty[] taskProps) at Microsoft.Hpc.Scheduler.Store.JobEx.CreateTask(StoreProperty[] taskProperties) at Microsoft.Hpc.Scheduler.SchedulerTask.CreateTask(IClusterJob job, Int32 rootGroupId, Dictionary`2 taskGroupIdMapping) at Microsoft.Hpc.Scheduler.SchedulerJob.CreateJob() at Microsoft.Hpc.Scheduler.SchedulerJob.Submit(ISchedulerStore store, String username, String password)</pre> The code worked last week and I'm wondering what rights disappeared that it stopped working. Any idea how I can figure out what rights are missing and how to add them?<br/> <br/> Thanks<br/> <br/> Pawel<br/> <br/>© 2009 Microsoft Corporation. All rights reserved.Wed, 27 May 2009 15:04:52 Za20be925-3380-4247-aa3a-5d9a93c58b0chttp://social.microsoft.com/Forums/en-US/windowshpcdevs/thread/a20be925-3380-4247-aa3a-5d9a93c58b0c#a20be925-3380-4247-aa3a-5d9a93c58b0chttp://social.microsoft.com/Forums/en-US/windowshpcdevs/thread/a20be925-3380-4247-aa3a-5d9a93c58b0c#a20be925-3380-4247-aa3a-5d9a93c58b0cPawelPabichhttp://social.microsoft.com/Profile/en-US/?user=PawelPabichSchedulerException: Permission DeniedHi,<br/> <br/> A service runs under UserX account. It can make the following call without any problem:<br/> <br/> <pre>var scheduler = new Scheduler(); scheduler.Connect(gridHeadNodeName);</pre> <br/> but when it actually submits a job<br/>   <pre>scheduler.SubmitJob(schedulerJob, UserXDomainName, UserXPassword);</pre> <br/>  the follwoing exception is thrown:<br/> <pre lang="x-c#">SchedulerException: Permission denied. at Microsoft.Hpc.Scheduler.Store.StoreServer.Task_AddTaskToJob(Int32 jobId, Int32&amp;amp; taskId, StoreProperty[] taskProps) at Microsoft.Hpc.Scheduler.Store.JobEx.CreateTask(StoreProperty[] taskProperties) at Microsoft.Hpc.Scheduler.SchedulerTask.CreateTask(IClusterJob job, Int32 rootGroupId, Dictionary`2 taskGroupIdMapping) at Microsoft.Hpc.Scheduler.SchedulerJob.CreateJob() at Microsoft.Hpc.Scheduler.SchedulerJob.Submit(ISchedulerStore store, String username, String password)</pre> The code worked last week and I'm wondering what rights disappeared that it stopped working. Any idea how I can figure out what rights are missing and how to add them?<br/> <br/> Thanks<br/> <br/> Pawel<br/> <br/>Wed, 20 May 2009 08:58:52 Z2009-05-20T08:58:52Zhttp://social.microsoft.com/Forums/en-US/windowshpcdevs/thread/a20be925-3380-4247-aa3a-5d9a93c58b0c#e4970492-4916-42c3-9388-6c16f476ff17http://social.microsoft.com/Forums/en-US/windowshpcdevs/thread/a20be925-3380-4247-aa3a-5d9a93c58b0c#e4970492-4916-42c3-9388-6c16f476ff17PawelPabichhttp://social.microsoft.com/Profile/en-US/?user=PawelPabichSchedulerException: Permission DeniedOk , I solved the problem.<br/> <br/> This is a (.NET Reflector) code snippet from JobQueryContext.ValidateCaller<br/> <br/> <pre> if (this._owner != ntIdentity.Name)<br/> {<br/> if (!new WindowsPrincipal(ntIdentity).IsInRole(WindowsBuiltInRole.Administrator))<br/> {<br/> return new CallResult(-2147220981);<br/> }<br/> base._role = CallerRole.AdminUser;<br/> } </pre> The comparison is case sensitive and the check actually passes for the following values:<br/> DOMAIN\user and DOMAIN\USER. My user is not in Administrator role and that's why I got &quot;Permission Denied&quot; error message. I don't know how the data got out of sync with the data in AD. I fixed the casing and all works fine. <br/> <br/> I consider this a bug as the comparison should be <strong>case-insensitive</strong> .<span><span><em></em> </span> </span> Windows treats user names in case-insensitive way thus I don't see why HPCScheduler should more strict.<br/> <br/> Thanks<br/> <br/> Pawel<br/>Thu, 21 May 2009 05:53:10 Z2009-05-21T05:54:05Zhttp://social.microsoft.com/Forums/en-US/windowshpcdevs/thread/a20be925-3380-4247-aa3a-5d9a93c58b0c#cfa74123-9385-4e7b-ba43-ffe457ef4e0fhttp://social.microsoft.com/Forums/en-US/windowshpcdevs/thread/a20be925-3380-4247-aa3a-5d9a93c58b0c#cfa74123-9385-4e7b-ba43-ffe457ef4e0fJeff Baxterhttp://social.microsoft.com/Profile/en-US/?user=Jeff%20BaxterSchedulerException: Permission DeniedHi Pawel<br/><br/>Thanks for root causing this for us! Yes, this is a bug in our code - we've checked this fix into the service pack branch, so it will be part of our SP1 release in a few weeks.<br/><br/>cheers<br/>jeff<br/> Wed, 27 May 2009 15:04:52 Z2009-05-27T15:04:52Z