Technical Forum
Ask questions. Discover Answers.
Showing results for 
Search instead for 
Did you mean: 
Custom Alert Banner

External Monitor Without Response


Im working to develop a health monitor i Am using a "External Monitor". This monitor try to send a string that its concatenate with the date of the operating system, the string is send correctly, however we dont get a sucessful reponse of destination server, We expect that the response from server be an other string with this we can check the health of the final server. The only diference with the client application request, are some packets that i understand are sending correctly and correspond to the TCP interaction;

The cuestion its that if i can replicate the client behavior using a netcat i.e. avoid the last FIN/ACK flag sending by source, althoug i understand that this last packet send by the F5 is expected on normal TCP negotation. According to the developers of the destination server the string is ok however they doesnt know why the app doesnt response.

A fragment of The scrip that send a request:

now1=$(date +"%m%d%H%M%S")
now2=$(date +"%H%M%S")
now3=$(date +"%m%d")

Using the nc utility to get data from the server. 

`reply2=$(echo "$chain" | /usr/bin/nc $node_ip $2 2>&1 > /dev/null)

Search the data received for the expected expression.

`if [[ $reply2 == *"0810"* ]]

Remove the pidfile before the script echoes anything to stdout and is                     killed by bigd      

`rm -f $pidfile
echo "up"

 This is a one connection send by F5 script :

`Client send a request for SYNC >IP > S 220757023:220757023(0) win 14600 
Server response SYNC/ACK       > IP > S 2820505845:2820505845(0) ack 220757024 win 64436 
Client complete Handshake      > IP > . ack 1 win 115
Client Send DATA request       >IP > P 1:194(193) ack 1 win 115 
Client send FIN/ACK            >IP > F 194:194(0) ack 1 win 115 
Server send ACK of Data request>IP > . ack 194 win 64436
Server send ACK of FIN/ACK     >IP > . ack 195 win 64436 
Server send FIN/ACK            >IP > F 1:1(0) ack 195 
Client Send ACK                >IP > . ack 2 win 115 

 Normal conversation between a client and server:

`Client send a request  > IP > P 198:396(198) ack 136 win 4785 
Server response        > IP > P 136:271(135) ack 396 win 64240
ACK from the client     >IP > . ack 271 win 4920 

IP > P 396:594(198) ack 271 win 4920 out 
IP > P 271:406(135) ack 594 win 64240 in 
IP > . ack 406 win 5055 out 

IP > P 594:792(198) ack 406 win 5055 out slot1/tmm0 lis=/Autorization/vs_FEPAS_TicketCar
IP > P 406:541(135) ack 792 win 64240 in slot1/tmm0 lis=/Autorization/vs_FEPAS_TicketCar
IP > . ack 541 win 5190 out slot1/tmm0 lis=/Autorization/vs_FEPAS_TicketCar

F5 Employee
F5 Employee

Maybe simplify the script:

chain="019408002238200100C10000990000`date +"%m%d%H%M%S"`001190`date +"%H%M%S"``date +"%m%d"`"
echo "$chain" | /usr/bin/nc $node_ip $2 |grep "0810"
echo "Result is $?"

Run this yourself and check the output. Once you're happy that it works as expected then add the last part of the script to output to /dev/null and check the response with $?


The issue was related with the way that the nc "netcat" handle the communication, we perform the TCP comunication through perl command, with this we avoid the FIN/ACK packet send by F5 before the server response,


!/usr/bin/perl create a connecting socket

my $socket = new IO::Socket::INET ( PeerHost => $IP, PeerPort => $port, Proto => 'tcp', );