Home Help Center

IceGrid Session NoEndpointException

KeithPKeithP Member Keith PalihakkaraOrganization: Winton Capital ManagementProject: Trading System
Hello,

I'm using your sessionActivationC example, having modified one line:
HelloPrx hello = HelloPrx::checkedCast(session->allocateObjectByType("hello"));

and with the application.xml containing:
<icegrid>

  <application name="Session">

    <server-template id="AlgoServer">
	<parameter name="index"/>
      <server id="AlgoServer-${index}" exe="./server" activation="session">
	<adapter name="Hello" endpoints="tcp">
	  <allocatable identity="hello-${index}" type="hello" property="Identity"/>
	</adapter>
      </server>
    </server-template>

    <node name="Node1">
      <server-instance template="AlgoServer" index="1"/>  
      <server-instance template="AlgoServer" index="2"/>          
      <server-instance template="AlgoServer" index="3"/>  
      <server-instance template="AlgoServer" index="4"/>          
    </node>

  </application>

</icegrid>

However, when I run the client entering a username and password for the session, I get the following response:
Reference.cpp:1546: Ice::NoEndpointException:
no suitable endpoint available for proxy `hello-3 -t @ AlgoServer-3.Hello'

Could you tell me what I have mis-configured?

Thanks,
Keith

Comments

  • dwaynedwayne St. John's, NewfoundlandMember Dwayne BooneOrganization: ZeroC, Inc.Project: Internet Communications Engine
    The node name should be "node1", not "Node1", as that is the node name as configured in config.grid.
    ...
        <node name="node1">
            ...
        </node>
    ...
    
  • KeithPKeithP Member Keith PalihakkaraOrganization: Winton Capital ManagementProject: Trading System
    Thanks Dwayne,

    I changed it to "localhost" in line with your suggestion and it works now.

    Also, with my current configuration the servant is activated by the session, in my real servant the start up time is longer, is it possible to have the servants already started (i.e. activation="always"), but still being allocatable to a session?

    Thanks,
    Keith
  • dwaynedwayne St. John's, NewfoundlandMember Dwayne BooneOrganization: ZeroC, Inc.Project: Internet Communications Engine
    KeithP wrote: »
    Also, with my current configuration the servant is activated by the session, in my real servant the start up time is longer, is it possible to have the servants already started (i.e. activation="always"), but still being allocatable to a session?

    You can use activation="always" if you desire.
  • KeithPKeithP Member Keith PalihakkaraOrganization: Winton Capital ManagementProject: Trading System
    I've tried to apply these changes to my more comples example:
    <icegrid>
    
      <application name="Session">
    
        <server-template id="IAlgoRunner">
          <parameter name="index"/>
          <server id="IAlgoRunner-${index}" exe="./algorunnerd" activation="session">
    	<option>${index}</option>
            <option>cfg/algorunner_trunk.xml</option>
            <adapter name="AlgoRunnerAdapter" endpoints="tcp">
              <allocatable identity="AlgoRunner-${index}" type="IAlgoRunner" property="Identity"/>
            </adapter>
          </server>
        </server-template>
    
        <node name="Node1">
          <server-instance template="IAlgoRunner" index="1"/>  
          <server-instance template="IAlgoRunner" index="2"/>          
          <server-instance template="IAlgoRunner" index="3"/>  
          <server-instance template="IAlgoRunner" index="4"/>          
        </node>
    
      </application>
    
    </icegrid>
    

    The client does similar to before:
    WCM::AlgRun::IAlgoRunnerPrx algRunPrx = WCM::AlgRun::IAlgoRunnerPrx::checkedCast(session->allocateObjectByType("IAlgoRunner"));
    

    Cut down version of IAlgoRunner.ice file:
    module WCM
    {
    	module AlgRun
    	{
    		/** Thrown on failure **/
    		exception ServerException { string what; };	
    
    		interface IAlgoRunner
    		{
    			["ami"] void startAlgo( long ticketId) throws ServerException;		
    			
    			["ami"] void stopAlgo( long ticketId ) throws ServerException;		
    		};
    	};
    };
    
    

    Client output:
    C:\source\Vendor\zeroc\Ice-3.3.0\demo\IceGrid\sessionActivation>client
    This demo accepts any user-id / password combination.
    user id: a
    password: s
    Reference.cpp:1546: Ice::NoEndpointException:
    no suitable endpoint available for proxy `AlgoRunner-2 -t @ IAlgoRunner-2.AlgoRunnerAdapter'
    

    Server output extract:
    [ 10/09/09 16:12:38.551 icegridnode: Activator: activating server `IAlgoRunner-2'
      path = ./algorunnerd
      pwd = C:\source\wcm_trunk_2\bin
      args = ./algorunnerd 2 cfg/algorunner_trunk.xml --Ice.Config=C:\\source\\wcm_trunk_2\\bin/..\\data
    \\icegrid\\node/servers/IAlgoRunner-2/config/config ]
    16:12:38.707487 [DBG] Using configuration file: cfg/algorunner_trunk.xml
    ...
    16:12:40.754375 [DBG] Initialising Ice
    Identity: AlgoRunner-2
    My name is: AlgoRunnerAdapter
    16:12:40.785626 [DBG] AlgoRunner::waitForShutdown()
    16:12:47.082541 [INF] Login Success - ALGORUNNER (AlgoRunner)
    [ 10/09/09 16:13:38.551 icegridnode: Activator: deactivating `IAlgoRunner-2' using process proxy ]
    [ 10/09/09 16:14:38.567 icegridnode: Activator: terminated server `IAlgoRunner-2' (pid = 7012) ]
    [ 10/09/09 16:14:38.770 icegridnode: Activator: detected termination of server `IAlgoRunner-2' ]
    

    Although the client is activating the server, it blocks for about 30 seconds before stating the following:
    Reference.cpp:1546: Ice::NoEndpointException:
    no suitable endpoint available for proxy `AlgoRunner-2 -t @ IAlgoRunner-2

    Note that the server log showed the following:
    Identity: AlgoRunner-2
    My name is: AlgoRunnerAdapter

    Would you be able to tell me why it is not connecting to the servant adapter successfully?

    Thanks,
    Keith
  • dwaynedwayne St. John's, NewfoundlandMember Dwayne BooneOrganization: ZeroC, Inc.Project: Internet Communications Engine
    It would be much easier for us to look into this if you provided a small/complete/ compilable example, including configuration, that illustrates the problem you are having.
  • KeithPKeithP Member Keith PalihakkaraOrganization: Winton Capital ManagementProject: Trading System
    Hi Dwayne,

    I will try to create a smaller test app (as I sent my first example via a modification to the sessionActivationC example) but I was wondering if you can see from the client / server logs why the client is blocking on the
    WCM::AlgRun::IAlgoRunnerPrx::checkedCast(session->allocateObjectByType("IAlgoRunner"));
    call before throwing the NoEndpointException.

    I can see it's stating
    no suitable endpoint available for proxy `AlgoRunner-2 -t @ IAlgoRunner-2.AlgoRunnerAdapter'
    but the server log states AlgoRunner-2 as the identity, AlgoRunnerAdapter as the name and IAlgoRunner-2 as the server.

    Could this be a thread pool issue on the server-side? How can I add threads for the server to test? Failing this I'll try to create a more concise example.

    Thanks in advance,
    Keith
  • benoitbenoit Rennes, FranceAdministrators, ZeroC Staff Benoit FoucherOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    Hi,

    You should get more information on the reason why it failed by enabling the following traces:
    IceGrid.Node.Trace.Adapter=3
    IceGrid.Registry.Trace.Locator=1
    

    It's possible that the activation times out if your server takes time to activate the object adapter. If this is the case you could bump the server activation timeout with the server-activation attribute of the server XML element.

    Cheers,
    Benoit.
Sign In or Register to comment.