I'm attempting to set up client / server sockets in Cisco EEM 3.0 TCL with IOS version 12.4(24)T8 (this was recently upgraded to determine whether the problem was EEM ver).

I have the following two example Tcl scripts (ref: http://wiki.tcl.tk/15315 )


::cisco::eem::event_register_none maxrun 120

namespace import ::cisco::eem::*
namespace import ::cisco::lib::*

proc accept {chan addr port} {
    puts "$addr:$port says [gets $chan]"
    puts $chan goodbye
    close $chan
socket -server accept 12345
vwait forever


::cisco::eem::event_register_none maxrun 20

namespace import ::cisco::eem::*
namespace import ::cisco::lib::*

set chan [socket 12345]
puts $chan hello
flush $chan
puts " says [gets $chan]"
close $chan is assigned to a loopback.

When I show the listening ports via the "show control-plane host open-ports" command, the server port of 12345 is listening, but the client script does not produce any output. A telnet to the router (via a physical interface) to port 12345 results in a connection refused. No ACLs are enabled.

These scripts work from a Windows XP computer running ActiveTCL 8.5.

Is this a bug or security feature within EEM 3.0? Are any additional commands or settings required to enable TCP sockets within EEM 3.0?

  • Did any answer help you? If so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you can post and accept your own answer.
    – Ron Maupin
    Jan 3, 2021 at 6:02

1 Answer 1


I would start with debugging commands. I'd start with

debug event manager tcl cli

There's more information in the EEM best practices document over at https://supportforums.cisco.com/docs/DOC-12757 about debugging and troubleshooting.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.