lvs+keepalived 异常
朋友们好,在编译keepalived时遇到了一些问题
环境说明:
系统 centos_5.6 32bit
ipvsadm 1.24 (编译安装 ok)
libnl :libnl-1.0-0.10.pre5.5 ibnl-devel-1.0-0.10.pre5.5(通过yum 装的)
keepalived:1.2.2
先安装的ipvsadm,在安装libnl,最后编译keepalived。
configure时没有报错
Keepalived configuration
------------------------
Keepalived version : 1.2.2
Compiler : gcc
Compiler flags : -g -O2 -DETHERTYPE_IPV6=0x86dd
Extra Lib : -lpopt -lssl -lcrypto -lnl
Use IPVS Framework : Yes
IPVS sync daemon support : Yes
IPVS use libnl : Yes
Use VRRP Framework : Yes
Use Debug flags : No
下来在make时报了一堆错误
gcc -g -O2 -DETHERTYPE_IPV6=0x86dd -I/usr/src/kernels/2.6.18-238.el5-i686/include -DLIBIPVS_USE_NL -Wall -Wunused -c -o libipvs.o libipvs.c
In file included from libipvs.c:24:
ip_vs.h:19:31: error: netlink/genl/genl.h: No such file or directory
ip_vs.h:20:31: error: netlink/genl/ctrl.h: No such file or directory
In file included from libipvs.c:24:
ip_vs.h:522: error: array type has incomplete element type
ip_vs.h:523: error: array type has incomplete element type
ip_vs.h:524: error: array type has incomplete element type
ip_vs.h:525: error: array type has incomplete element type
ip_vs.h:526: error: array type has incomplete element type
ip_vs.h:527: error: array type has incomplete element type
libipvs.c: In function ‘ipvs_nl_message’:
libipvs.c:49: warning: implicit declaration of function ‘nlmsg_alloc’
libipvs.c:49: warning: assignment makes pointer from integer without a cast
libipvs.c:53: warning: implicit declaration of function ‘genlmsg_put’
libipvs.c:53: error: ‘NL_AUTO_PID’ undeclared (first use in this function)
libipvs.c:53: error: (Each undeclared identifier is reported only once
libipvs.c:53: error: for each function it appears in.)
libipvs.c:53: error: ‘NL_AUTO_SEQ’ undeclared (first use in this function)
libipvs.c: In function ‘ipvs_nl_noop_cb’:
libipvs.c:60: error: ‘NL_OK’ undeclared (first use in this function)
libipvs.c: In function ‘ipvs_nl_send_message’:
libipvs.c:68: warning: implicit declaration of function ‘nlmsg_free’
libipvs.c:72: warning: implicit declaration of function ‘genl_connect’
libipvs.c:75: warning: implicit declaration of function ‘genl_ctrl_resolve’
libipvs.c:86: warning: implicit declaration of function ‘nl_socket_modify_cb’
libipvs.c:89: warning: passing argument 2 of ‘nl_send_auto_complete’ from incompatible pointer type
libipvs.c:92: warning: implicit declaration of function ‘nl_recvmsgs_default’
libipvs.c: In function ‘ipvs_getinfo_parse_cb’:
libipvs.c:138: warning: implicit declaration of function ‘nlmsg_hdr’
libipvs.c:138: warning: initialization makes pointer from integer without a cast
libipvs.c:141: warning: implicit declaration of function ‘genlmsg_parse’
libipvs.c:148: warning: implicit declaration of function ‘nla_get_u32’
libipvs.c:151: error: ‘NL_OK’ undeclared (first use in this function)
libipvs.c: In function ‘ipvs_getinfo’:
libipvs.c:165: warning: passing argument 2 of ‘ipvs_nl_send_message’ from incompatible pointer type
libipvs.c: In function ‘ipvs_flush’:
libipvs.c:188: warning: passing argument 2 of ‘ipvs_nl_send_message’ from incompatible pointer type
libipvs.c: In function ‘ipvs_nl_fill_service_attr’:
libipvs.c:203: warning: implicit declaration of function ‘nla_nest_start’
libipvs.c:203: warning: assignment makes pointer from integer without a cast
libipvs.c:207: warning: implicit declaration of function ‘NLA_PUT_U16’
libipvs.c:210: warning: implicit declaration of function ‘NLA_PUT_U32’
libipvs.c:213: warning: implicit declaration of function ‘NLA_PUT’
libipvs.c:217: warning: implicit declaration of function ‘NLA_PUT_STRING’
libipvs.c:222: warning: implicit declaration of function ‘nla_nest_end’
libipvs.c:225: warning: label ‘nla_put_failure’ defined but not used
libipvs.c: In function ‘ipvs_add_service’:
libipvs.c:241: warning: passing argument 2 of ‘ipvs_nl_send_message’ from incompatible pointer type
libipvs.c: In function ‘ipvs_update_service’:
libipvs.c:262: warning: passing argument 2 of ‘ipvs_nl_send_message’ from incompatible pointer type
libipvs.c: In function ‘ipvs_del_service’:
libipvs.c:282: warning: passing argument 2 of ‘ipvs_nl_send_message’ from incompatible pointer type
libipvs.c: In function ‘ipvs_zero_service’:
libipvs.c:307: warning: passing argument 2 of ‘ipvs_nl_send_message’ from incompatible pointer type
libipvs.c: In function ‘ipvs_nl_fill_dest_attr’:
libipvs.c:319: warning: assignment makes pointer from integer without a cast
libipvs.c:333: warning: label ‘nla_put_failure’ defined but not used
libipvs.c: In function ‘ipvs_add_dest’:
libipvs.c:351: warning: passing argument 2 of ‘ipvs_nl_send_message’ from incompatible pointer type
libipvs.c: In function ‘ipvs_update_dest’:
libipvs.c:381: warning: passing argument 2 of ‘ipvs_nl_send_message’ from incompatible pointer type
libipvs.c: In function ‘ipvs_del_dest’:
libipvs.c:410: warning: passing argument 2 of ‘ipvs_nl_send_message’ from incompatible pointer type
libipvs.c: In function ‘ipvs_set_timeout’:
libipvs.c:437: warning: passing argument 2 of ‘ipvs_nl_send_message’ from incompatible pointer type
libipvs.c:439: warning: label ‘nla_put_failure’ defined but not used
libipvs.c: In function ‘ipvs_start_daemon’:
libipvs.c:458: warning: assignment makes pointer from integer without a cast
libipvs.c:468: warning: passing argument 2 of ‘ipvs_nl_send_message’ from incompatible pointer type
libipvs.c: In function ‘ipvs_stop_daemon’:
libipvs.c:489: warning: assignment makes pointer from integer without a cast
libipvs.c:499: warning: passing argument 2 of ‘ipvs_nl_send_message’ from incompatible pointer type
libipvs.c: In function ‘ipvs_parse_stats’:
libipvs.c:514: warning: implicit declaration of function ‘nla_parse_nested’
libipvs.c:532: warning: implicit declaration of function ‘nla_get_u64’
libipvs.c: In function ‘ipvs_services_parse_cb’:
libipvs.c:546: warning: initialization makes pointer from integer without a cast
libipvs.c:576: warning: implicit declaration of function ‘nla_get_u16’
libipvs.c:582: warning: implicit declaration of function ‘nla_data’
libipvs.c:583: warning: passing argument 2 of ‘memcpy’ makes pointer from integer without a cast
libipvs.c:587: warning: implicit declaration of function ‘nla_get_string’
libipvs.c:587: warning: passing argument 2 of ‘__builtin_strncpy’ makes pointer from integer without a cast
libipvs.c:593: warning: implicit declaration of function ‘nla_memcpy’
libipvs.c: In function ‘ipvs_get_services’:
libipvs.c:629: warning: passing argument 2 of ‘ipvs_nl_send_message’ from incompatible pointer type
libipvs.c: In function ‘ipvs_dests_parse_cb’:
libipvs.c:707: warning: initialization makes pointer from integer without a cast
libipvs.c:738: warning: passing argument 2 of ‘memcpy’ makes pointer from integer without a cast
libipvs.c: In function ‘ipvs_get_dests’:
libipvs.c:792: warning: assignment makes pointer from integer without a cast
libipvs.c:808: warning: passing argument 2 of ‘ipvs_nl_send_message’ from incompatible pointer type
libipvs.c: In function ‘ipvs_get_service’:
libipvs.c:918: warning: passing argument 2 of ‘ipvs_nl_send_message’ from incompatible pointer type
libipvs.c: In function ‘ipvs_timeout_parse_cb’:
libipvs.c:949: warning: initialization makes pointer from integer without a cast
libipvs.c:963: error: ‘NL_OK’ undeclared (first use in this function)
libipvs.c: In function ‘ipvs_get_timeout’:
libipvs.c:982: warning: passing argument 2 of ‘ipvs_nl_send_message’ from incompatible pointer type
libipvs.c: In function ‘ipvs_daemon_parse_cb’:
libipvs.c:1000: warning: initialization makes pointer from integer without a cast
libipvs.c:1023: warning: passing argument 2 of ‘__builtin_strncpy’ makes pointer from integer without a cast
libipvs.c:1028: error: ‘NL_OK’ undeclared (first use in this function)
libipvs.c: In function ‘ipvs_get_daemon’:
libipvs.c:1049: warning: passing argument 2 of ‘ipvs_nl_send_message’ from incompatible pointer type
make[2]: *** [libipvs.o] Error 1
make[2]: Leaving directory `/software/keepalived-1.2.2/keepalived/libipvs-2.6'
make[1]: *** [all] Error 1
make[1]: Leaving directory `/software/keepalived-1.2.2/keepalived'
make: *** [all] Error 2
请朋友们帮我看看,可以的话烦请详细说明。
十分感谢。
网友们说做以下三步可以搞定
1.从源码中找到ip_vs.h文件 拷贝 到 /usr/include/net下
2.ln -s /usr/src/kernels/2.6.18-238.el5-i686/ /usr/src/linux
3.修改当前目录和libipvs目录中的Makefile的:
INCLUDE = -I/usr/src/linux/include -I.. -I.
为:
INCLUDE = -I/usr/src/kernels/2.6.18-238.el5-i686/include -I.. -I.
但是我的这个还是不行。 请朋友们看看
飞翔的猴子
周二, 2012-04-10 13:45
Permalink
没有朋友们遇到过这
没有朋友们遇到过这个问题吗?
Anonymous (没有被验证)
周三, 2012-05-02 08:20
Permalink
缺少libnl,libnl-devel,popt包
yum install libnl libnl-devel popt
之后再安装
Anonymous (没有被验证)
周一, 2012-07-30 13:45
Permalink
楼上的可以解决一部
楼上的可以解决一部分问题,例如:出现IPVS use libnl :NO的错误
Anonymous (没有被验证)
周三, 2014-03-05 01:45
Permalink
wCwlpRjzDGaU
IMHO you've got the right anersw!
Anonymous (没有被验证)
周三, 2014-03-05 14:49
Permalink
kswLQVBpQMyQ
This has made my day. I wish all posntigs were this good.
Anonymous (没有被验证)
周六, 2014-12-20 02:30
Permalink
MNmMXKvWMe
Right onhti-s helped me sort things right out.
Anonymous (没有被验证)
周二, 2014-12-23 20:34
Permalink
LETwwtnIXl
It's good to see someone thiiknng it through.
Anonymous (没有被验证)
周四, 2014-12-25 11:56
Permalink
qElZjPXgbrEvjxkK
cialis buy online
Anonymous (没有被验证)
周五, 2015-01-09 09:59
Permalink
FZKqDzIwGuehjD
viagra
Anonymous (没有被验证)
周六, 2015-01-24 16:52
Permalink
bBnUNZpPsN
Begun, the great internet edaitucon has.
Anonymous (没有被验证)
周二, 2015-01-27 01:10
Permalink
EUbenDlfFYkJ
Ya learn somtiheng new everyday. It's true I guess!
Anonymous (没有被验证)
周三, 2015-01-28 16:54
Permalink
yAjmMWeXzRarHA
life insurance comparison car insurance cheap quotes on car insurance buy cilias viagra viagra for sale
Anonymous (没有被验证)
周一, 2015-02-09 12:41
Permalink
tSKCESeaPSQCVQ
other online Illinois car insurance uninsured estimate costs insurance quotes car after ways deductibles VA car insurance quotes online know where
Anonymous (没有被验证)
周四, 2015-02-19 18:54
Permalink
YPNAtOIRwmSj
activate cheap car insurance in nj extremely hard comprised buy levitra 25mg online becomes even catches fire car insurance maximum justifiable aphrodisiac erectile erectile
Anonymous (没有被验证)
周日, 2015-02-22 00:26
Permalink
dRCjVELEQeunyMU
some intelligent co insurance car insurance consists insurance insurance auto greater risk instance insurance auto minimum liability
Anonymous (没有被验证)
周二, 2015-04-07 23:20
Permalink
eSfyclitLcKoFARSfD
police buy viagra like brain area car insurance quotes make sure low-mileage car insurance qoute DC them young drivers auto insurance qoutes South Carolina related minimum Iowa car insurance qoutes any offence
Anonymous (没有被验证)
周日, 2015-04-19 09:54
Permalink
legrsvGJzY
travel insurance cheap auto insurance quotes in TX insurance company whole life insurance quotes purpose erection quality cialis online occurs driving record car insurance getting should levitra sales penis
Anonymous (没有被验证)
周四, 2015-04-30 20:46
Permalink
QxfZIAajAcaFn
order tadalafil cheap colchicine buy valtrex online without prescription buy zovirax online without prescription azithromycin online buy fluoxetine
Anonymous (没有被验证)
周四, 2015-05-14 07:34
Permalink
UaVzKUpqhBMfKXIVtdIH
matter legit essay writing services person needed single college essay writing walters single help writing a essay expert careful synthesis buy essay papers each source different essay papers finalise important college essay special symbols
Anonymous (没有被验证)
周四, 2015-05-14 11:55
Permalink
fmYLdzyuSau
brainstorming buy essay papers each source intellect custom essay services three paper term paper writing rhetoric authority con write essay for me pot screaming chapters buy essay expression
Anonymous (没有被验证)
周二, 2015-02-10 12:22
Permalink
lmDbEJqEneIpAFSb
goals whole life insurance quotes budget assertive where to buy viagra 25mg muira puama insurance company auto insurance quotes auto financing
Anonymous (没有被验证)
周五, 2015-02-20 21:06
Permalink
VqtRmYdIQlZIXXVUbO
more than free car insurance before making lender auto insurance quotes businesses words before aacar insurance while
Anonymous (没有被验证)
周五, 2015-05-01 15:28
Permalink
OPAwObQEcgKnAONtYi
buy ciprofloxacin without prescription order fluoxetine cheap topiramate order sildenafil order furosemide
Anonymous (没有被验证)
周一, 2015-06-08 14:51
Permalink
fcaRQggVlKGbJUwxP
male enhancement cialis online surgery question purpose auto insurance quotes FL expenses comes closest auto insurance offer good fake levitra such pills off altogether viagra calcium channel
Anonymous (没有被验证)
周三, 2014-04-23 13:47
Permalink
VWXleSMQVUNShUZlz
car insurance quotes pa car insurance quotes vogueandvino.com life insurance riders
Anonymous (没有被验证)
周日, 2014-10-26 14:37
Permalink
vBvavZLWYHIt
online car insurance insurance auto car insurance levitra order online florida health insurance
Anonymous (没有被验证)
周三, 2012-07-04 10:48
Permalink
我今天也遇到了!!
我今天也遇到了!!!
k7arm
周三, 2012-08-08 07:02
Permalink
error: ‘NL_OK’
error: ‘NL_OK’ undeclared (first use in this function)
很明显,没有这个,要么是根本没有相应的库,要么是路径不对,还需要近一步排查
Patrick_Peng
周二, 2012-08-14 08:06
Permalink
1.2.2以前的版本不会出现这个问题
1.2.2以前的版本不会出现这个问题,至今没有解决,在centos5.5上测试会出现问题,是不是需要升级内核呢?我现在用的1.2.1,没有这些问题了
Anonymous (没有被验证)
周四, 2012-08-16 14:50
Permalink
这种问题很普遍。192.1
这种问题很普遍。192.168.1.1
crookoo
周三, 2013-01-30 13:31
Permalink
keepalived之make出现问题解决办法
进去的解压完的keepalived的文件夹中,进入keepalived-1.2.2/keepalived/libipvs-2.6, 编辑 ip_vs.h文件, 将#include /* For __beXX types in userland */ 这句剪切到 #include sys/types.h 的下面,问题迎刃而解了!!!
higkoo
周四, 2013-03-07 05:54
Permalink
直接用yum安装多好呢?
加入epel源就可以直接yum安装了,省事、放心!
http://hi.baidu.com/higkoo