Skip to main content

Problem

  • Product Name: VisiBroker Edition for Java
  • Product Version: 5.2.1 & later
  • Product Component: Naming Service

The Naming Service in implicit clustering mode might mark an active object reference as stale erroneously due to some transient network problem that caused the object to be unreachable for some time. The purpose of the article is to present a solution to this problem.

Resolution

The solution to the erroneous active object reference removal is to use a separate program to be ran at a regular interval by perhaps a cron daemon to retrieve all the objects, both stale and active in a naming cluster, then check and verify that each of the servers are still running. In the event that a stale object's server is found to be running, the stale object will be made active. In the event that an active object's server is found not to be running, the active object will be marked stale.


The solution requires a patch to the naming service, which consist of a jar file: "C599572-1.jar", to be place in the first position of your CLASSPATH environment variable before starting the naming service. The patch is place together with the testcase in the zip file: solution.tar.gz. Please use something like "gzip -cd solution.tar.gz | tar xvf -&" to unzip the solution.


Note: Please use 599572.tar.gz incase solution.tar.gz is corrupted.

To run the testcase (The testcase is configured to be run on a single machine, please make changes to the scripts and properties file if you wish to run the testcase on 2 or more machines.):


1.        Compile the testcase using "make java &".
2.        Start the osagent using "osagent &".
3.        Start the naming service using the "startnaming" script.
4.        Start server A using the "startservera" script.
5.        Start server B using the "startserverb" script.
6.        Start the clean up program using the "cleanns" script (Notice that both servers are active).
7.        Kill server B.
8.        Start the clean up program using the "cleanns" script (Notice that server B is reported not to be

           running and removed from the naming service).
9.        Start the clean up program using the "cleanns" script (Notice that server B is gone).
10.      Start server B.
11.      Start the clean up program using the "cleanns" script (Notice that server B is found again).
 

To test that the stale object could be made active again, try this:


1.        Compile the testcase using "make java &".
2.        Start the osagent using "osagent &".
3.        Start the naming service using the "startnaming" script.
4.        Start server A using the "startservera" script.
5.        Start server B using the "startserverb" script.
6.        Start client using the "startclient" script. (Notice that client contacts server A and server B in a

           round robin fashion).
7.        Kill server B.
8.        Start client using the "startclient" script. (Notice that now only server A is found).
9.        Start server B.
10.      Start client using the "startclient" script. (Notice that both server A and server B are found).


599572.tar.gz

#NamingService
#VisiBroker
#Security
#ImplicitClustering