Re: Configuration Problem

Roman Gelfand <[email protected]>
Newsgroups gmane.linux.keepalived.devel
Message-ID <CAJbW+rn5fnq_WAQjve1BCPNBpgXtsBKuWxKg=oWw7mL-20YZVw@mail.gmail.com>
Here is the syslog

Nov 20 08:16:52 lb1 kernel: [    4.489285] eth1: intr type 3, mode 0,
2 vectors allocated
Nov 20 08:16:52 lb1 kernel: [    4.490222] eth1: NIC Link is Up 10000 Mbps
Nov 20 08:16:52 lb1 Keepalived: Starting Keepalived v1.2.2 (12/18,2011)
Nov 20 08:16:52 lb1 Keepalived: Starting Healthcheck child process, pid=2174
Nov 20 08:16:52 lb1 Keepalived: Starting VRRP child process, pid=2175
Nov 20 08:16:52 lb1 Keepalived_vrrp: Registering Kernel netlink reflector
Nov 20 08:16:52 lb1 Keepalived_vrrp: Registering Kernel netlink command channel
Nov 20 08:16:52 lb1 Keepalived_vrrp: Registering gratutious ARP shared channel
Nov 20 08:16:52 lb1 Keepalived_vrrp: Initializing ipvs 2.6
Nov 20 08:16:52 lb1 Keepalived_healthcheckers: Initializing ipvs 2.6
Nov 20 08:16:52 lb1 kernel: [    4.549778] nf_conntrack version 0.5.0
(8023 buckets, 32092 max)
Nov 20 08:16:52 lb1 Keepalived_healthcheckers: Registering Kernel
netlink reflector
Nov 20 08:16:52 lb1 Keepalived_healthcheckers: Registering Kernel
netlink command channel
Nov 20 08:16:52 lb1 Keepalived_healthcheckers: Opening file
'/etc/keepalived/keepalived.conf'.
Nov 20 08:16:52 lb1 Keepalived_vrrp: Opening file
'/etc/keepalived/keepalived.conf'.
Nov 20 08:16:52 lb1 Keepalived_healthcheckers: Configuration is using
: 5935 Bytes
Nov 20 08:16:52 lb1 kernel: [    4.552135] IPVS: Registered protocols
(TCP, UDP, SCTP, AH, ESP)
Nov 20 08:16:52 lb1 kernel: [    4.552148] IPVS: Connection hash table
configured (size=4096, memory=64Kbytes)
Nov 20 08:16:52 lb1 kernel: [    4.552234] IPVS: Creating netns size=2088 id=0
Nov 20 08:16:52 lb1 kernel: [    4.552237] IPVS: ipvs loaded.
Nov 20 08:16:52 lb1 Keepalived_vrrp: Configuration is using : 61556 Bytes
Nov 20 08:16:52 lb1 Keepalived_vrrp: Using LinkWatch kernel netlink reflector...
Nov 20 08:16:52 lb1 Keepalived_healthcheckers: Using LinkWatch kernel
netlink reflector...
Nov 20 08:16:52 lb1 mpt-statusd: detected non-optimal RAID status
Nov 20 08:16:52 lb1 kernel: [    4.934738] eth0: intr type 3, mode 0,
2 vectors allocated
Nov 20 08:16:52 lb1 kernel: [    4.935820] eth0: NIC Link is Up 10000 Mbps
Nov 20 08:16:53 lb1 Keepalived_vrrp: VRRP_Instance(VI_1) Transition to
MASTER STATE
Nov 20 08:16:54 lb1 Keepalived_vrrp: VRRP_Instance(VI_1) Entering MASTER STATE

On Wed, Nov 20, 2013 at 7:07 AM, Stefan Kärst <[email protected]> wrote:
> Hi Roman,
>
> I tried your keepalived config and it worked fine, although there is no
> closing bracket for vrrp_instance VI_1.
> What keepalived messages are in your syslog? Does keepalived start the
> VIP? (do not use ifconfig but "ip a s" instead)
>
> I'm not sure what ipvsadm should look like but if keepalived started the
> VIP on e.g. eth0 ipvsadm -l shows no difference:
>
>
> Nov 20 12:00:03 localhost Keepalived_vrrp[5791]: VRRP_Instance(VI_1)
> Entering MASTER STATE
> Nov 20 12:00:03 localhost Keepalived_vrrp[5791]: VRRP_Instance(VI_1)
> setting protocol VIPs.
> Nov 20 12:00:03 localhost Keepalived_vrrp[5791]: VRRP_Instance(VI_1)
> Sending gratuitous ARPs on eth0 for 192.168.0.249
> Nov 20 12:00:03 localhost Keepalived_healthcheckers[5790]: Netlink
> reflector reports IP 192.168.0.249 added
>
> [root@t430-sub1 keepalived]# ip -4 a s dev eth0
> 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast
> state UP qlen 1000
>     inet 192.168.122.5/24 brd 192.168.122.255 scope global eth0
>     inet 192.168.0.249/24 brd 192.168.0.255 scope global eth0
>
> [root@t430-sub1 keepalived]# ipvsadm -l
> IP Virtual Server version 1.2.1 (size=4096)
> Prot LocalAddress:Port Scheduler Flags
>   -> RemoteAddress:Port           Forward Weight ActiveConn InActConn
> [root@t430-sub1 keepalived]#
>
>
> hth
>
> Best Regard
> Stefan Kärst
>
>
> Am 20.11.2013 03:47, Roman Gelfand schrieb:
>> I am trying to setup load balancing for smtp servers.  Seemingly, the
>> configuration file is ok.
>>
>> ipvsadm -l doesn't return anything
>>
>> My keepalive.conf is
>>
>> global_defs  {
>> lvs_id  LVS_1
>> }
>> vrrp_instance  VI_1  {
>>        interface  eth1
>>        state  MASTER
>>        virtual_router_id  51
>>        priority  101                     # 101 on master, 100 on backup
>>        advert_int  1
>>        smtp_alert
>> authentication  {
>> auth_type  PASS
>> auth_pass  pass
>>
>> }
>>
>>        virtual_ipaddress  {
>>            192.168.0.249/24  brd  192.168.0.255  dev  eth0
>> }
>>
>>  VIRTUAL_SERVER  192.168.0.249  25  {
>>    delay_loop  60
>>    lb_algo  rr
>>    lb_kind  DR
>>    protocol  TCP
>>    persistence_timeout  360
>>
>>    real_server 192.168.0.245 25 {
>>    weight 1
>>        TCP_CHECK {
>>                connect_timeout 3
>>        connect_port 25
>>        nb_get_retry 3
>>        delay_before_retry 3
>>        }
>>    }
>>    real_server 192.168.0.244 25 {
>>        weight 1
>>        TCP_CHECK {
>>                connect_timeout 3
>>        connect_port 25
>>        nb_get_retry 3
>>        delay_before_retry 3
>>        }
>>    }
>> }
>>
>> ------------------------------------------------------------------------------
>> Shape the Mobile Experience: Free Subscription
>> Software experts and developers: Be at the forefront of tech innovation.
>> Intel(R) Software Adrenaline delivers strategic insight and game-changing
>> conversations that shape the rapidly evolving mobile landscape. Sign up now.
>> http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
>> _______________________________________________
>> Keepalived-devel mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/keepalived-devel
>
>
>
> ------------------------------------------------------------------------------
> Shape the Mobile Experience: Free Subscription
> Software experts and developers: Be at the forefront of tech innovation.
> Intel(R) Software Adrenaline delivers strategic insight and game-changing
> conversations that shape the rapidly evolving mobile landscape. Sign up now.
> http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
> _______________________________________________
> Keepalived-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/keepalived-devel
>

------------------------------------------------------------------------------
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic insight and game-changing 
conversations that shape the rapidly evolving mobile landscape. Sign up now. 
http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.