Queue File Processing on MercE Secondary Servers

In general the queue file processing on secondary servers happen automatically as soon as queue files are created and delivered from the primary server. But in cases where the secondary server is brought up later, like after a system crash, the earlier queue files are not available for processing. In such cases the most important queue files are the ones which are used to create users. They should be generated separately on primary server and then brought to secondary server for processing. Vaibhav has created a couple of scritps to get this task done.
  • gen_qfile.pl
  • slave_qfiles.pl 
 
The following steps should be followed to get the user accounts created on secondary servers:
  • Execute qfilegen.pl on primary server as user "merce".
perl qfilegen.pl <name of the dest directory>

The queue files will be created in the dest directory.

  • Make a tar of the dest directory.
  • Copy this tar to the secondary server.\
  • Untar these queue files into /opt/merce/update/pending as user "merce".
  • Monitor /var/adm/log/mail/local3.log for any error message while queue files are getting processed.
  • Check whether processed queue files are getting stored into the directory /opt/merce/update/done.
  • Make sure that no queue files have gone to the directory /opt/merce/update/bad.

What if the file goes into bad?

What if the file goes into /opt/merce/update/bad ? as far as I had known if a file goes into bad open the file using vi editor remove the last 2 errronous lines which give the pgm error. But how do we proceed from that point?

Processing queue files gone bad

After deleting the error related lines (last two lines) of the queue file, it has to be processed manually. Rename such queue file by removing the the section in the name from last dot onwards and put it in the directory /opt/merce/update/pending. For example a queue file with the name q.some_number.useredit.another_number.editlocuserlist_mas should be renamed to q.some_number.useredit.another_number. The chances are high that putting this file in the pending directory may not process the file successfully as earlier error may cause it to fail again.

To fix this problem one need to know why the processing failed. In the case mentioned above, get the queue file processed manually by script editlocuserlist_mas. It is done by running following command as user "merce":

cat q.some_number.useredit.another_number | /opt/merce/scripts/useredit/editlocuserlist_mas

Check the error message on the console and in log file /var/adm/log/local3.log and debug the problem.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.