Forum Discussion

Angel_Martinez_'s avatar
Angel_Martinez_
Icon for Nimbostratus rankNimbostratus
Nov 03, 2008

Command returned bad code: 12 while executing

Hi

 

 

we're "playing" with this iRule:

 

 

when SERVER_CONNECTED {

 

listen {

 

proto 17

 

timeout 60

 

bind [LINK::vlan_id] [IP::local_addr] [peer {UDP::client_port}]

 

server [peer {IP::client_addr}] [peer {UDP::client_port}]

 

allow [IP::server_addr]

 

}

 

}

 

 

to manage the tftp secure connections but sometimes we get this error message:

 

 

Nov 2 23:55:17 tmm tmm[1678]: 01220001:3: TCL error: iRule_TFTP_VoIP - command returned bad code: 12

 

while executing

 

"listen {

 

proto 17

 

timeout 60

 

bind [LINK::vlan_id] [IP::local_addr] [peer {UDP::client_port}]

 

server [peer {IP::client_addr}] [..."

 

 

 

where could I track for some information ¿?

 

 

Thank you in advanced.

 

  • spark_86682's avatar
    spark_86682
    Historic F5 Account
    The short answer is that "code: 12" means that the address you're trying to listen on is already in use (there is already something on that IP/port tuple).
  • hoolio's avatar
    hoolio
    Icon for Cirrostratus rankCirrostratus
    If you want to get more info on runtime TCL errors, you can use catch (Click here) to handle the error gracefully and log details on the problem:

     

     

    catch {log local0. "\[LINK::vlan_id\]: [LINK::vlan_id], \[IP::local_addr\]: [IP::local_addr], \[peer \{UDP::client_port\}\]: [peer {UDP::client_port}], \[peer \{IP::client_addr\}\]: [peer {IP::client_addr}], \[peer \{UDP::client_port\}\]: [peer {UDP::client_port}], \[IP::server_addr\]: [IP::server_addr]"}

     

     

    if {[catch {

     

    listen {

     

    proto 17

     

    timeout 60

     

    bind [LINK::vlan_id] [IP::local_addr] [peer {UDP::client_port}]

     

    server [peer {IP::client_addr}] [peer {UDP::client_port}]

     

    allow [IP::server_addr]

     

    }

     

    } result]}{

     

    log local0. "Error: $result"

     

    } else {

     

    log local0. "Success: $result"

     

    }

     

     

    You might need to adjust the line breaks or escape them in the second catch statement, but hopefully you get the general idea.

     

     

    Aaron
  • what is the clue ? i've the same problem ! the fact is that simultaneous client may have the same UDP port client.

     

     

    i think you have to randomize the listening port for backend server : how does it write in the irule language ?