Forum Discussion
Leo_D_53884
Nimbostratus
Jan 18, 2013External TCP port monitor 5150
Hi all,
We have a crapy app that crashes internally even though the monitored service (TCP Half Open on port 29029) stays up. The app developer wrote a small program that will return a "1...
nitass
Employee
Jan 21, 2013e.g.
1. find response in hex when server returns 0 and 1. for example, 300a is 0 and 310a is 1 (0x30 is 0, 0x31 is 1, 0x0a is new line).
returning 0
[root@ve10:Active] config telnet 200.200.200.101 5150
Trying 200.200.200.101...
Connected to 200.200.200.101 (200.200.200.101).
Escape character is '^]'.
0
Connection closed by foreign host.
[root@ve10:Active] config tcpdump -nni 0.0 -s0 port 5150 -X
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on 0.0, link-type EN10MB (Ethernet), capture size 65535 bytes
...snippe...
00:24:49.071099 IP 200.200.200.101.5150 > 200.200.200.10.60808: P 1:3(2) ack 1 win 46 in slot1/tmm0 lis=
0x0000: 0ffd 0800 4500 0036 9130 4000 4006 8790 ....E..6.0@.@...
0x0010: c8c8 c865 c8c8 c80a 141e ed88 6a64 c8c1 ...e........jd..
0x0020: 305e 94d7 8018 002e 25ef 0000 0101 080a 0^......%.......
0x0030: 23fc 59f1 5ded 28ad 300a 0114 0001 0000 .Y.].(.0.......
0x0040: 0000 0000 0000 0000 0000 0000 0000 0000 ................
...snippe...
returning 1
[root@ve10:Active] config telnet 200.200.200.101 5150
Trying 200.200.200.101...
Connected to 200.200.200.101 (200.200.200.101).
Escape character is '^]'.
1
Connection closed by foreign host.
[root@ve10:Active] config tcpdump -nni 0.0 -s0 port 5150 -X
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on 0.0, link-type EN10MB (Ethernet), capture size 65535 bytes
...snipped...
00:26:19.146301 IP 200.200.200.101.5150 > 200.200.200.10.60825: P 1:3(2) ack 1 win 46 in slot1/tmm0 lis=
0x0000: 0ffd 0800 4500 0036 4240 4000 4006 d680 ....E..6B@@.@...
0x0010: c8c8 c865 c8c8 c80a 141e ed99 f54f fb90 ...e.........O..
0x0020: 647e 06bf 8018 002e 015f 0000 0101 080a d~......._......
0x0030: 23fd b9d0 5dee 8888 310a 0114 0001 0000 ...]...1.......
0x0040: 0000 0000 0000 0000 0000 0000 0000 0000 ................
...snipped...
2. configure tcp health monitor
[root@ve10:Active] config b monitor mytcp list
monitor mytcp {
defaults from tcp
recv "\x31\x0a"
}
3. assign monitor to pool
[root@ve10:Active] config b pool foo list
pool foo {
monitor all mytcp
members 200.200.200.101:5150 {}
}
4. test
when returning 1
[root@ve10:Active] config b pool foo|grep -i pool\ member
+-> POOL MEMBER foo/200.200.200.101:5150 active,up
when returning 0
[root@ve10:Active] config b pool foo|grep -i pool\ member
+-> POOL MEMBER foo/200.200.200.101:5150 inactive,down
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects
