Hi ;-)
I'am really in trouble ;-( nanny seems to work like a charm on command
line (forking ipvsadm etc...) but when I use it in shell script (bash
2.03.0(1)-release) on a glibc-2.1.3 system (debian 2.2/frozen) the nanny
process says that it cannot execute command /sbin/ipvsadm...
This is really strange and I saw such comportment when using piranha
and/or lvs... ;-(
I tryed also to static compile both ipvsadm *and* nanny but this doesn't
solve the problem....
After using strace I've got such trace... :
--/---
12922 execve("/sbin/nanny", ["/sbin/nanny", "-t", "10", "-I", "/sbin/ipvsadm",
"-U", "/usr/sbin/rup", "-M", "-m", "-p", "80", "-a", "120", "-S", "2", "-h",
"10.1.1.1", "-v", "-V", "62.4.2.126", "-w", "1"], [/* 17 vars */]) = 0
12922 fcntl(0, F_GETFD) = 0
12922 fcntl(1, F_GETFD) = 0
12922 fcntl(2, F_GETFD) = 0
12922 personality(PER_LINUX) = 0
12922 geteuid() = 0
12922 getuid() = 0
12922 getegid() = 0
12922 getgid() = 0
12922 brk(0) =
0x8094c7c
12922 brk(0x8094c9c) =
0x8094c9c
12922 brk(0x8095000) =
0x8095000
12922 getpid() = 12922
12922 brk(0x8096000) =
0x8096000
12922 open("/etc/popt", O_RDONLY) = -1
ENOENT (No such file or directory)
12922 getuid() = 0
12922 geteuid() = 0
12922 open("/root/.popt", O_RDONLY) = -1
ENOENT (No such file or directory)
12922 fork() = 12923
12922 wait4(12923, <unfinished ...>
12923 fork() = 12924
12923 _exit(0) = ?
12924 close(0 <unfinished ...>
12922 <... wait4 resumed> NULL, 0, NULL) = 12923
12924 <... close resumed> ) = 0
12922 --- SIGCHLD (Child exited) ---
12924 close(1) = 0
12922 _exit(0) = ?
12924 close(2) = 0
12924 setsid() = 12924
12924 brk(0x8099000) =
0x8099000
12924 time([954423272]) =
954423272
12924 open("/etc/localtime", O_RDONLY) = 0
12924 read(0, "TZif\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\f\0\0\0\f\0"..., 44)
= 44
12924 read(0, "\221`PO\233Gx\360\233\327,p\234\274\221p\235\300H\360\236"...,
915) = 915
12924 fstat(0, {st_mode=S_IFREG|0644, st_size=1082, ...}) = 0
12924 old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0x2aaab000
12924 read(0, "\0\0\0021\0\0\0\0\16\20\1\4\0\0\0\0\0\t\0\0\16\20\1\4\0"...,
4096) = 123
12924 close(0) = 0
12924 munmap(0x2aaab000, 4096) = 0
12924 getpid() = 12924
12924 rt_sigaction(SIGPIPE, {0x805d1e4, [], 0x4000000}, {SIG_DFL}, 8) = 0
12924 socket(PF_UNIX, SOCK_DGRAM, 0) = 0
12924 fcntl(0, F_SETFD, FD_CLOEXEC) = 0
12924 connect(0, {sin_family=AF_UNIX, path=" /dev/log"}, 16) = -1
EPROTOTYPE (Protocol wrong type for socket)
12924 close(0) = 0
12924 socket(PF_UNIX, SOCK_STREAM, 0) = 0
12924 fcntl(0, F_SETFD, FD_CLOEXEC) = 0
12924 connect(0, {sin_family=AF_UNIX, path=" /dev/log"}, 16) = 0
12924 send(0, "<30>Mar 30 15:34:32 nanny[12924]"..., 76, 0) = 76
12924 rt_sigaction(SIGPIPE, {SIG_DFL}, NULL, 8) = 0
12924 rt_sigprocmask(SIG_BLOCK, [HUP INT USR1 USR2 ALRM TERM CHLD], NULL, 8) = 0
12924 rt_sigprocmask(SIG_BLOCK, NULL, [HUP INT USR1 USR2 ALRM TERM CHLD], 8) = 0
12924 rt_sigaction(SIGTERM, {0x80481b0, [], SA_RESTART|0x4000000}, {SIG_DFL},
8) = 0
12924 rt_sigaction(SIGINT, {0x80481b0, [], SA_RESTART|0x4000000}, {SIG_DFL}, 8)
= 0
12924 rt_sigaction(SIGCHLD, {0x80481d4, [], SA_RESTART|0x4000000}, {SIG_DFL},
8) = 0
12924 rt_sigaction(SIGALRM, {0x80481e4, [], SA_RESTART|0x4000000}, {SIG_DFL},
8) = 0
12924 rt_sigaction(SIGUSR1, {0x80481f4, [], SA_RESTART|0x4000000}, {SIG_DFL},
8) = 0
12924 rt_sigaction(SIGUSR2, {0x80481f4, [], SA_RESTART|0x4000000}, {SIG_DFL},
8) = 0
12924 rt_sigaction(SIGHUP, {0x80481f4, [], SA_RESTART|0x4000000}, {SIG_DFL}, 8)
= 0
12924 socket(PF_INET, SOCK_RAW, IPPROTO_ICMP) = 1
12924 getpid() = 12924
12924 sendto(1, "\10\0{\375|\2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"...,
64, 0, {sin_family=AF_INET, sin_port=htons(1025),
sin_addr=inet_addr("10.1.1.1")}}, 16) = 64
12924 socket(PF_INET, SOCK_STREAM, IPPROTO_TCP) = 2
12924 fcntl(2, F_SETFL, O_RDONLY|O_NONBLOCK) = 0
12924 connect(2, {sin_family=AF_INET, sin_port=htons(80),
sin_addr=inet_addr("10.1.1.1")}}, 16) = -1 EINPROGRESS (Operation now in
progress)
12924 rt_sigprocmask(SIG_UNBLOCK, [INT TERM], [HUP INT USR1 USR2 ALRM TERM
CHLD], 8) = 0
12924 poll([{fd=2, events=POLLOUT, revents=POLLOUT}], 1, 10000) = 1
12924 rt_sigprocmask(SIG_SETMASK, [HUP INT USR1 USR2 ALRM TERM CHLD], NULL, 8)
= 0
12924 fcntl(2, F_SETFL, O_RDONLY) = 0
12924 connect(2, {sin_family=AF_INET, sin_port=htons(80),
sin_addr=inet_addr("10.1.1.1")}}, 16) = 0
12924 write(2, "HEAD / HTTP/1.0\r\n\r\n", 19) = 19
12924 rt_sigprocmask(SIG_UNBLOCK, [INT TERM], [HUP INT USR1 USR2 ALRM TERM
CHLD], 8) = 0
12924 poll([{fd=2, events=POLLIN, revents=POLLIN}], 1, 10000) = 1
12924 rt_sigprocmask(SIG_SETMASK, [HUP INT USR1 USR2 ALRM TERM CHLD], NULL, 8)
= 0
12924 read(2, "H", 1) = 1
12924 close(2) = 0
12924 time([954423272]) =
954423272
12924 getpid() = 12924
12924 rt_sigaction(SIGPIPE, {0x805d1e4, [], 0x4000000}, {SIG_DFL}, 8) = 0
12924 send(0, "<30>Mar 30 15:34:32 nanny[12924]"..., 64, 0) = 64
12924 rt_sigaction(SIGPIPE, {SIG_DFL}, NULL, 8) = 0
12924 time([954423272]) =
954423272
12924 getpid() = 12924
12924 rt_sigaction(SIGPIPE, {0x805d1e4, [], 0x4000000}, {SIG_DFL}, 8) = 0
12924 send(0, "<30>Mar 30 15:34:32 nanny[12924]"..., 63, 0) = 63
12924 rt_sigaction(SIGPIPE, {SIG_DFL}, NULL, 8) = 0
12924 brk(0x809c000) =
0x809c000
12924 time([954423272]) =
954423272
12924 getpid() = 12924
12924 rt_sigaction(SIGPIPE, {0x805d1e4, [], 0x4000000}, {SIG_DFL}, 8) = 0
12924 send(0, "<30>Mar 30 15:34:32 nanny[12924]"..., 123, 0) = 123
12924 rt_sigaction(SIGPIPE, {SIG_DFL}, NULL, 8) = 0
12924 fork() = 12925
12924 wait4(12925, <unfinished ...>
12925 execve("/sbin/ipvsadm", ["/sbin/ipvsadm", "-a", "-t", "62.4.2.126:80",
"-r", "10.1.1.1", "-m", "-w", "1"], [/* 17 vars */]) = 0
12925 fcntl(0, F_GETFD) = -1
EBADF (Bad file descriptor)
12925 open("/dev/null", O_RDONLY) = 0
12925 fcntl(1, F_GETFD) = 0
12925 fcntl(2, F_GETFD) = -1
EBADF (Bad file descriptor)
12925 open("/dev/null", O_RDWR) = 2
12925 personality(PER_LINUX) = 0
12925 geteuid() = 0
12925 getuid() = 0
12925 getegid() = 0
12925 getgid() = 0
12925 brk(0) =
0x808f718
12925 brk(0x808f738) =
0x808f738
12925 brk(0x8090000) =
0x8090000
12925 getpid() = 12925
12925 socket(PF_INET, SOCK_RAW, IPPROTO_RAW) = 4
12925 setsockopt(4, SOL_IP, 0x4c /* IP_??? */, [4], 296) = -1
ESRCH (No such process)
12925 write(2, "setsockopt failed: No such proce"..., 35) = 35
12925 fstat(1, {st_mode=S_IFSOCK|0777, st_size=0, ...}) = 0
12925 old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0x2aaab000
12925 write(1, "Service not defined\n", 20) = -1
EINVAL (Invalid argument)
12925 munmap(0x2aaab000, 4096) = 0
12925 _exit(-1) = ?
12924 <... wait4 resumed> [WIFEXITED(s) && WEXITSTATUS(s) == 255], 0, NULL) =
12925
12924 time([954423272]) =
954423272
12924 getpid() = 12924
12924 rt_sigaction(SIGPIPE, {0x805d1e4, [], 0x4000000}, {SIG_DFL}, 8) = 0
12924 send(0, "<30>Mar 30 15:34:32 nanny[12924]"..., 58, 0) = 58
12924 rt_sigaction(SIGPIPE, {SIG_DFL}, NULL, 8) = 0
12924 _exit(1) = ?
--/---
/Xavier
--
Xavier Beaudouin
System Engineer at ISDNet
Services Office, +33 153746300
|