How to config the rounters

Feb 14, 2012 at 1:34 AM

Hi, Guys,

We have a WCF service dedicated to publish the business data to different applications using ESP. To facilates the testing, we want to open the local rounter on dev box (Rounter: Client, DNS domain: apac.company.net) to receive the event submitted by other applications to our WCF service on domian (Rounter: Original, DNS domain: nam.company.net), can you guys help us config all the rounters?

We had some configs but it not works:

Orginal:

    <configInfo role="origin" autoConfig="true" bootstrapUrl="http://RemotingcomputerName.nam.company.net/GetConfig" mgmtGroup="D979AEB4-C501-4027-BBCA-C38F7B56FD00" cmdGroup="C8EDEB22-7E4A-4441-B7B4-419DDB856321"/>

<originRoleInfo>
      <subscriptionManagement refreshIncrement="3"  expirationIncrement="10"/>

      <localPublish eventQueueName="WspEventQueue" eventQueueSize="10240000" averageEventSize="10240"/>

      <outputCommunicationQueues maxQueueSize="20000000" maxTimeout="600"/>

      <thisRouter nic="ficvelwbdv01.nam.nsroot.net" port="4091" bufferSize="1024000" timeout="30000" />

      <!-- <parentRouter name="" numConnections="2" port="1300" bufferSize="1024000" timeout="30000" /> -->
    </originRoleInfo>

Client

<configInfo role="client" autoConfig="false" bootstrapUrl="http://RemotingcomputerName.nam.company.net/GetConfig" mgmtGroup="D979AEB4-C501-4027-BBCA-C38F7B56FD00"/>

 <clientRoleInfo>
      <subscriptionManagement refreshIncrement="3"  expirationIncrement="10"/>

      <localPublish eventQueueName="WspEventQueue" eventQueueSize="102400000" averageEventSize="10240"/>

      <outputCommunicationQueues maxQueueSize="20000000" maxTimeout="600"/>

      <thisRouter nic="localComputerName.apac.company.net" port="1300" bufferSize="1024000" timeout="30000" />

      <parentRouter name="RemotingcomputerName.nam.company.net" numConnections="2" port="1300" bufferSize="1024000" timeout="30000" />
    </clientRoleInfo>

Coordinator
Feb 14, 2012 at 1:44 AM

On the origin router which is RemotingcomputerName.nam.company.net, did you open the firewall so the WspEventRouter can open its port?

What do you get back when you run "netstat -an | findstr 1300" from a cmd prompt on the client and origin?

Keith

Feb 14, 2012 at 1:53 AM

Yes, i can talnet the remoting, and netstat -an | findstr 1300 really return some things,

TCP   *.*.*.120:1300    0.0.0.0:0              LISTENING
TCP    *.*.*..120:4817    *.*.*..76:1300    ESTABLISHED

 

From the remoting server, issue the same command, i got:

netstat -an|findstr 1300
  TCP    0.0.0.0:1300           0.0.0.0:0              LISTENING
  TCP *.*.*.76:1300    *.*.*.120120:4817    ESTABLISHED
  TCP    *.*.*.76:1300   *.*.*.120.120:4818    ESTABLISHED

 

Anything wrong, thanks for you help.

 

Coordinator
Feb 14, 2012 at 2:26 AM

Try this as the config file for both origin and client. Be sure to set the "Role" property to "origin" or "client" for the corresponding server. Then issue the netstat again on each server and let me see the results.

 

 

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <configSections>
    <section name="eventRouterSettings" type="RouterSettings"/>
    <section name="eventPersistSettings" type="PersistSettings"/>
  </configSections>

  <eventRouterSettings>

    <!-- If you choose autoConfig to be true then you need to first install the origin router and have the DNS configured with -->
    <!-- data center routers if your topology requires it. With autoConfig turned on, all config files will be kept identical -->
    <!-- to the origin's config file. When it is changed, all others will automatically be changed. -->
    <!-- The bootstrapUrl must resolve to the origin router. It will initially be called by a client to retrieve its config file. -->
    <!-- The mgmtGroup is the eventId which will be used to communicate all config info while servers are running. -->
    <!-- Role defines what role a given server takes when automatically establishing the topology. -->
    <!-- The values for role are, though you can dynamically create your own names (i.e. fooRoleInfo): -->
    <!--   origin   -->
    <!--   primary   -->
    <!--   secondary   -->
    <!--   client   -->
    <!-- <configInfo role="client" autoConfig="false" bootstrapUrl="http://WspEventRouterOrigin/GetConfig" mgmtGroup="2B2B78DB-8AE7-4a16-AB6C-850F54A82D54" cmdGroup=”C8EDEB22-7E4A-4441-B7B4-419DDB856321”/> -->

    <configInfo role="origin" autoConfig="true" bootstrapUrl="http://RemotingcomputerName.nam.company.net/GetConfig" mgmtGroup="D979AEB4-C501-4027-BBCA-C38F7B56FD00" cmdGroup="C8EDEB22-7E4A-4441-B7B4-419DDB856321"/>

    <!-- refreshIncrement should be about 1/3 of what the expirationIncrement is. -->
    <!-- This setting needs to be consistent across all the machines in the eventing network. -->
    <!-- <subscriptionManagement refreshIncrement="3"  expirationIncrement="10"/> -->

    <!-- <localPublish eventQueueName="WspEventQueue" eventQueueSize="102400000" averageEventSize="10240"/> -->

    <!-- These settings control what should happen to an output queue when communications is lost to a parent or child.-->
    <!-- maxQueueSize is in bytes and maxTimeout is in seconds.-->
    <!-- When the maxQueueSize is reached or the maxTimeout is reached for a communication that has been lost, the queue is deleted.-->
    <!-- <outputCommunicationQueues maxQueueSize="200000000" maxTimeout="600"/> -->

    <!-- nic can be an alias which specifies a specific IP address or an IP address. -->
    <!-- port can be 0 if you don't want to have the router open a listening port to be a parent to other routers. -->
    <!-- <thisRouter nic="" port="1300" bufferSize="1024000" timeout="30000" /> -->

    <!-- <parentRouter name="ParentMachineName" port="1300" bufferSize="1024000" timeout="30000" />  -->

    <originRoleInfo>
      <subscriptionManagement refreshIncrement="3"  expirationIncrement="10"/>

      <localPublish eventQueueName="WspEventQueue" eventQueueSize="10240000" averageEventSize="10240"/>

      <outputCommunicationQueues maxQueueSize="20000000" maxTimeout="600"/>

      <thisRouter nic="" port="1300" bufferSize="1024000" timeout="30000" />

      <!-- <parentRouter name="" numConnections="2" port="1300" bufferSize="1024000" timeout="30000" /> -->
    </originRoleInfo>

    <clientRoleInfo>
      <subscriptionManagement refreshIncrement="3"  expirationIncrement="10"/>

      <localPublish eventQueueName="WspEventQueue" eventQueueSize="102400000" averageEventSize="10240"/>

      <outputCommunicationQueues maxQueueSize="20000000" maxTimeout="600"/>

      <thisRouter nic="" port="0" bufferSize="1024000" timeout="30000" />

      <parentRouter name="RemotingcomputerName.nam.company.net" numConnections="1" port="1300" bufferSize="1024000" timeout="30000" />
    </clientRoleInfo>
  </eventRouterSettings>

  <eventPersistSettings>

    <!-- type specifies the EventType to be persisted.-->
    <!-- localOnly is a boolean which specifies whether only events published on this machine are persisted or if events from the entire network are persisted.-->
    <!-- maxFileSize specifies the maximum size in bytes that the persisted file should be before it is copied.-->
    <!-- maxCopyInterval specifies in seconds the longest time interval before the persisted file is copied.-->
    <!-- fieldTerminator specifies the character used between fields.-->
    <!-- rowTerminator specifies the character used at the end of each row written.-->
    <!-- tempFileDirectory is the local directory used for writing out the persisted event data.-->
    <!-- copyToFileDirectory is the final destination of the persisted data file. It can be local or remote using a UNC.-->

    <!-- <event type="78422526-7B21-4559-8B9A-BC551B46AE34" localOnly="true" maxFileSize="2000000000" maxCopyInterval="60" createEmptyFiles="false"
          fieldTerminator="," rowTerminator="\n" tempFileDirectory="c:\temp\WebEvents\" copyToFileDirectory="c:\temp\WebEvents\log\" /> -->

  </eventPersistSettings>
</configuration>

Feb 14, 2012 at 2:42 AM

Here is the information i got after change the configurations:

From server:

netstat -an|findstr 1300
  TCP    0.0.0.0:1300           0.0.0.0:0              LISTENING
  TCP    *.*.105.76:1300   *.*.*.120:1088    ESTABLISHED
  TCP    *.*..105.76:1300    *.*.*..120:1089    ESTABLISHED

 

From client:

netstat -an | findstr 1300
  TCP    *.*.*..120:1088    *.*.105.76:1300    ESTABLISHED
  TCP    *.*.*..120:1089    *.*.105.76:1300    ESTABLISHED

Coordinator
Feb 14, 2012 at 2:46 AM

It looks good. In the "c:\program files\microsoft\wspeventrouter" folder, run the EventPingPong.exe on both the origin and client servers. First start one of them to begin listening for events and then start the other one to publish events. You should see events flowing.

Keith

Feb 14, 2012 at 3:09 AM

Thanks for your kindly helpings.

I had run the PingPong sample, seems it works. Maybe i had missed some other things.

To do the interaction with the remoting machine, do i need to set the localOnly flag to false. In my code, i set it to true. is it the thing i missed?

subMgr.AddSubscription(pubEvent.InstanceId, false);

Coordinator
Feb 14, 2012 at 3:26 AM

Right, you should have the localonly flag as false so you listen for events from all servers.

Feb 14, 2012 at 3:38 AM

Thanks a lot, Keithh, for all the supports here. Really appericate it.

Now let me compare my codes with the ones inside PingPong to see what i missed.

Coordinator
Feb 14, 2012 at 4:46 AM

If you are having issues with your code and aren't sure what to do, just send it and I'll take a look.

Feb 14, 2012 at 6:44 AM

Thanks again.

The question brothes me for a long time,  nowwe can monitor the things happens on server side and do the testing easily.

Great works.