Forum Discussion

Sergey_Izgiyaev's avatar
Sergey_Izgiyaev
Icon for Nimbostratus rankNimbostratus
Aug 10, 2014

sideband connect command crashes but no logs

Hi, I have created a simple iRule for sideband connections. Here is how the connection is being initialized:

 

if {[catch {connect -timeout 1000 -idle 30 -status conn_status 10.10.10.10:8080} conn] == 0 && $conn ne ""}{ log local0. "Connect returns: $conn and conn status: $conn_status" } else { log local0. "Connection could not be established to sideband_virtual_server" }

 

But, it doesn't look to work - the connection is not being established. Only the log that i see in /var/log/ltm is "Connection could not be established to sideband_virtual_server". I don't even see the try of establishing of TCP connection from the F5 box to the sideband server by using tcpdump. As i'm new to F5, could you please help me to understand what did I do wrong and is there a way to see the exceptions being throwing by the LTM while processing the iRule?

 

Thanks

 

  • could you please help me to understand what did I do wrong and is there a way to see the exceptions being throwing by the LTM while processing the iRule?

     

    can you check conn_status value?

     

    by the way, 10.10.10.10 is reachable (route) from tmm interface (selfip), isn't it?

     

  • Hi, The self IP is in the same broadcast domain as the sideband server and it's reachable from the LTM. When I put the comm_status , for example, in log: log local0. $comm_status, the script stops working at this row.

     

  • When I put the comm_status , for example, in log: log local0. $comm_status, the script stops working at this row.

     

    doesn't it return some value?

     

    what tcpdump command did you use?

     

  • i dont see log in LTM related to the command log local0. $comm_status, and the script doesn't continue from there. tcpdump -i eth0 host 10.10.10.10

     

    eth0 - the interface of the self IP for the mentioned network

     

  • eth0 is management interface. it is not tmm interface (selfip). to capture on tmm interface, you can use interface 0.0.

     

  • Ok, it was my bad. now it looks: tcpdump -i 1.2 host 10.10.10.10

     

    But i still don't see the try of TCP connection to the sideband server. Looks the function connect does nothing. maybe i miss something in code?

     

  • R_Eastman_13667's avatar
    R_Eastman_13667
    Historic F5 Account

    Try this:

     

    if {[catch {connect -timeout 10000 -idle 30 -status conn_status 10.10.10.10:8080} conn] || $conn eq ""} {log local0. "Connection could not be established to sideband_virtual_server" } else {log local0. "Connect returns: $conn and conn status: $conn_status"}

     

    I edited my post to increase the timeout from 1000 milliseconds to 10000 milliseconds.