cancel
Showing results for 
Search instead for 
Did you mean: 

Error while adding project to cluster

Former Member
0 Kudos

I have created two nodes "node1" and "node2" and configured CCR file as follows:

<?xml version="1.0" encoding="UTF-8"?>

<Configuration xmlns="http://www.sybase.com/esp/project_config/2010/08/">

  <Runtime>

  <Clusters>

  <!-- we need this only if we have a project/stream binding -->

  <Cluster name="cluster1" type="local">

  <Username>studio</Username>

  <Password>sap123</Password>

  </Cluster>

  </Clusters>

  <Bindings>

  <Binding name="BaseInput">

  <Cluster>cluster1</Cluster> <!-- this is always needed -->

  <Workspace>test</Workspace>

  <Project>test</Project>

  <BindingName>BaseInputBinding</BindingName> <!-- this is for plat-in adapter name-->

  <RemoteStream>BaseInput</RemoteStream>

  </Binding>

  </Bindings>

    <AdaptersPropertySet>

      <PropertySet name="Atom Feed Input">

        <Property name="URL"></Property>

      </PropertySet>

   ...

    </AdaptersPropertySet>

  </Runtime>


  <Deployment>

    <Project ha="false"> // no active-active deployment

      <Options>

        <Option name="time-granularity" value="5"/>

        <Option name="debug-level" value="4"/>

      </Options>

      <Instances>

    <Instance name="primary">

     <Affinities>

      <!-- By default no need to put affinity.  -->

      <Affinity type="controller" charge="positive" strength="strong" value="node1"/>

      <Affinity type="instance" charge="negative" strength="strong" value="secondary"/>

     </Affinities>

    </Instance>

    <Instance name="secondary">

     <Affinities>

      <!-- By default no need to put affinity.  -->

      <Affinity type="controller" charge="positive" strength="weak" value="node2"/>

      <Affinity type="instance" charge="negative" strength="strong" value="primary"/>

     </Affinities>

    </Instance>

      </Instances>

    </Project>

  <Cluster>

  <Failover enable="true">

      <FailureInterval>120</FailureInterval>

      <FailuresPerInterval>4</FailuresPerInterval>

     </Failover>

  <Affinities>

  <Affinity type="controller" charge="positive">myController</Affinity>

  </Affinities>

  </Cluster>

  </Deployment>

</Configuration>

I have started two nodes "node1" and node2" and try to add project to cluster using following command:

esp_cluster_admin --uri=esp://10.66.186.103:9786 --username=studio --password=sap123 --add_project --project-name=jmsxmlinput --workspace-name=test--ccx=test.ccx --ccr=test.ccr

I got following error

[error] Passed in key must select exactly one node: Failover

How to fix this error?

Thanks

Shashi

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member217348
Participant
0 Kudos

Hi Shashi,

I would like to try to reproduce this problem in my environment. Can you provide the node1.xml and node2.xml files and where each are started and how they are started. Are they on the same machine? What is the OS environment? Are you using ESP 5.1 SP04?

Please can you also provide the project files you are using. Did you use the ESP Studio to create the CCR, if not, where did it come from?

Thank you,

Alice

Message was edited by: Alice Silverstein Added "Please can you also provide the project files you are using.  Did you use the ESP Studio to create the CCR, if not, where did it come from?"

Former Member
0 Kudos

Hi Alice,

Thank you very much for your replay.

I have installed ESP in two VMs: vewin764SA016, vewin764SA046

I have created node1.xml and node2.xml and started using start_node.bat provided with ESP installation from 1st VM (vewin764SA016).

start_node.bat node1

start_node.bat node2

I used ESP Studio to create the CCR and added cluster details

When I tried to add project I got following error:

esp_cluster_admin --uri=esp://vewin764SA016:19011 --username=sybase --password=sybase

> add project jmsxml/jmsxml jmsxmlinput.ccx jmsxmlinput.ccr

[error] Passed in key must select exactly one node: Failover



OS details: (vewin764SA016, vewin764SA046)

Windows 7 Professional

Processor: AMD Opteron processor 6128 HE 2.00 GHz (2 processors)

RAM: 8 GB

System type: 64-bit operating system

I have attached node1.xml, node2.xml and CCR (i could not able to attach .ccr file, so i changed extension to .txt) files.

former_member217348
Participant
0 Kudos

Hi Shashi,

What kind of failover configuration are you looking to accomplish?

The ccr file has ha set to false, yet there are settings in there that are only useful when ha is set to true (ie, there are multiple instances, and there are affinities for type=instance).
It is better to use the ESP Studio Project Configuration File Editor rather than editing the ccr file in a text editor.

Since you have ha="false", and you have an Instances section, ESP interprets that to mean that this is a Cold Failover type of configuration. For Cold Failover, there can only be one instance, and in the ccr file, there are two instances, which is only correct for ha="true".


Assuming that you are wanting only Cold Failover, you could modify your Deployment section to:
  <Deployment>
    <Project ha="false">
      <Options>
        <Option name="time-granularity" value="5"/>
        <Option name="debug-level" value="4"/>
      </Options>
      <Instances>
        <Instance>
          <Failover enable="true">
            <FailureInterval>120</FailureInterval>
            <FailuresPerInterval>4</FailuresPerInterval>
          </Failover>
          <Affinities>
            <Affinity charge="positive" strength="strong" type="controller" value="node1"/>
            <Affinity charge="positive" strength="weak" type="controller" value="node2"/>
          </Affinities>
        </Instance>
      </Instances>
    </Project>
  </Deployment>
</Configuration>

Thanks,

Alice

Former Member
0 Kudos

Hi Alice,

My requirement is as follows:

I want to create a project failover scenario with recoverable windows and persist messages into a log store for recoverability.

When one instance goes down, I want to start a new ESP server and project instance on a new virtual machine and should be able to bring the project up in the recovered state by using log store to recover the state.

I need help/suggestions to set up this.

Thanks

Shashi

former_member217348
Participant
0 Kudos

Hi Shashi,

Are you still getting the error?

For guidance on setting up the log store:

- if you are using ESP Studio Visual Editor:

http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc01613.0514/doc/html/kes13...

- if you are using ESP Studio Text Editor:

http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc01612.0514/doc/html/ksi13...

Thank you,

Alice

Former Member
0 Kudos

Hi Alice,


It is working fine. Thank you very much.

I started two nodes from two different hosts.

When I added project to the cluster, it started running on both the hosts and both were getting data.

Since I have to persist data in HANA, there will be duplicate entries in the table (both application instances enters data in the table).

I want to setup a cluster such that, when I add a project, it should start on one host and when that host fails, another host should come-up with new project instance. Second host should recover project state from the log store.

Currently I am looking at setting up the log store.

I need help/suggestion to setup above mentioned cluster.

Thanks

Shashi