Second failover failure with conntrackd - INVALID packets
Hi,
I have a testbed cluster with two firewall nodes and conntrack sync. Initially, node1 is the primary and node2 the backup.
1) I open a jabber connection. node1 replicates the conntrack session to node2 (conntrackd in synchronization mode FT-FW).
2) First failover : node2 becomes the new primary, node1 the backup. node2 recovers the TCP session. Everything seems to work fine at this moment.
3) Second failover : just 1 to 2 minutes after the first failove, node1 becomes the primary, node2 the backup. The jabber TCP session is still into the conntrack table but the session is broken. I see many packets denied due to the INVALID state.
"nf_ct_tcp: ACK is over the upper bound (ACKed data not seen yet) IN= OUT=xxxxxx"
The TCP window tracking rejects packets after the second failober. I just have to activate "nf_conntrack_tcp_be_liberal" to make it work again, but that's not, for me, a good solution:
echo 1 > /proc/sys/net/netfilter/nf_conntrack_tcp_be_liberal
Why conntrackd cannot recover the TCP session in the second failover ? Is it a known issue, possibly due to a misconfiguration ? I'm using debian/lenny (kernel 2.6.26-1-amd64) with heartbeat2, conntrack 0.9.6 and a shell script that executes :
** on the new primary :
conntrackd -c -C /etc/conntrackd.conf conntrackd -f -C /etc/conntrackd.conf conntrackd -R -C /etc/conntrackd.conf
** on the new backup :
conntrackd -n -C /etc/conntrackd.conf
Thanks for your help,
Regards,
Hi Yoann,
Quoted 27 lines · Yoann Juet
I have a testbed cluster with two firewall nodes and conntrack sync. Initially, node1 is the primary and node2 the backup.
1) I open a jabber connection. node1 replicates the conntrack session to node2 (conntrackd in synchronization mode FT-FW).
2) First failover : node2 becomes the new primary, node1 the backup. node2 recovers the TCP session. Everything seems to work fine at this moment.
3) Second failover : just 1 to 2 minutes after the first failove, node1 becomes the primary, node2 the backup. The jabber TCP session is still into the conntrack table but the session is broken. I see many packets denied due to the INVALID state."
nf_ct_tcp: ACK is over the upper bound (ACKed data not seen yet) IN= OUT=xxxxxx"The TCP window tracking rejects packets after the second failober. I just have to activate "
nf_conntrack_tcp_be_liberal" to make it work again, but that's not, for me, a good solution:echo 1 >
/proc/sys/net/netfilter/nf_conntrack_tcp_be_liberalWhy conntrackd cannot recover the TCP session in the second failover ? Is it a known issue, possibly due to a misconfiguration ? I'm using debian/lenny (kernel 2.6.26-1-amd64) with heartbeat2, conntrack 0.9.6 and a shell script that executes :
Quoted 7 lines
** on the new primary :
conntrackd -c -C/etc/conntrackd.confconntrackd -f -C/etc/conntrackd.confconntrackd -R -C/etc/conntrackd.conf** on the new backup :
conntrackd -n -C/etc/conntrackd.conf
Please, have a look at the conntrackd log file (/var/log/conntrackd.log or syslog depending on your configuration). I think that it must be reporting EINVAL while trying to update the entries during the second fail-over.
Signature · 1 line
"Los honestos son inadaptados sociales" -- Les Luthiers
Hi,
I see tons of messages "[warning] delayed packet?", even before the first failover, but nothing related to EINVAL. Does it help ?
FYI, the cluster is a KVM guest using hardware virtualization with net virtio.
Regards,
Quoted 35 lines · Pablo Neira Ayuso
Hi Yoann,
Quoted 32 lines · Yoann Juet
I have a testbed cluster with two firewall nodes and conntrack sync. Initially, node1 is the primary and node2 the backup.
1) I open a jabber connection. node1 replicates the conntrack session to node2 (conntrackd in synchronization mode FT-FW).
2) First failover : node2 becomes the new primary, node1 the backup. node2 recovers the TCP session. Everything seems to work fine at this moment.
3) Second failover : just 1 to 2 minutes after the first failove, node1 becomes the primary, node2 the backup. The jabber TCP session is still into the conntrack table but the session is broken. I see many packets denied due to the INVALID state."
nf_ct_tcp: ACK is over the upper bound (ACKed data not seen yet) IN= OUT=xxxxxx"The TCP window tracking rejects packets after the second failober. I just have to activate "
nf_conntrack_tcp_be_liberal" to make it work again, but that's not, for me, a good solution:echo 1 >
/proc/sys/net/netfilter/nf_conntrack_tcp_be_liberalWhy conntrackd cannot recover the TCP session in the second failover ? Is it a known issue, possibly due to a misconfiguration ? I'm using debian/lenny (kernel 2.6.26-1-amd64) with heartbeat2, conntrack 0.9.6 and a shell script that executes :
** on the new primary :
conntrackd -c -C/etc/conntrackd.confconntrackd -f -C/etc/conntrackd.confconntrackd -R -C/etc/conntrackd.conf
Quoted 8 lines
Quoted 2 lines
** on the new backup :
conntrackd -n -C/etc/conntrackd.confPlease, have a look at the conntrackd log file (
/var/log/conntrackd.logor syslog depending on your configuration). I think that it must be reporting EINVAL while trying to update the entries during the second fail-over.
begin:vcard
fn:Yoann Juet
n:Juet;Yoann
org;quoted-printable:;DSI Universit=C3=A9 de Nantes adr;quoted-printable:BP92208;;2, rue de la Houssini=C3=A8re;Nantes;;44322;France email;internet:[email protected] title;quoted-printable:Ing=C3=A9nieur s=C3=A9curit=C3=A9 & r=C3=A9seau tel;work:02.51.12.53.93
tel;fax:02.51.12.58.60
x-mozilla-html:FALSE
version:2.1
end:vcard
Quoted 4 lines · Yoann Juet
Hi,
I see tons of messages "[warning] delayed packet?", even before the first failover, but nothing related to EINVAL. Does it help ?
That's another known problem of 0.9.6. Probably, you don't see EINVAL but a message like "N entries can't be committed". I suggest you to upgrade to latest. I'm about to release 0.9.10, using current would make my life easier to provide you support.
Quoted 2 lines
FYI, the cluster is a KVM guest using hardware virtualization with net virtio.
Interesting. I have never used it in such environment.
Signature · 1 line
"Los honestos son inadaptados sociales" -- Les Luthiers
Quoted 3 lines
That's another known problem of 0.9.6. Probably, you don't see EINVAL
but a message like "N entries can't be committed". I suggest you to
upgrade to latest. I'm about to release 0.9.10, using current would >make my life easier to provide you support.
Well, I installed conntrack-tools 0.9.9 and libnetfilter_conntrack 0.0.99 on the cluster. No more "delayed packet" message or another warning or error message. Unfortunately, I get the same result when the second failover is triggered. Packets are denied due to INVALID state.
PS: the new configuration subblock "Filter from Kernelspace" in conntrackd.conf is not parsed correctly. I get an error message:
"Error parsing config file: line (190), symbol 'from': syntax error"
I have to delete it to make starting conntrackd.
Regards,
Quoted 11 lines · Pablo Neira Ayuso
Quoted 4 lines · Yoann Juet
Hi,
I see tons of messages "[warning] delayed packet?", even before the first failover, but nothing related to EINVAL. Does it help ?
That's another known problem of 0.9.6. Probably, you don't see EINVAL but a message like "N entries can't be committed". I suggest you to upgrade to latest. I'm about to release 0.9.10, using current would make my life easier to provide you support.
Quoted 5 lines
Quoted 2 lines
FYI, the cluster is a KVM guest using hardware virtualization with net virtio.
Interesting. I have never used it in such environment.
begin:vcard
fn:Yoann Juet
n:Juet;Yoann
org;quoted-printable:;DSI Universit=C3=A9 de Nantes adr;quoted-printable:BP92208;;2, rue de la Houssini=C3=A8re;Nantes;;44322;France email;internet:[email protected] title;quoted-printable:Ing=C3=A9nieur s=C3=A9curit=C3=A9 & r=C3=A9seau tel;work:02.51.12.53.93
tel;fax:02.51.12.58.60
x-mozilla-html:FALSE
version:2.1
end:vcard
Quoted 9 lines · Yoann Juet
Quoted 4 lines
That's another known problem of 0.9.6. Probably, you don't see EINVAL but a message like "N entries can't be committed". I suggest you to upgrade to latest. I'm about to release 0.9.10, using current would make my life easier to provide you support.
Well, I installed conntrack-tools 0.9.9 and
libnetfilter_conntrack0.0.99 on the cluster. No more "delayed packet" message or another warning or error message. Unfortunately, I get the same result when the second failover is triggered. Packets are denied due to INVALID state.
When the entries are created or updated, the flag IP_CT_TCP_FLAG_BE_LIBERAL is set so that the window checking are skipped, you should not get those "ACK/SEQ is under/over window". I don't have an answer for the problem that you're reporting at this moment. I know that there are some bugs in the ctnetlink code of 2.6.26 that were fixed in the subsequent kernel releases, but I did not know any that affected the internal TCP flags set/unset. As these stuff is under development, I suggest you to use the latest Linux kernel, please let me know if the problem persists.
Quoted 6 lines
PS: the new configuration subblock "Filter from Kernelspace" in conntrackd.conf is not parsed correctly. I get an error message:
"Error parsing config file: line (190), symbol 'from': syntax error"
I have to delete it to make starting conntrackd.
Filter From Kernelspace {
Protocol Accept {
TCP
}
Address Ignore {
IPv4_address 127.0.0.1 # loopback
}
}It works here fine. Error reporting in the parsing is not very precise yet, probably the problem is not in Filter but before (something is missing and the parser gets confused). Could you post your config file to reproduce it? You can send it to me in private if you want.
Signature · 1 line
"Los honestos son inadaptados sociales" -- Les Luthiers
Quoted 14 lines · Pablo Neira Ayuso
Quoted 3 lines · Yoann Juet
"Error parsing config file: line (190), symbol 'from': syntax error"
I have to delete it to make starting conntrackd.
Filter From Kernelspace { Protocol Accept { TCP } Address Ignore { IPv4_address 127.0.0.1 # loopback } }
Quoted 4 lines
It works here fine. Error reporting in the parsing is not very precise yet, probably the problem is not in Filter but before (something is missing and the parser gets confused). Could you post your config file to reproduce it? You can send it to me in private if you want.
Sorry, you're right. There is a typo in the example files. I have applied the following fix to the git (will be available in conntrack-tools-0.9.10).
Signature · 1 line
"Los honestos son inadaptados sociales" -- Les Luthiers
doc: use 'From' instead of 'from' in the example configfiles
This patch fixes a wrong use of 'from' instead of 'From' in the example configuration files.
---
doc/sync/alarm/conntrackd.conf | 2 +- doc/sync/ftfw/conntrackd.conf | 2 +- doc/sync/notrack/conntrackd.conf | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
doc/sync/alarm/conntrackd.conf +1 -1
@@ -226,7 +226,7 @@ General { # event filtering, use the keyword 'Kernelspace' instead of # 'Userspace'. # - Filter from Userspace { + Filter From Userspace { # # Accept only certain protocols: You may want to replicate # the state of flows depending on their layer 4 protocol.
doc/sync/ftfw/conntrackd.conf +1 -1
@@ -235,7 +235,7 @@ General { # event filtering, use the keyword 'Kernelspace' instead of # 'Userspace'. # - Filter from Userspace { + Filter From Userspace { # # Accept only certain protocols: You may want to replicate # the state of flows depending on their layer 4 protocol.
doc/sync/notrack/conntrackd.conf +1 -1
@@ -216,7 +216,7 @@ General { # event filtering, use the keyword 'Kernelspace' instead of # 'Userspace'. # - Filter from Userspace { + Filter From Userspace { # # Accept only certain protocols: You may want to replicate # the state of flows depending on their layer 4 protocol.
Hi pablo !
Quoted 3 lines
that were fixed in the subsequent kernel releases, but I did not know
any that affected the internal TCP flags set/unset. As these stuff is
under development, I suggest you to use the latest Linux kernel, please let me know if the problem persists.
I still have the same symptoms with a 2.6.28-2 kernel. My testbed is not so far away from yours:
You Me
----------------------------------
Etch <-> Lenny
2.6.28 <-> 2.6.28-2
conntrack 0.9.9? <-> conntrack 0.9.9
ftfw mode <-> ftfw mode
keepalived 1.1.15 <-> heartbeat 2.1.3
no virtualization <-> KVM with net virtio
On your opinion, could it be the side effect of KVM ? Unfortunately, I cannot do without KVM, and cannot test easily without...
Regards,
Quoted 14 lines · Pablo Neira Ayuso
Quoted 13 lines · Pablo Neira Ayuso
Quoted 3 lines · Yoann Juet
"Error parsing config file: line (190), symbol 'from': syntax error"
I have to delete it to make starting conntrackd.
Filter From Kernelspace { Protocol Accept { TCP } Address Ignore { IPv4_address 127.0.0.1 # loopback } }
Quoted 10 lines
Quoted 4 lines
It works here fine. Error reporting in the parsing is not very precise yet, probably the problem is not in Filter but before (something is missing and the parser gets confused). Could you post your config file to reproduce it? You can send it to me in private if you want.
Sorry, you're right. There is a typo in the example files. I have applied the following fix to the git (will be available in conntrack-tools-0.9.10).
begin:vcard
fn:Yoann Juet
n:Juet;Yoann
org;quoted-printable:;DSI Universit=C3=A9 de Nantes adr;quoted-printable:BP92208;;2, rue de la Houssini=C3=A8re;Nantes;;44322;France email;internet:[email protected] title;quoted-printable:Ing=C3=A9nieur s=C3=A9curit=C3=A9 & r=C3=A9seau tel;work:02.51.12.53.93
tel;fax:02.51.12.58.60
x-mozilla-html:FALSE
version:2.1
end:vcard
Hi again Yoann,
Quoted 10 lines · Yoann Juet
Hi pablo !
Quoted 4 lines
that were fixed in the subsequent kernel releases, but I did not know any that affected the internal TCP flags set/unset. As these stuff is under development, I suggest you to use the latest Linux kernel, please let me know if the problem persists.
I still have the same symptoms with a 2.6.28-2 kernel. My testbed is not so far away from yours:
Quoted 8 lines
You Me
----------------------------------
Etch <-> Lenny
2.6.28 <-> 2.6.28-2
conntrack 0.9.9? <-> conntrack 0.9.9
ftfw mode <-> ftfw mode
keepalived 1.1.15 <-> heartbeat 2.1.3
no virtualization <-> KVM with net virtio
Indeed, very similar.
Quoted 2 lines
On your opinion, could it be the side effect of KVM ? Unfortunately, I cannot do without KVM, and cannot test easily without...
I'm not familiar with KVM, but before pointing to it as the problem (since I think that it is transparent to conntrackd). Could you try latest conntrack-tools 0.9.10? I released them yesterday along with accumulated updates/fixes. Thanks!
Signature · 1 line
"Los honestos son inadaptados sociales" -- Les Luthiers
Quoted 2 lines
Could you try latest conntrack-tools 0.9.10? I released them yesterday > along with accumulated updates/fixes. Thanks!
I experience right now some difficulties to compile version 0.9.10 on lenny. I keep you in touch with test results.
Regards,
Quoted 23 lines · Pablo Neira Ayuso
Hi again Yoann,
Quoted 9 lines · Yoann Juet
Hi pablo !
Quoted 4 lines
that were fixed in the subsequent kernel releases, but I did not know any that affected the internal TCP flags set/unset. As these stuff is under development, I suggest you to use the latest Linux kernel, please let me know if the problem persists.
I still have the same symptoms with a 2.6.28-2 kernel. My testbed is not so far away from yours:
Quoted 8 lines
You Me
----------------------------------
Etch <-> Lenny
2.6.28 <-> 2.6.28-2
conntrack 0.9.9? <-> conntrack 0.9.9
ftfw mode <-> ftfw mode
keepalived 1.1.15 <-> heartbeat 2.1.3
no virtualization <-> KVM with net virtioIndeed, very similar.
Quoted 8 lines
Quoted 2 lines
On your opinion, could it be the side effect of KVM ? Unfortunately, I cannot do without KVM, and cannot test easily without...
I'm not familiar with KVM, but before pointing to it as the problem (since I think that it is transparent to conntrackd). Could you try latest conntrack-tools 0.9.10? I released them yesterday along with accumulated updates/fixes. Thanks!
begin:vcard
fn:Yoann Juet
n:Juet;Yoann
org;quoted-printable:;DSI Universit=C3=A9 de Nantes adr;quoted-printable:BP92208;;2, rue de la Houssini=C3=A8re;Nantes;;44322;France email;internet:[email protected] title;quoted-printable:Ing=C3=A9nieur s=C3=A9curit=C3=A9 & r=C3=A9seau tel;work:02.51.12.53.93
tel;fax:02.51.12.58.60
x-mozilla-html:FALSE
version:2.1
end:vcard
Hi Yoann,
Quoted 6 lines · Yoann Juet
Quoted 3 lines
Could you try latest conntrack-tools 0.9.10? I released them yesterday along with accumulated updates/fixes. Thanks!
I experience right now some difficulties to compile version 0.9.10 on lenny. I keep you in touch with test results.
Any update? I'm interested in your setup.
Signature · 1 line
"Los honestos son inadaptados sociales" -- Les Luthiers
Hi pablo,
I still have an error as follows with conntrack 0.9.10:
#make
...
netfilter_conntrack.so -lnfnetlink
mcast.o: In function `mcast_dump_stats_extended':/root/conntrack-tools-0.9.10/src/mcast.c:529: undefined reference to nlif_get_ifflags' sync-mode.o: In function mcast_iface_handler':/root/conntrack-tools-0.9.10/src/sync-mode.c:203: undefined reference to nlif_get_ifflags' sync-mode.o: In function mcast_iface_candidate':/root/conntrack-tools-0.9.10/src/sync-mode.c:185: undefined reference to `nlif_get_ifflags'
collect2: ld returned 1 exit status
make[1]: *** [conntrackd] Erreur 1
make[1]: quittant le répertoire « /root/conntrack-tools-0.9.10/src »
make: *** [all-recursive] Erreur 1
Do you have an idea ? The compilation of conntrack 0.9.9 works on the same machine.
Regards,
Quoted 10 lines · Pablo Neira Ayuso
Hi Yoann,
Quoted 4 lines · Yoann Juet
Quoted 2 lines
Could you try latest conntrack-tools 0.9.10? I released them yesterday along with accumulated updates/fixes. Thanks!
I experience right now some difficulties to compile version 0.9.10 on lenny. I keep you in touch with test results.
Any update? I'm interested in your setup.
begin:vcard
fn:Yoann Juet
n:Juet;Yoann
org;quoted-printable:;DSI Universit=C3=A9 de Nantes adr;quoted-printable:BP92208;;2, rue de la Houssini=C3=A8re;Nantes;;44322;France email;internet:[email protected] title;quoted-printable:Ing=C3=A9nieur s=C3=A9curit=C3=A9 & r=C3=A9seau tel;work:02.51.12.53.93
tel;fax:02.51.12.58.60
x-mozilla-html:FALSE
version:2.1
end:vcard
Quoted 21 lines · Yoann Juet
Hi pablo,
I still have an error as follows with conntrack 0.9.10:
#make
...
netfilter_conntrack.so -lnfnetlink
mcast.o: In function `mcast_dump_stats_extended':/root/conntrack-tools-0.9.10/src/mcast.c:529: undefined reference to `nlif_get_ifflags'
sync-mode.o: In function `mcast_iface_handler':/root/conntrack-tools-0.9.10/src/sync-mode.c:203: undefined reference to `nlif_get_ifflags'
sync-mode.o: In function `mcast_iface_candidate':/root/conntrack-tools-0.9.10/src/sync-mode.c:185: undefined reference to `nlif_get_ifflags'
collect2: ld returned 1 exit status
make[1]: *** [conntrackd] Erreur 1
make[1]: quittant le répertoire «/root/conntrack-tools-0.9.10/src»
make: *** [all-recursive] Erreur 1
Quoted 15 lines
Do you have an idea ? The compilation of conntrack 0.9.9 works on the same machine.
Regards,
Quoted 9 lines · Pablo Neira Ayuso
Hi Yoann,
Quoted 4 lines · Yoann Juet
Quoted 2 lines
Could you try latest conntrack-tools 0.9.10? I released them yesterday along with accumulated updates/fixes. Thanks!
I experience right now some difficulties to compile version 0.9.10 on lenny. I keep you in touch with test results.
Any update? I'm interested in your setup.
Damn. I forgot to update library dependencies. conntrack-tools-0.9.10 requires libnfnetlink-0.0.40. I'm going to fix this now in the git tree.
Signature · 1 line
"Los honestos son inadaptados sociales" -- Les Luthiers
Quoted 31 lines · Pablo Neira Ayuso
Quoted 30 lines · Yoann Juet
Hi pablo,
I still have an error as follows with conntrack 0.9.10:
#make
...
netfilter_conntrack.so -lnfnetlink
mcast.o: In function `mcast_dump_stats_extended':/root/conntrack-tools-0.9.10/src/mcast.c:529: undefined reference to `nlif_get_ifflags'
sync-mode.o: In function `mcast_iface_handler':/root/conntrack-tools-0.9.10/src/sync-mode.c:203: undefined reference to `nlif_get_ifflags'
sync-mode.o: In function `mcast_iface_candidate':/root/conntrack-tools-0.9.10/src/sync-mode.c:185: undefined reference to `nlif_get_ifflags'
collect2: ld returned 1 exit status
make[1]: *** [conntrackd] Erreur 1
make[1]: quittant le répertoire «/root/conntrack-tools-0.9.10/src»
make: *** [all-recursive] Erreur 1Do you have an idea ? The compilation of conntrack 0.9.9 works on the same machine.
Regards,
Quoted 3 lines · Pablo Neira Ayuso
Hi Yoann,
Yoann Juet wrote:
Quoted 9 lines
Quoted 5 lines
Quoted 5 lines
Quoted 4 lines
Quoted 2 lines
Could you try latest conntrack-tools 0.9.10? I released them yesterday along with accumulated updates/fixes. Thanks!
I experience right now some difficulties to compile version 0.9.10 on lenny. I keep you in touch with test results.
Any update? I'm interested in your setup.
Damn. I forgot to update library dependencies. conntrack-tools-0.9.10 requires libnfnetlink-0.0.40. I'm going to fix this now in the git tree.
I'm still facing the same difficulties with conntrack-tools 0.9.10 and kernel 2.6.28.
Log on FW1 after the second failover:
Feb 6 09:55:46 FW-DSI-1-IRT kernel: [ 1352.601798] RULE -1 -- DENY IN=eth0 OUT=eth1 SRC=193.52.101.32 DST=172.18.244.10 LEN=255 TOS=0x00 PREC=0x00 TTL=62 ID=8698 DF PROTO=TCP SPT=5222 DPT=34189 WINDOW=501 RES=0x00 ACK PSH URGP=0
As you can see, this TCP connection is present:
root@fw1-irt:~# conntrack -L |grep 34189 conntrack v0.9.10 (conntrack-tools): 14 flow entries has been shown. tcp 6 10581 ESTABLISHED src=172.18.244.10 dst=193.52.101.32 sport=34189 dport=5222 packets=63 bytes=12039 src=193.52.101.32 dst=172.18.244.10 sport=5222 dport=34189 packets=58 bytes=22146 [ASSURED] mark=0 secmark=0 use=1
begin:vcard
fn:Yoann Juet
n:Juet;Yoann
org;quoted-printable:;DSI Universit=C3=A9 de Nantes adr;quoted-printable:BP92208;;2, rue de la Houssini=C3=A8re;Nantes;;44322;France email;internet:[email protected] title;quoted-printable:Ing=C3=A9nieur s=C3=A9curit=C3=A9 & r=C3=A9seau tel;work:02.51.12.53.93
tel;fax:02.51.12.58.60
x-mozilla-html:FALSE
version:2.1
end:vcard
Hi again Yoann,
Quoted 10 lines · Yoann Juet
I'm still facing the same difficulties with conntrack-tools 0.9.10 and kernel 2.6.28.
Log on FW1 after the second failover:
Feb 6 09:55:46 FW-DSI-1-IRT kernel: [ 1352.601798] RULE -1 -- DENYIN=eth0 OUT=eth1 SRC=193.52.101.32 DST=172.18.244.10 LEN=255 TOS=0x00 PREC=0x00 TTL=62 ID=8698 DF PROTO=TCP SPT=5222 DPT=34189 WINDOW=501 RES=0x00 ACK PSH URGP=0
Quoted 8 lines
As you can see, this TCP connection is present:
root@fw1-irt:~# conntrack -L |grep 34189 conntrack v0.9.10 (conntrack-tools): 14 flow entries has been shown. tcp 6 10581 ESTABLISHED src=172.18.244.10 dst=193.52.101.32 sport=34189 dport=5222 packets=63 bytes=12039 src=193.52.101.32 dst=172.18.244.10 sport=5222 dport=34189 packets=58 bytes=22146 [ASSURED] mark=0 secmark=0 use=1
This is weird, look like some problem in your scripts or the commit is not working in node fw1-irt. The packet counters of the entry above show that this is the old entry which is stuck in the cache after the second failover. This should be deleted when fw1-irt's script issues the commit (conntrackd -c). Does the log file tells that the commit was successful?
The following attached patch adds more verbose output to tell you that some old entries has been deleted. Just in case that you need more information for troubleshooting.
Signature · 1 line
"Los honestos son inadaptados sociales" -- Les Luthiers
include/cache.h +1 -0
@@ -82,6 +82,7 @@ struct cache {uint32_t upd_fail_enoent;uint32_t commit_ok; +uint32_t commit_delete;uint32_t commit_fail;uint32_t flush;
src/cache_iterators.c +7 -0
@@ -134,6 +134,7 @@ retry:if (errno ==EEXIST && retry ==1 ) { ret =nl_destroy_conntrack (tmp->h, ct);if (ret ==0 || (ret ==-1 && errno ==ENOENT )) { + tmp->c->stats.commit_delete++;if (retry) { retry =0 ; goto retry;
@@ -179,6 +180,7 @@ void cache_commit(struct cache *c) {unsigned int commit_ok = c->stats.commit_ok;unsigned int commit_fail = c->stats.commit_fail; +unsigned int commit_delete = c->stats.commit_delete;struct __commit_container tmp;struct timeval commit_start, commit_stop, res;
@@ -199,6 +201,11 @@ void cache_commit(struct cache *c)/* calculate new entries committed */ commit_ok = c->stats.commit_ok - commit_ok; commit_fail = c->stats.commit_fail - commit_fail; + commit_delete = c->stats.commit_delete - commit_delete; + +if (commit_delete) +dlog (LOG_NOTICE ,"%u old entries deleted before " +"commit" , c->stats.commit_delete);/* log results */ dlog (LOG_NOTICE ,"Committed %u new entries" , commit_ok);
Hi pablo,
Quoted 22 lines · Pablo Neira Ayuso
Hi again Yoann,
Quoted 10 lines · Yoann Juet
I'm still facing the same difficulties with conntrack-tools 0.9.10 and kernel 2.6.28.
Log on FW1 after the second failover:
Feb 6 09:55:46 FW-DSI-1-IRT kernel: [ 1352.601798] RULE -1 -- DENYIN=eth0 OUT=eth1 SRC=193.52.101.32 DST=172.18.244.10 LEN=255 TOS=0x00 PREC=0x00 TTL=62 ID=8698 DF PROTO=TCP SPT=5222 DPT=34189 WINDOW=501 RES=0x00 ACK PSH URGP=0
Quoted 8 lines
As you can see, this TCP connection is present:
root@fw1-irt:~# conntrack -L |grep 34189 conntrack v0.9.10 (conntrack-tools): 14 flow entries has been shown. tcp 6 10581 ESTABLISHED src=172.18.244.10 dst=193.52.101.32 sport=34189 dport=5222 packets=63 bytes=12039 src=193.52.101.32 dst=172.18.244.10 sport=5222 dport=34189 packets=58 bytes=22146 [ASSURED] mark=0 secmark=0 use=1
Quoted 6 lines
This is weird, look like some problem in your scripts or the commit is not working in node fw1-irt. The packet counters of the entry above show that this is the old entry which is stuck in the cache after the second failover. This should be deleted when fw1-irt's script issues the commit (conntrackd -c). Does the log file tells that the commit was successful?
I confirm that "conntrackd -c" is executed on FW1-IRT on the second failover. FYI, my LSB script executes the following instructions (start= new active node ; stop = new passive node):
...
case "$1" in
start)
conntrackd -c -C /etc/conntrackd.conf conntrackd -f -C /etc/conntrackd.conf conntrackd -R -C /etc/conntrackd.conf exit 0
;;
stop)
#conntrackd -t -C /etc/conntrackd.conf conntrackd -n -C /etc/conntrackd.conf exit 0
;;
*)
exit 0
;;
esac
Quoted 5 lines
The following attached patch adds more verbose output to tell you that some old entries has been deleted. Just in case that you need more information for troubleshooting.
Thanks, maybe with this patch I'll see what's wrong with my setup.
begin:vcard
fn:Yoann Juet
n:Juet;Yoann
org;quoted-printable:;DSI Universit=C3=A9 de Nantes adr;quoted-printable:BP92208;;2, rue de la Houssini=C3=A8re;Nantes;;44322;France email;internet:[email protected] title;quoted-printable:Ing=C3=A9nieur s=C3=A9curit=C3=A9 & r=C3=A9seau tel;work:02.51.12.53.93
tel;fax:02.51.12.58.60
x-mozilla-html:FALSE
version:2.1
end:vcard
Quoted 30 lines · Yoann Juet
Quoted 9 lines · Pablo Neira Ayuso
Quoted 8 lines
As you can see, this TCP connection is present:
root@fw1-irt:~# conntrack -L |grep 34189 conntrack v0.9.10 (conntrack-tools): 14 flow entries has been shown. tcp 6 10581 ESTABLISHED src=172.18.244.10 dst=193.52.101.32 sport=34189 dport=5222 packets=63 bytes=12039 src=193.52.101.32 dst=172.18.244.10 sport=5222 dport=34189 packets=58 bytes=22146 [ASSURED] mark=0 secmark=0 use=1Quoted 6 lines
This is weird, look like some problem in your scripts or the commit is not working in node fw1-irt. The packet counters of the entry above show that this is the old entry which is stuck in the cache after the second failover. This should be deleted when fw1-irt's script issues the commit (conntrackd -c). Does the log file tells that the commit was successful?
I confirm that "conntrackd -c" is executed on FW1-IRT on the second failover. FYI, my LSB script executes the following instructions (start= new active node ; stop = new passive node):
...
case "$1" in
start)
conntrackd -c -C/etc/conntrackd.confconntrackd -f -C/etc/conntrackd.confconntrackd -R -C/etc/conntrackd.confexit 0
;;
Quoted 5 lines
stop)
#conntrackd -t -C/etc/conntrackd.confconntrackd -n -C/etc/conntrackd.confexit 0
;;
Before the second failover, does conntrackd -e in FW1-IRT (now in backup mode) show, at least, one entry that talks about the TCP connection that is in trouble? I think that it will not show any (but it should show one, so I think that I have found the problem ;). Please, confirm this and I'll get back to you with a possible solution soon.
BTW, why your script does not invoke the '-t', did you notice any problem? That schedules the cleanup of the kernel conntrack table after PurgeTimeout seconds when a node enters backup mode.
Thanks for your patience.
Signature · 1 line
"Los honestos son inadaptados sociales" -- Les Luthiers
Pablo,
Quoted 35 lines · Pablo Neira Ayuso
Quoted 28 lines · Yoann Juet
Quoted 8 lines · Pablo Neira Ayuso
Quoted 8 lines
As you can see, this TCP connection is present:
root@fw1-irt:~# conntrack -L |grep 34189 conntrack v0.9.10 (conntrack-tools): 14 flow entries has been shown. tcp 6 10581 ESTABLISHED src=172.18.244.10 dst=193.52.101.32 sport=34189 dport=5222 packets=63 bytes=12039 src=193.52.101.32 dst=172.18.244.10 sport=5222 dport=34189 packets=58 bytes=22146 [ASSURED] mark=0 secmark=0 use=1Quoted 6 lines
This is weird, look like some problem in your scripts or the commit is not working in node fw1-irt. The packet counters of the entry above show that this is the old entry which is stuck in the cache after the second failover. This should be deleted when fw1-irt's script issues the commit (conntrackd -c). Does the log file tells that the commit was successful?
I confirm that "conntrackd -c" is executed on FW1-IRT on the second failover. FYI, my LSB script executes the following instructions (start= new active node ; stop = new passive node):
...
case "$1" in
start)
conntrackd -c -C/etc/conntrackd.confconntrackd -f -C/etc/conntrackd.confconntrackd -R -C/etc/conntrackd.confexit 0
;;Quoted 5 lines
stop)
#conntrackd -t -C/etc/conntrackd.confconntrackd -n -C/etc/conntrackd.confexit 0
;;
Quoted 5 lines
Before the second failover, does conntrackd -e in FW1-IRT (now in backup mode) show, at least, one entry that talks about the TCP connection that is in trouble? I think that it will not show any (but it should show one, so I think that I have found the problem ;). Please, confirm this and I'll get back to you with a possible solution soon.
You're right, the external cache on FW1 is empty before the second failover.
Quoted 5 lines
BTW, why your script does not invoke the '-t', did you notice any problem? That schedules the cleanup of the kernel conntrack table after PurgeTimeout seconds when a node enters backup mode.
I was just testing with and without this instruction that was not available on conntrackd 0.9.6.
Quoted 2 lines
Thanks for your patience.
Thanks for your assistance !
begin:vcard
fn:Yoann Juet
n:Juet;Yoann
org;quoted-printable:;DSI Universit=C3=A9 de Nantes adr;quoted-printable:BP92208;;2, rue de la Houssini=C3=A8re;Nantes;;44322;France email;internet:[email protected] title;quoted-printable:Ing=C3=A9nieur s=C3=A9curit=C3=A9 & r=C3=A9seau tel;work:02.51.12.53.93
tel;fax:02.51.12.58.60
x-mozilla-html:FALSE
version:2.1
end:vcard
Quoted 24 lines · Yoann Juet
Quoted 23 lines · Pablo Neira Ayuso
Quoted 22 lines · Yoann Juet
Quoted 8 lines · Pablo Neira Ayuso
Quoted 8 lines
As you can see, this TCP connection is present:
root@fw1-irt:~# conntrack -L |grep 34189 conntrack v0.9.10 (conntrack-tools): 14 flow entries has been shown. tcp 6 10581 ESTABLISHED src=172.18.244.10 dst=193.52.101.32 sport=34189 dport=5222 packets=63 bytes=12039 src=193.52.101.32 dst=172.18.244.10 sport=5222 dport=34189 packets=58 bytes=22146 [ASSURED] mark=0 secmark=0 use=1Quoted 9 lines
This is weird, look like some problem in your scripts or the commit is not working in node fw1-irt. The packet counters of the entry above show
that this is the old entry which is stuck in the cache after the second failover. This should be deleted when fw1-irt's script issues the commit
(conntrackd -c). Does the log file tells that the commit was successful?I confirm that "conntrackd -c" is executed on FW1-IRT on the second failover. FYI, my LSB script executes the following instructions (start= new active node ; stop = new passive node):
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
...
case "$1" in
start)
conntrackd -c -C/etc/conntrackd.confconntrackd -f -C/etc/conntrackd.confconntrackd -R -C/etc/conntrackd.conf
Please, add the following line here to your scripts:
conntrackd -B -C /etc/conntrackd.conf
Let me now if that fixes your problem.
Signature · 1 line
"Los honestos son inadaptados sociales" -- Les Luthiers
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 13 lines · Pablo Neira Ayuso
Quoted 5 lines · Pablo Neira Ayuso
Please, add the following line here to your scripts:
conntrackd -B -C
/etc/conntrackd.confLet me now if that fixes your problem.
Updates? I'm intrigued with your problem. Some more info for troubleshooting. You have the commands:
display internal cache (states that belong to this node)
# conntrackd -i
Quoted 9 lines
display external cache (states that belong to other nodes)
# conntrackd -eWhile trigering fail-overs, you should see the same states in the active's internal cache and the backup's external cache. If that does happen, there's a problem somewhere.
I'm about to release 0.9.11 but before I'd like to close pending issues.
The issue is solved by adding "conntrackd -B" to my script. According to the logs, such instruction sends bulk update. What is it for exactly ?
Best regards,
begin:vcard
fn:Yoann Juet
n:Juet;Yoann
org;quoted-printable:;DSI Universit=C3=A9 de Nantes adr;quoted-printable:BP92208;;2, rue de la Houssini=C3=A8re;Nantes;;44322;France email;internet:[email protected] title;quoted-printable:Ing=C3=A9nieur s=C3=A9curit=C3=A9 & r=C3=A9seau tel;work:02.51.12.53.93
tel;fax:02.51.12.58.60
x-mozilla-html:FALSE
version:2.1
end:vcard
Quoted 17 lines · Yoann Juet
Quoted 16 lines · Pablo Neira Ayuso
Quoted 5 lines · Pablo Neira Ayuso
Please, add the following line here to your scripts:
conntrackd -B -C
/etc/conntrackd.confLet me now if that fixes your problem.
Updates? I'm intrigued with your problem. Some more info for troubleshooting. You have the commands:
display internal cache (states that belong to this node)
# conntrackd -idisplay external cache (states that belong to other nodes)
# conntrackd -e
Quoted 7 lines
Quoted 5 lines
While trigering fail-overs, you should see the same states in the active's internal cache and the backup's external cache. If that does happen, there's a problem somewhere.
I'm about to release 0.9.11 but before I'd like to close pending issues.
The issue is solved by adding "conntrackd -B" to my script. According to the logs, such instruction sends bulk update. What is it for exactly ?
It forces the new primary to send a bulk update with the current state (that has been injected into the kernel) to the backup. You were using heartbeat? It seems that heartbeat triggers the backup state transition (thus, the request to resync to the new primary) before the new primary is itself in sync.
BTW, this change in the primary-backup.sh script has been already included in the conntrack-tools 0.9.11 (that I release a couple of days ago).
Signature · 1 line
"Los honestos son inadaptados sociales" -- Les Luthiers
Quoted 22 lines · Pablo Neira Ayuso
Quoted 21 lines · Yoann Juet
Quoted 20 lines · Pablo Neira Ayuso
Quoted 5 lines · Pablo Neira Ayuso
Please, add the following line here to your scripts:
conntrackd -B -C
/etc/conntrackd.confLet me now if that fixes your problem.
Updates? I'm intrigued with your problem. Some more info for troubleshooting. You have the commands:
display internal cache (states that belong to this node)
# conntrackd -idisplay external cache (states that belong to other nodes)
# conntrackd -eWhile trigering fail-overs, you should see the same states in the active's internal cache and the backup's external cache. If that does happen, there's a problem somewhere.
Quoted 8 lines
Quoted 3 lines
Quoted 1 line
I'm about to release 0.9.11 but before I'd like to close pending issues.
The issue is solved by adding "conntrackd -B" to my script. According to the logs, such instruction sends bulk update. What is it for exactly ?
It forces the new primary to send a bulk update with the current state (that has been injected into the kernel) to the backup. You were using heartbeat? It seems that heartbeat triggers the backup state transition (thus, the request to resync to the new primary) before the new primary is itself in sync.
BTW, this change in the
primary-backup.shscript has been already included in the conntrack-tools 0.9.11 (that I release a couple of days ago).
In fact, I'm using Heartbeat2 and that's one major difference between our two test beds.
Again, many thanks for your assistance and your great work Pablo !
Best regards,
begin:vcard
fn:Yoann Juet
n:Juet;Yoann
org;quoted-printable:;DSI Universit=C3=A9 de Nantes adr;quoted-printable:BP92208;;2, rue de la Houssini=C3=A8re;Nantes;;44322;France email;internet:[email protected] title;quoted-printable:Ing=C3=A9nieur s=C3=A9curit=C3=A9 & r=C3=A9seau tel;work:02.51.12.53.93
tel;fax:02.51.12.58.60
x-mozilla-html:FALSE
version:2.1
end:vcard