Is there a way to get the error message from an instance of an IScheduler Interface? RRS feed

  • Question

  • The example for connecting to a head node using the native interface to the Job Scheduler gives the following example:

    hr = pScheduler->Connect(bstrClusterName);
    if (FAILED(hr))
      wprintf(L"Unable to connect to cluster %s. Failed with 0x%x.\n", bstrClusterName, hr);
      goto cleanup;

    But this does not provide much help to the developer or the user.  For example, I've been attempting to work across domains, and muck with my credentials in order to see what happens when I have bad credentials. If I submit a job to the head node of my cluster from the command line I see:

    C:\Users\aha\devel>job submit /scheduler:scooby dir
    The server has rejected the client credentials.

    However, when I attempt to submit a job from my application I see the following:

    C:\Users\aha\devel\connect_test.exe scooby

    Got exception. Failed to connect to : scooby: 80131501: Unknown error 0x80131501
    Connection failed

    I am making the assumption that my application is running into the same problem as my attempt to submit a job via the command-line, but I was wondering if anyone knew of a way to extract this information from HPC Server?  I took a look at the methods for the IScheduler Interface, but I did not see any methods that allow you to obtain a clearer understanding of why a connection failed.



    Tuesday, June 22, 2010 5:13 PM


  • Hi Acquil,

    The COM API that you are using in HPC server 2008 doesn't provide one-to-one mapping between error code and error msg.  If an API failed, it only guarantees to return SOME error code, which may be unknown error.

    Using the .NET C# API should provide clear exception type and error msg.

    Hope this helps


    • Marked as answer by Don Pattee Friday, February 4, 2011 10:26 PM
    Wednesday, June 23, 2010 12:20 AM