Feedback
 
Did this article resolve your question/issue?

   

Your feedback is appreciated.

Please tell us how we can make this article more useful. Please provide us a way to contact you, should we need clarification on the feedback provided or if you need further assistance.

Characters Remaining: 1025

 


Article

How to create and test a fault tolerant AppServer configuration using UDP

Information

 
Article Number000011648
EnvironmentProduct: Progress
Version: 9.x
Product: OpenEdge
Version: 10.x. 11.x
OS: All Supported Operating Systems
Question/Problem Description
How to create and test a fault tolerant AppServer configuration using UDP
How to make a replicating NameServer using UDP
How to test a fault tolerant NameServer using UDP
Steps to Reproduce
Clarifying Information
Error Message
Defect/Enhancement Number
Cause
Resolution

To create a fault tolerant AppServer configuration using UDP requires two hosts (host1 and host2) that are connected at the same subnet.

This will allow the use of a UDP broadcast address to address both hosts.

To determine if the two hosts are at the same subnet they have to have the same UDP broadcast address. 

On Windows it is possible to get the UDP broadcast address using the ipconfig command:

C:\>ipconfig

Windows IP Configuration

Ethernet adapter Local Area Connection:

        Connection-specific DNS Suffix  . : blabla.speak.com
        IP Address. . . . . . . . . . . . : 192.128.3.24
        Subnet Mask . . . . . . . . . . . : 255.255.0.0
        Default Gateway . . . . . . . . . : 192.128.3.1


To get the   UDP broadcast address make Boolean NOT operation on the subnet mask bits, this will be for this example 0.0.255.255 then a Boolean OR between the IP address and this value.

       192.128.   3. 24        
OR       0.  0.255.255
     _________________
       192.128.255.255  = UDP broadcast address 


On most UNIX platforms it is possible to get the UDP broadcast address directly using the netstat -i and ifconfig commands:

$ netstat -i
Name  Mtu  Net/Dest      Address        Ipkts  Ierrs Opkts  Oerrs Collis Queue
lo0   8232 loopback      localhost      42318894 0     42318894 0     0      0    
le0   1500 psc-bed       oasis          163625559 16    3679807506 0     0      0  
  

$ ifconfig le0
ce0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
        inet 192.128.5.30 netmask ffff0000 broadcast 192.128.255.255


For a more detailed example refer to Article:

To test a fault tolerant AppServer configuration using UDP

Using the default settings on the ubroker.properties configure the UDP broadcast address and do the following:

1. Start the AdminServer on host1 and host2:

$   proadsv -start

2. Start NameServer on host1 and host2:

$   nsman -i NS1 -start

3. Start the AppServer broker asbroker1 on host1 and host2:

$   asbman -i asbroker1 -start

4. In the working directory on both host1 and host2 create a file named apps_prog.p with the following program.
 

DEFINE OUTPUT PARAMETER  c AS CHARACTER INITIAL "".

OS-COMMAND SILENT hostname > hostname.txt.               
INPUT FROM hostname.txt.
DO WHILE c = "":
   IMPORT UNFORMATTED c.
END.
INPUT CLOSE.
RETURN
 

5. From a remote client create a file named local_prog.p with the the following program:
 

DEFINE VARIABLE servhdl AS HANDLE.
DEFINE VARIABLE ret AS LOGICAL.
DEFINE VARIABLE C AS CHARACTER FORMAT "x(20)".  

CREATE SERVER servhdl.
/* ASSIGN ret = servhdl:CONNECT("-S 5162 -H <UDP Broadcast Address> -AppService asbroker1"). */
 ASSIGN ret = servhdl:CONNECT("-S 5162 -H 192.128.255.255 -AppService asbroker1").
  
IF ret THEN RUN apps_prog.p ON SERVER servhdl TRANSACTION DISTINCT (OUTPUT C).

DISPLAY C LABEL "Host: " WITH SIDE-LABELS.

WAIT-FOR WINDOW-CLOSE OF CURRENT-WINDOW.
 
ASSIGN ret = servhdl:DISCONNECT().
DELETE OBJECT servhdl.

QUIT.
 

6.Run the local_prog.p program several times and shut or disconnect the AppServer in one of the hosts, then do the opposite you will see the name of the host that is answering the request. 
 

 
Workaround
Notes
Attachment 
Last Modified Date9/2/2019 9:06 AM