locked
Access is denied. RRS feed

  • Question

  • Hello everyone 

    I am working with SOA jobs.

    I changed HPC 2016 to HPC 2016 update 1 and after it I have the issue below. 

    Message: Access is denied.

    Server stack trace: 
       at System.ServiceModel.Channels.ServiceChannel.ThrowIfFaultUnderstood(Message reply, MessageFault fault, String action, MessageVersion version, FaultConverter faultConverter)
       at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
       at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
       at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
       at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

    Please help me to fix it

    thanks

    Artem

    Monday, January 29, 2018 1:59 PM

Answers

  • Hi,

    This could be related to a regression of HPC Pack 2016 Update 1.

    Please add following section to your service configuration file and check if it still persists.

      <system.serviceModel>
        <bindings>
          <netTcpBinding>        
            <!--binding used by broker's backend-->
            <binding name="Microsoft.Hpc.BackEndBinding" maxConnections="1000">
              <!--for non domain joined compute nodes, the security mode should be None-->
              <security mode="Transport">
                <transport clientCredentialType="Windows" protectionLevel="None"/>
              </security>
            </binding>
          </netTcpBinding>
        </bindings>
      </system.serviceModel>

    Thanks,
    Zihao


    • Marked as answer by Artem Azaryan Thursday, February 1, 2018 6:46 AM
    Thursday, February 1, 2018 3:44 AM

All replies

  • Hi,

    Which version your server and client are? Please note HPC Pack 2016 Update 1 client can not work with HPC Pack 2016 cluster.

    Only service side stack trace is not helpful. Is there client side stack trace available? Or can you provide a minimal code sample for us to reproduce this issue?

    Thanks,
    Zihao

    Tuesday, January 30, 2018 5:43 AM
  • Hi Zihao

    My servers is HPC 2016 update 1(without fail over, there are one head node and one compute node) and client is 5.1.6086 (NuGet Package).

    Below you can find sample code

    wcf part 

    [ServiceContract] publicinterfaceIInteractiveJob {     [OperationContract]     bool Start();     [OperationContract]     bool Stop(); }

                  
        [ServiceBehavior(ConcurrencyMode = ConcurrencyMode.Multiple, InstanceContextMode = InstanceContextMode.Single)]
        publicclassInteractiveJob : IInteractiveJob
        {
            publicbool Start()
            {          
                Logging.SaveToLog("------------------Start------------------");
                return true;
            }
     
            publicbool Stop()
            {
                Logging.SaveToLog("-----------------Stop-------------------");
                return true;
             }
         }
    

    I have created proxy used SvcUtil.exe. Used that proxy. Below you can find my client.

    SessionStartInfo startInfo; Session session; startInfo = newSessionStartInfo(headnode, servicename); startInfo.SessionResourceUnitType = SessionUnitType.Core; startInfo.MinimumUnits = 1; startInfo.MaximumUnits = 1; startInfo.ShareSession = true; startInfo.TransportScheme = TransportScheme.NetTcp; startInfo.JobTemplate = "template1"; startInfo.UseSessionPool = false; Session.SetInterfaceMode(false/*GUI*/, (IntPtr)null);

    session = Session.CreateSession(startInfo);//the session creates, In cluster manager I am able to see that job session.AutoClose = false; InteractiveJobClient JobProxy = newInteractiveJobClient(newNetTcpBinding(SecurityMode.Transport, false), session.EndpointReference); JobProxy.Start(); // Here it gets --- An unhandled exception of type 'System.ServiceModel.Security.SecurityAccessDeniedException' occurred in mscorlib.dll

    Thanks,

    Artem

    Tuesday, January 30, 2018 12:17 PM
  • Hi,

    I tested your code snippet (removed startInfo.JobTemplate="template1" line as I dont have such a job template) and it works fine. So please let me ask something more specific.

    Could you share us the complete stack trace (e.g. include client and server side stack) when you encounter this exception? What is your service registration file looks like? What is you cluster configuration like ([domain joined/non-domain joined] [cluster/client])? Are you being able to call CcpEchoSvc on you current client machine?

    Thanks,
    Zihao


    Wednesday, January 31, 2018 7:02 AM
  • Hi Zihao,

    This issue happened with MS HPC 2016 update 1. I have tested it on MS HPC 2016 it is working fine. Related job template - I have created job template in my cluster, it dose't work with and without job template . Below you can find stack trace.

    Server stack trace: 
       at System.ServiceModel.Channels.ServiceChannel.ThrowIfFaultUnderstood(Message reply, MessageFault fault, String action, MessageVersion version, FaultConverter faultConverter)
       at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
       at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
       at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
       at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

    Exception rethrown at [0]: 
       at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
       at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
       at IInteractiveJob.Start()
       at InteractiveJobClient.Start() in ......InteractiveJobProxy.cs:line 71
       at ServTest.Program.Main(String[] args) in .......Program.cs:line 36
       at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
       at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()

    Below you can find Service config file.

     <configSections>
        <!--Register service's custom configruation sections and group-->
        <sectionGroup name="microsoft.Hpc.Session.ServiceRegistration"
                      type="Microsoft.Hpc.Scheduler.Session.Configuration.ServiceRegistration, Microsoft.Hpc.Scheduler.Session, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
          <section name="service"
                   type="Microsoft.Hpc.Scheduler.Session.Configuration.ServiceConfiguration, Microsoft.Hpc.Scheduler.Session, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
                   allowDefinition="Everywhere"
                   allowExeDefinition="MachineToApplication"
                   />

        </sectionGroup>
    </configSections>
    <microsoft.Hpc.Session.ServiceRegistration>

            <service assembly="C:\Services\Interactive\InteractiveJob.dll"
                   contract="InteractiveJob.IInteractiveJob" type="InteractiveJob.InteractiveJob"
                   stdError="" soaDiagTraceLevel="Verbose, ActivityTracing" />

        </microsoft.Hpc.Session.ServiceRegistration>

    Thanks,

    Artem

    Wednesday, January 31, 2018 11:57 AM
  • Hi,

    This could be related to a regression of HPC Pack 2016 Update 1.

    Please add following section to your service configuration file and check if it still persists.

      <system.serviceModel>
        <bindings>
          <netTcpBinding>        
            <!--binding used by broker's backend-->
            <binding name="Microsoft.Hpc.BackEndBinding" maxConnections="1000">
              <!--for non domain joined compute nodes, the security mode should be None-->
              <security mode="Transport">
                <transport clientCredentialType="Windows" protectionLevel="None"/>
              </security>
            </binding>
          </netTcpBinding>
        </bindings>
      </system.serviceModel>

    Thanks,
    Zihao


    • Marked as answer by Artem Azaryan Thursday, February 1, 2018 6:46 AM
    Thursday, February 1, 2018 3:44 AM
  • Thanks !!!
    Thursday, February 1, 2018 6:46 AM