locked
scheduler.Connect changed in HPC 2012 R2 Update 3 RRS feed

  • Question

  • Is this forum still alive? I hope so.

    I have a C# app that was happily connecting to my HPC scheduler with 2012 R2 Update 1. We have upgraded the cluster to Update 3.  I have also updated the corresponding SDK on my development machine.

    I used to say:

    Scheduler s = new Scheduler();
    s.Connect("EDWARD");

    And life was great.

    Now I do the same and I get an exception: "Invalid URI: The format of the URI could not be determined"

    If I try s.Connect("\\\\EDWARD"), with 2 backslashes before the name, then I get past the URI thing, but get a SocketException: "No such host is known".

    Should I be adding some random prefix to make the URI happy?  https://edward?  hpc://edward??  Why is there no documentation for this change?

    Monday, March 19, 2018 5:17 PM

Answers

  • Hi,

    The line System.dll!System.Uri.CreateThis will throw exception when encountering invalid URI, and the line Microsoft.Hpc.Scheduler.Store.dll!Microsoft.Hpc.Scheduler.Store.SchedulerStore.CheckIfHttps will catch that exception. This exception is expected and should not be a unhandled exception. Can you tell us the version of your server and SDK (it's a version number like 4.5.5170.0)?

    Also please make sure you are referencing the right SDK assembly. You can accomplish this with the help of fusion log.

    Thanks,
    Zihao

    • Marked as answer by ChuckWh Friday, March 23, 2018 3:52 PM
    Thursday, March 22, 2018 4:37 AM

All replies

  • No progress yet.  Any ideas?

    I am guessing that some over-zealous MS coder just assumed that everybody who used this interface was accessing Azure over the internet.  Well, surprise, some of us have clusters in-house.  (And no, I am not going to put it on the internet so that I can access it.)

    I can find no documentation for the Connect method dated later than 2013.  Examples typically reference Windows Server 2008.  Target platforms never mention Windows Server 2012 R2, because it didn't exist yet.

    I have tried backing out the SDK to go back to 2012 R2 Update 1 on my development machine.  I uninstalled Update 3, then installed Update 1.  Unfortunately, there still seem to be various versions of Microsoft.Hpc.Scheduler.dll scattered in random system directories.  The call still fails, so I assume I am somehow calling one of those.

    Tuesday, March 20, 2018 8:02 PM
  • Hi,

    You should be able to connect to your cluster using something like s.Connect("EDWARD");. Can you share us the stack trace when you encounter this error?

    Thanks,
    Zihao

    Wednesday, March 21, 2018 3:13 AM
  • Unfortunately, it does not give me much of a stack trace.  I guess it doesn't go back into Microsoft.Hpc.Scheduler.dll for some reason.  Perhaps because it doesn't have symbols?

    System.UriFormatException occurred

      HResult=-2146233033
      Message=Invalid URI: The format of the URI could not be determined.
      Source=System
      StackTrace:
           at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind)
      InnerException: 

    From the Output of the debugger:

    ata.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\PresentationFramework.Aero\v4.0_4.0.0.0__31bf3856ad364e35\PresentationFramework.Aero.dll', Symbols loaded.

    ata.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\PresentationFramework-SystemXmlLinq\v4.0_4.0.0.0__b77a5c561934e089\PresentationFramework-SystemXmlLinq.dll', Symbols loaded.
    ata.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\PresentationFramework-SystemXml\v4.0_4.0.0.0__b77a5c561934e089\PresentationFramework-SystemXml.dll', Symbols loaded.
    ata.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\UIAutomationTypes\v4.0_4.0.0.0__31bf3856ad364e35\UIAutomationTypes.dll', Symbols loaded.
    ata.vshost.exe' (Managed (v4.0.30319)): Loaded 'Microsoft.GeneratedCode'
    ata.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Microsoft.Hpc.Scheduler\v4.0_2.0.0.0__31bf3856ad364e35\Microsoft.Hpc.Scheduler.dll'
    ata.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Microsoft.Hpc.Scheduler.Properties\v4.0_2.0.0.0__31bf3856ad364e35\Microsoft.Hpc.Scheduler.Properties.dll'
    ata.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Microsoft.Hpc.Scheduler.Store\v4.0_2.0.0.0__31bf3856ad364e35\Microsoft.Hpc.Scheduler.Store.dll'
    ata.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Microsoft.Hpc.Scheduler.NodeManagement\v4.0_2.0.0.0__31bf3856ad364e35\Microsoft.Hpc.Scheduler.NodeManagement.dll'

    Wednesday, March 21, 2018 3:42 PM
  •    

     Wait a sec... Got it


    System.dll!System.Uri.CreateThis(string uri, bool dontEscape, System.UriKind uriKind) + 0x120 bytes
    Microsoft.Hpc.Scheduler.Store.dll!Microsoft.Hpc.Scheduler.Store.SchedulerStore.CheckIfHttps(string server, out string serverName, out int port) + 0x50 bytes
    Microsoft.Hpc.Scheduler.Store.dll!Microsoft.Hpc.Scheduler.Store.SchedulerStore.Connect(string server) + 0x38 bytes
    Microsoft.Hpc.Scheduler.dll!Microsoft.Hpc.Scheduler.Scheduler.Connect(string cluster) + 0x8c bytes
    > ata.exe!CreateBurnData.MainWindow.CreateJob() Line 173 + 0x16 bytes C#

    Wednesday, March 21, 2018 3:49 PM
  • Hi,

    The line System.dll!System.Uri.CreateThis will throw exception when encountering invalid URI, and the line Microsoft.Hpc.Scheduler.Store.dll!Microsoft.Hpc.Scheduler.Store.SchedulerStore.CheckIfHttps will catch that exception. This exception is expected and should not be a unhandled exception. Can you tell us the version of your server and SDK (it's a version number like 4.5.5170.0)?

    Also please make sure you are referencing the right SDK assembly. You can accomplish this with the help of fusion log.

    Thanks,
    Zihao

    • Marked as answer by ChuckWh Friday, March 23, 2018 3:52 PM
    Thursday, March 22, 2018 4:37 AM
  • Ah yes, good to know that the exception is expected.

    I can't tell you the exact version numbers now because I had already started to clean out and re-install things.  Previously I had used the "Full" package for Update 3, then applied the SDK.  This time I uninstalled the SDK, the Client Pack, (and also Client Packs for 2008 and 2008 R2 which were still around), and then installed Client Pack 2012 R2, then Update 1, Update 2, and Update 3, in order.  I did not use the Full packages.  At the end I installed the SDK for Update 3.

    The HPC Cluster Manager works, and my s.Connect("EDWARD") works as expected.  I am thinking it was some version cross-connect.

    I should learn to use the fusion log!

    Thanks very much for the help, Zihao, I am back on track.

    Chuck

    Friday, March 23, 2018 3:52 PM