Answered by:
Session.CreateSession fails, even through everything seems setup fine...

Question
-
Hi,
My first attempt to use SOA with HPC2012 R2 is not off to a great start... 8-(
The test code is very simple:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Hpc.Scheduler.Session ;
using Microsoft.Hpc.Scheduler.Properties ;
using System.ServiceModel;
namespace ConsoleTest
{
class Program
{
static void Main(string[] args)
{
const string scheduler = "headnode hostname";
const string service = "EchoService";
SessionStartInfo info = new SessionStartInfo(scheduler, service);
Session session = Session.CreateSession(info);
Console.WriteLine("Connected to {0}", session.EndpointReference.ToString());
}
}
}
Compiles fine, throws this exception in CreateSession:
An unhandled exception of type 'Microsoft.Hpc.Scheduler.Session.SessionException' occurred in Microsoft.Hpc.Scheduler.Session.dll
Additional information: Cannot find a broker node in the cluster that meets the session's requirements. Please check the documentation on how to configure a broker node. If you are using failover broker nodes and creating a DurableSession, please be sure one or more failover broker nodes are onlineThe head node is up, it's configured as a wcf broker node, it's running in that role, I can connect to it and submit regular non-SOA jobs, etc, etc. What are those "session's requirements" which are not being met? How can I find out more about what it's complaining about?
Thanks
Damian
Friday, March 27, 2015 5:38 PM
Answers
-
Hi,
This is no longer an issue, after digging through some exceptions I found a clue to the problem...
The scheduler was replying to the client by saying "here, connect to THIS wcf broker node". Unfortunately the THIS was not a fully qualified domain name, just the machine name.. Since the client was in a different domain, dns lookup failed...
Would have been nice if the default exception message said that, haha... The above exception msg was useless...
As soon as I added that machine to my hosts file, it started to work fine...
Thanks
Damian
- Proposed as answer by Yongjun Tian (MSFT) Wednesday, April 8, 2015 1:28 AM
- Marked as answer by DamianRK Wednesday, April 8, 2015 1:02 PM
Tuesday, April 7, 2015 2:35 PM
All replies
-
Ohh, I wrapped that in a try/catch, and the exception message was basically the same thing as above, so didn't provide any more info/data...
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Hpc.Scheduler.Session ;
using Microsoft.Hpc.Scheduler.Properties ;
using System.ServiceModel;
namespace ConsoleTest
{
class Program
{
static void Main(string[] args)
{
const string scheduler = "host name";
const string service = "EchoService";
SessionStartInfo info = new SessionStartInfo(scheduler, service);
try
{
Session session = Session.CreateSession(info);
Console.WriteLine("Connected to {0}", session.EndpointReference.ToString());
}
catch (Exception e)
{
string msg = e.Message;
}
}
}
}- Edited by DamianRK Friday, March 27, 2015 5:53 PM
Friday, March 27, 2015 5:52 PM -
Hi, DamianRK,
You have update "scheduler" to your real hpc cluster name, right?
const string scheduler = "host name";
And can you check the broker node (head node) state, and whether it is already online
Tuesday, April 7, 2015 1:39 AM -
Hi,
This is no longer an issue, after digging through some exceptions I found a clue to the problem...
The scheduler was replying to the client by saying "here, connect to THIS wcf broker node". Unfortunately the THIS was not a fully qualified domain name, just the machine name.. Since the client was in a different domain, dns lookup failed...
Would have been nice if the default exception message said that, haha... The above exception msg was useless...
As soon as I added that machine to my hosts file, it started to work fine...
Thanks
Damian
- Proposed as answer by Yongjun Tian (MSFT) Wednesday, April 8, 2015 1:28 AM
- Marked as answer by DamianRK Wednesday, April 8, 2015 1:02 PM
Tuesday, April 7, 2015 2:35 PM -
Changed the WCF service to just run as local system account instead of specifying it in the service panel.
Sunday, November 10, 2019 6:12 PM