LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Problem starting keepalived 1.1.7

To: lvs-users@xxxxxxxxxxxxxxxxxxxxxx
Subject: Problem starting keepalived 1.1.7
From: Samuel Tran <stran@xxxxxxxx>
Date: Tue, 07 Dec 2004 10:09:40 -0500
My keepalived daemon won't start. I don't think it even reads the
configuration file.

I would appreciate any help.

Thanks in advance.

Here is my configuration + strace + logs:

Platform: Debian Woody + kernel 2.4.28

* According to the IPVS website, ipvs 1.0.12 was in the offical Linux
kernel 2.4.28 released on November 17, 2004.

* Installed ipvsadm-1.21

* Installed Jumbo patch from Julian Anastasov containing the following
parts: 
      * routes-2.X.*.diff (static_routes, alt_routes, nf_reroute but
        without arp_prefsrc functionality, it is replaced by arprules
        and rp_filter_mask) 
      * hidden-2.X.*.diff (conf/*/hidden) 
      * arprules-2.X.*.diff (iparp/arprules support) 
      * rp_filter_mask-2.X.*.diff (conf/*/rp_filter_mask) 
      * forward_shared-2.X.*.diff (conf/*/forward_shared) 
      * send-to-self-2.X.*.diff (conf/*/loop, included March 3, 2004)

* I manually set up IPVS to load balance two real servers (HTTP and
LDAP) with DR and it worked without any problem. Now I need the
keepalived high availability and healthcheck features.


Keepalived configuration
------------------------
Keepalived version       : 1.1.7
Compiler                 : gcc
Compiler flags           : -g -O2
Extra Lib                : -lpopt -lssl -lcrypto
Use IPVS Framework       : Yes
IPVS sync daemon support : Yes
Use VRRP Framework       : Yes
Use LinkWatch            : No
Use Debug flags          : Yes

Compiled and installed without warnings or errors.


* Configuration file:

global_defs {
   notification_email {
      systems@xxxxxxxxxxx
   }
   notification_email_from root@xxxxxxxxxxx
   smtp_server smtp.example.com
   smtp_connect_timeout 30
   lvs_id LVS_DEVEL
}

virtual_server x.y.z.110 80 {
    delay_loop 6
    lb_algo rr
    lb_kind DR
    nat_mask 255.255.255.0
    persistence_timeout 50
    protocol TCP

  real_server x.y.z.107 80 {
    weight 1
    TCP_CHECK {
      connect_port    80
      connect_timeout 3
    }
  }

  real_server x.y.z.108 80 {
    weight 1
    TCP_CHECK {
      connect_port    80
      connect_timeout 3
    }
  }

}

Here is the strace when I start keepalived with the options "-D -f
/etc/keepalived/keepalived.conf":

execve("/usr/local/sbin/keepalived", ["/usr/local/sbin/keepalived",
"-D", "-f", "/etc/keepalived/keepalived.conf"], [/* 13 vars */]) = 0
uname({sys="Linux", node="idun", ...})  = 0
brk(0)                                  = 0x806c23c
open("/etc/ld.so.preload", O_RDONLY)    = -1 ENOENT (No such file or
directory)
open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=9603, ...}) = 0
old_mmap(NULL, 9603, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40014000
close(3)                                = 0
open("/lib/libpopt.so.0", O_RDONLY)     = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0`\21\0\000"...,
1024) = 1024
fstat64(3, {st_mode=S_IFREG|0644, st_size=20704, ...}) = 0
old_mmap(NULL, 23828, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) =
0x40017000
mprotect(0x4001c000, 3348, PROT_NONE)   = 0
old_mmap(0x4001c000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED,
3, 0x4000) = 0x4001c000
close(3)                                = 0
open("/usr/lib/libssl.so.0.9.6", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\260\215"...,
1024) = 1024
fstat64(3, {st_mode=S_IFREG|0644, st_size=182084, ...}) = 0
old_mmap(NULL, 182848, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) =
0x4001d000
mprotect(0x40047000, 10816, PROT_NONE)  = 0
old_mmap(0x40047000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED,
3, 0x2a000) = 0x40047000
close(3)                                = 0
open("/usr/lib/libcrypto.so.0.9.6", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\240\36"...,
1024) = 1024
fstat64(3, {st_mode=S_IFREG|0644, st_size=771908, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
-1, 0) = 0x4004a000
old_mmap(NULL, 783840, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) =
0x4004b000
mprotect(0x400fd000, 54752, PROT_NONE)  = 0
old_mmap(0x400fd000, 45056, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED,
3, 0xb2000) = 0x400fd000
old_mmap(0x40108000, 9696, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x40108000
close(3)                                = 0
open("/lib/libc.so.6", O_RDONLY)        = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\30\222"...,
1024) = 1024
fstat64(3, {st_mode=S_IFREG|0755, st_size=1153784, ...}) = 0
old_mmap(NULL, 1166560, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) =
0x4010b000
mprotect(0x4021e000, 40160, PROT_NONE)  = 0
old_mmap(0x4021e000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED,
3, 0x113000) = 0x4021e000
old_mmap(0x40224000, 15584, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x40224000
close(3)                                = 0
open("/lib/libdl.so.2", O_RDONLY)       = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0T\27\0\000"...,
1024) = 1024
fstat64(3, {st_mode=S_IFREG|0644, st_size=8008, ...}) = 0
old_mmap(NULL, 11004, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) =
0x40228000
mprotect(0x4022a000, 2812, PROT_NONE)   = 0
old_mmap(0x4022a000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED,
3, 0x1000) = 0x4022a000
close(3)                                = 0
munmap(0x40014000, 9603)                = 0
brk(0)                                  = 0x806c23c
brk(0x806c3e4)                          = 0x806c3e4
brk(0x806d000)                          = 0x806d000
brk(0x8070000)                          = 0x8070000
time([1102431809])                      = 1102431809
open("/etc/localtime", O_RDONLY)        = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=1267, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
-1, 0) = 0x40014000
read(3, "TZif\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\4\0\0\0\4\0"...,
4096) = 1267
close(3)                                = 0
munmap(0x40014000, 4096)                = 0
rt_sigaction(SIGPIPE, {0x401d7f48, [], 0x4000000}, {SIG_DFL}, 8) = 0
socket(PF_UNIX, SOCK_DGRAM, 0)          = 3
fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0
connect(3, {sin_family=AF_UNIX, path="/dev/log"}, 16) = 0
send(3, "<30>Dec  7 10:03:29 Keepalived: "..., 72, 0) = 72
rt_sigaction(SIGPIPE, {SIG_DFL}, NULL, 8) = 0
open("/var/run/keepalived.pid", O_RDONLY) = 4
fstat64(4, {st_mode=S_IFREG|0666, st_size=5, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
-1, 0) = 0x40014000
read(4, "3038\n", 4096)                 = 5
close(4)                                = 0
munmap(0x40014000, 4096)                = 0
kill(3038, SIG_0)                       = -1 ESRCH (No such process)
time([1102431809])                      = 1102431809
rt_sigaction(SIGPIPE, {0x401d7f48, [], 0x4000000}, {SIG_DFL}, 8) = 0
send(3, "<30>Dec  7 10:03:29 Keepalived: "..., 80, 0) = 80
rt_sigaction(SIGPIPE, {SIG_DFL}, NULL, 8) = 0
unlink("/var/run/keepalived.pid")       = 0
open("/var/run/keepalived_vrrp.pid", O_RDONLY) = -1 ENOENT (No such file
or directory)
open("/var/run/keepalived_checkers.pid", O_RDONLY) = -1 ENOENT (No such
file or directory)
fork()                                  = 3047
_exit(0)                                = ?


Any clue?
Sam


<Prev in Thread] Current Thread [Next in Thread>