Archived

This forum has been archived. Please start a new discussion on GitHub.

Multiple Nodes on the same machine with a single registry

All,

I'm trying to build an application that has a single registry but with multiple nodes. I am able to create multiple nodes on the same machine, but I don't know how to associate a server with a particular node. When I start a server, it always associates itself with the default node.

Is there any way around this?

Thanks,
Thomas

Comments

  • bernard
    bernard Jupiter, FL
    Hi Thomas,

    Welcome to our forums!

    Each of your IceGrid nodes needs a unique name, set using the property IceGrid.Node.Name, e.g.
    IceGrid.Node.Name=Node1
    

    Then, in IceGrid (with the GUI or XML file), you describe servers on nodes--and make sure the node names you use match these IceGrid.Node.Names.

    And finally, you start these servers on these nodes using IceGrid (icegridadmin, the IceGrid Admin GUI, or possibly programmaticaly).

    These IceGrid Nodes may be on different computers (the most common) or, if you like, on the same computer (useful for testing).

    Best regards,
    Bernard
  • Hi Bernard,
    Thank you for the welcome!

    I have a another problem, when attempting to start the server via IceGridAdmin, I receive the following error:

    path = C:\program files\Java\jdk1.6.0_18\bin\java.exe server.Server
    pwd = C:\ZeroC\analyticsFarm\IceGrid
    envs = CLASSPATH="..." --Ice.Config=C:\ZeroC\analyticsFarm\IceGrid/Node1/servers/analyticsWrapperServer1/config/config

    -- 12/28/11 16:30:47.941 icegridnode: Adapter: server `analyticsWrapperServer1' adapt
    er `analyticsWrapperServer1.analyticsWrapperAdapter' activation failed: The system cannot
    find the file specified.


    I'm assuming the Error message is referring to this file:
    --Ice.Config=C:\ZeroC\analyticsFarm\IceGrid/Node1/servers/analyticsWrapperServer1/config/config
    which really should be:
    --Ice.Config=C:\ZeroC\analyticsFarm\IceGrid\server.cfg

    However, I'm unsure of how to change it? Any ideas?




    My deployment descriptor xml is as follows:


    <icegrid>
    <application name="anlayticsFarm">

    <replica-group id="anlayticsWrapperAdapters">
    <load-balancing type="adaptive"/>
    <object identity="anlayticsWrapper" type="server.anlayticsWrapperI" />
    </replica-group>

    <server-template id="anlayticsWrapperServerTemplate">
    <parameter name="index"/>
    <parameter name="exepath" default="C:\program files\Java\jdk1.6.0_18\bin\java.exe server.Server"/>
    <server id="anlayticsWrapperServer${index}" exe="${exepath}" activation="on-demand">
    <option>-Djava.library.path=C:\\dbPricing\\anlaytics\\v120</option>
    <env>CLASSPATH="..."</env>
    <adapter name="anlayticsWrapperAdapter" replica-group="anlayticsWrapperAdapters"
    endpoints="tcp">

    </adapter>
    </server>
    </server-template>

    <node name="Node1">
    <server-instance template="anlayticsWrapperServerTemplate" index="1"/>
    </node>
    <node name="Node2">
    <server-instance template="anlayticsWrapperServerTemplate" index="2"/>
    </node>

    </application>
    </icegrid>
  • bernard
    bernard Jupiter, FL
    Hi Thomas,

    When you use IceGrid, IceGrid generates a configuration file for each of your servers, and you should always start these servers (through IceGrid) using this generated configuration file.

    The generated file for your config file for your DbaxWrapperServer1 server is:
    C:\ZeroC\DbaxFarm\IceGrid/Node1/servers/DbaxWrapperServer1/config/config
    

    I suspect the file-not-found error refers to the executable; I would pass "server.Server" as an option and not as part of the exe attribute.

    Best regards,
    Bernard
  • Thanks!

    Everything is working now.

    Another question, is there anyway to dynamically create a node via IceGridAdmin or do you have to go through the setup process (adding entries in xml, creating node config/directories, starting icegridnode, updating the registry etc etc.)?