none
HPC 2016 - Problems creating a session from a machine other than the headnode RRS feed

  • Question

  • When trying to run the sample for the FirstSOAService an error occurs when the program is deployed to any other machine than the head-node.
    I compiled the following code :
    ---------------------------------------------------------------------------------
    namespace Microsoft.Hpc.SOASample.FirstSOAService{
        using System;
        using Client.ServiceReference1;
        using Microsoft.Hpc.Scheduler.Session;
        using System.Collections.Generic;
        using eNose_Aethena.Generic;
        using eNose_Aethena.Generic.Datasets;

        class Program {
            static void Main(string[] args){
                SessionStartInfo info = new SessionStartInfo("ENO-AP5", "CalculatorService");
                using (Session session = Session.CreateSession(info)){
                    Console.WriteLine("Session {0} has been created", session.Id);
                    using (BrokerClient<ICalculator> client = new BrokerClient<ICalculator>(session)){
                        AddRequest request = new AddRequest(1, 2);
                        client.SendRequest<AddRequest>(request);
                        client.EndRequests();

                        foreach (BrokerResponse<AddResponse> response in client.GetResponses<AddResponse>()){
                            double result = response.Result.AddResult;
                            Console.WriteLine("Add 1 and 2, and we get {0}", result);
                        }
                        client.Close();
                    }
                    session.Close();
                }

                Console.WriteLine("Done invoking SOA service");
                Console.WriteLine("Press any key to exit");
                Console.ReadKey();
            }
        }
    }
    ---------------------------------------------------------------------------------
    Running this code on the Head Node results in the following output
    ---------------------------------------------------------------------------------
    Session 56 has been created
    Add 1 and 2, and we get 3
    Done invoking SOA service
    Press any key to exit
    ---------------------------------------------------------------------------------
    This is the expected output.

    Trying to run the code on any other machine ( I tried my develop machine and a Compute Node inside the Cluster) result in the following error
    ---------------------------------------------------------------------------------
    Unhandled Exception: Microsoft.Hpc.Scheduler.Session.SessionException: Unknown error occured: {0}.
       at Microsoft.Hpc.Scheduler.Session.Internal.OnPremiseSessionFactory.<CreateSession>d__0.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at Microsoft.Hpc.Scheduler.Session.V3Session.<CreateSessionAsync>d__16.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at Microsoft.Hpc.Scheduler.Session.Session.<CreateSessionAsync>d__25.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at Microsoft.Hpc.Scheduler.Session.Session.CreateSession(SessionStartInfo startInfo, Binding binding)
       at Microsoft.Hpc.SOASample.FirstSOAService.Program.Main(String[] args) in C:\Temp\Simple Service\Client\Program.cs:line 15
    ---------------------------------------------------------------------------------

    I can not find what might be causing this error..
    I'm sure it shoud be possible to run this code from another machine.  

    Monday, November 11, 2019 7:35 AM

All replies

  • Hi Marcel Bruins,

    Welcome to MSDN forum.

    According to your description, I think your issue is more related to HPC and to better help you to solve your issue, I will help to move your issue to HPC forum. Supporters there will share you with more professional suggestions or solutions.

    Thanks for your understanding.

    Best Regards,

    Tianyu


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, November 12, 2019 6:18 AM