Re: connection to backend smtp server is being reset

Todd Fleisher <[email protected]>
Newsgroups gmane.linux.keepalived.devel
Message-ID <[email protected]>
Can you connect directly from the keepalived machine to each real server using 'telnet 192.168.0.244 25' and 'telnet 192.168.0.245 25' ?

Do you have the VIP IP address bound to the loopback address on each of the real servers (check with 'ip add show lo')?

Do you have the following values set on each real server?
	echo 2 > /proc/sys/net/ipv4/conf/lo/arp_announce
	echo 1 > /proc/sys/net/ipv4/conf/lo/arp_ignore 
	echo 2 > /proc/sys/net/ipv4/conf/all/arp_announce 
	echo 1 > /proc/sys/net/ipv4/conf/all/arp_ignore

-T

On Nov 20, 2013, at 11:17 AM, Roman Gelfand wrote:

> I am trying to connect, from a workstation, to backend smtp server via
> keepalived lb using command telnet 192.168.0.249 25.  The connection
> is being reset.
> 
> trace take on machine running keepalived
> -------------------------------------------------------------
> 
> 90 18:28:37.116176 192.168.0.209 192.168.0.249 TCP 66 54121 > smtp
> [SYN] Seq=0 Win=8192 Len=0 MSS=1460 WS=4 SACK_PERM=1
> 112 18:28:43.116442 192.168.0.209 192.168.0.249 TCP 62 [TCP
> Retransmission] 54121 > smtp [SYN] Seq=0 Win=8192 Len=0 MSS=1460
> SACK_PERM=1
> 
> trace taken from machine running postfix smtp server
> ------------------------------------------------------------------------------
> 
> 135 18:29:32.180241 192.168.0.250 192.168.0.244 TCP 74 59566 > smtp
> [SYN] Seq=0 Win=14600 Len=0 MSS=1460 SACK_PERM=1 TSval=4616943 TSecr=0
> WS=16
> 136 18:29:32.180292 192.168.0.244 192.168.0.250 TCP 74 smtp > 59566
> [SYN, ACK] Seq=0 Ack=1 Win=14480 Len=0 MSS=1460 SACK_PERM=1
> TSval=2535443 TSecr=4616943 WS=32
> 137 18:29:32.180435 192.168.0.250 192.168.0.244 TCP 66 59566 > smtp
> [ACK] Seq=1 Ack=1 Win=14608 Len=0 TSval=4616943 TSecr=2535443
> 138 18:29:32.180480 192.168.0.250 192.168.0.244 TCP 66 59566 > smtp
> [RST, ACK] Seq=1 Ack=1 Win=14608 Len=0 TSval=4616943 TSecr=2535443
> 
> 
> Not sure why it is not working.
> 
> 
> my topology is as follows.
> 
>           lb1 (keepalived server)  host mx...   eth0  vip .249, eth1 ip .250
>                     ||
>                     ||
>                     ||
>          ========================
>          ||                                             ||
>          ||                                             ||
>          ||                                             ||
> host mx1...  ip .244 (postfix smtp)     host mx2... ip .245 (postfix smtp)
> 
> On each m1... and mx2... mail servers I added
> 
> My config 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
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.