SV: [Linux-HA] api_process_registration_msg: cannot add client

magnus.olsson at ringhals.se magnus.olsson at ringhals.se
Tue Mar 8 03:48:48 MST 2005


I have change the code, compile and restart Heartbeat, and now do I get:
heartbeat: 2005/03/08_11:45:53 WARN: Client [4742] pid 4742 failed authorization [client failed authorization]
heartbeat: 2005/03/08_11:45:53 ERROR: api_process_registration_msg: cannot add client(1)


-----Ursprungligt meddelande-----
Från: linux-ha-bounces at lists.linux-ha.org [mailto:linux-ha-bounces at lists.linux-ha.org]För Guochun Shi
Skickat: tisdagen den 1 mars 2005 18:18
Till: General Linux-HA mailing list
Ämne: Re: [Linux-HA] api_process_registration_msg: cannot add client



To run multiple copies of cl_status in one node, here is what you need to do: 

Apply this patch to cl_status.c (This patch changes cl_status to signon as casual client. A casual client's name is the same as its process id) 
RCS file: /home/cvs/linux-ha/linux-ha/tools/cl_status.c,v
retrieving revision 1.10
diff -u -r1.10 cl_status.c
--- cl_status.c 11 Nov 2004 13:44:45 -0000      1.10
+++ cl_status.c 28 Jan 2005 09:37:17 -0000
@@ -298,7 +298,7 @@
                        }


                        /* cl_log(LOG_DEBUG, "Signing in with heartbeat."); */
-                       if (hb->llc_ops->signon(hb, cl_status_name)!= HA_OK) {
+                       if (hb->llc_ops->signon(hb, NULL)!= HA_OK) {
                                cl_log(LOG_ERR, "Cannot signon with heartbeat");
                                cl_log(LOG_ERR, "REASON: %s",
                                        hb->llc_ops->errmsg(hb));

Add the following line to the end of the file ha.cf 
apiauth default uid=<what_ever_id_u_use_to_run_cl_status>
Now compile cl_status and restart heartbeat. 

-Guochun

At 08:42 AM 3/1/2005 +0100, you wrote:

I'm still get following messages in ha-log
heartbeat: 2005/03/01_08:34:28 WARN: duplicate client add request [cl_status] [27949]
heartbeat: 2005/03/01_08:34:28 ERROR: api_process_registration_msg: cannot add client(1)
I have tried to solve this by using following script each time I use cl_status, but it don't seems to help. 

#!/bin/sh
#@(#)cl_status.sh 1.2 05/02/23 16:28:48 @(#)

LOCKFILE="/tmp/cl_status.lock"
CL_STATUS="/usr/bin/cl_status"

# Create lockfile to prevent program from starting twice
lockfile -l 3 $LOCKFILE

$CL_STATUS $@

rm -f $LOCKFILE
_______________________________________________
Linux-HA mailing list
Linux-HA at lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha


More information about the Linux-HA mailing list