08-13-2013 03:39 AM
I am using tracking and EEM for doing something like link-state tracking on an ISR G2.
But, I got an error only the first time run of the EEM script after rebooting the router.
From the second time EEM script works fine and set the interface shutdown properly.
Error Log:
------------------------------------------
*Aug 13 04:58:58.083: %HA_EM-6-LOG: track101.tcl: TTY write error
*Aug 13 04:58:58.083: %HA_EM-6-LOG: track101.tcl: while executing
*Aug 13 04:58:58.083: %HA_EM-6-LOG: track101.tcl: "::cisco::eem::tty_write $fd $cmd"
*Aug 13 04:58:58.083: %HA_EM-6-LOG: track101.tcl: (procedure "cli_write" line 8)
*Aug 13 04:58:58.083: %HA_EM-6-LOG: track101.tcl: invoked from within
*Aug 13 04:58:58.083: %HA_EM-6-LOG: track101.tcl: "cli_write $fd "$cmd""
*Aug 13 04:58:58.083: %HA_EM-6-LOG: track101.tcl: (procedure "cli_exec" line 2)
*Aug 13 04:58:58.083: %HA_EM-6-LOG: track101.tcl: invoked from within
*Aug 13 04:58:58.083: %HA_EM-6-LOG: track101.tcl: "cli_exec $cli1(fd) "enable""
*Aug 13 04:58:58.083: %HA_EM-6-LOG: track101.tcl: invoked from within
*Aug 13 04:58:58.083: %HA_EM-6-LOG: track101.tcl: "$slave eval $Contents"
*Aug 13 04:58:58.083: %HA_EM-6-LOG: track101.tcl: (procedure "eval_script" line 7)
*Aug 13 04:58:58.083: %HA_EM-6-LOG: track101.tcl: invoked from within
*Aug 13 04:58:58.083: %HA_EM-6-LOG: track101.tcl: "eval_script slave $scriptname"
*Aug 13 04:58:58.083: %HA_EM-6-LOG: track101.tcl: invoked from within
*Aug 13 04:58:58.083: %HA_EM-6-LOG: track101.tcl: "if {$security_level == 1} { #untrusted script
*Aug 13 04:58:58.083: %HA_EM-6-LOG: track101.tcl: interp create -safe slave
*Aug 13 04:58:58.083: %HA_EM-6-LOG: track101.tcl: interp share {} stdin slave
*Aug 13 04:58:58.083: %HA_EM-6-LOG: track101.tcl: interp share {} stdout slave
*Aug 13 04:58:58.083: %HA_EM-6-LOG: track101.tcl: ..."
*Aug 13 04:58:58.083: %HA_EM-6-LOG: track101.tcl: (file "tmpsys:/lib/tcl/base.tcl" line 50)
*Aug 13 04:58:58.083: %HA_EM-6-LOG: track101.tcl: Tcl policy execute failed:
*Aug 13 04:58:58.083: %HA_EM-6-LOG: track101.tcl: TTY write error
------------------------------------------
Configs:
------------------------------------------
track 101 interface GigabitEthernet0/0 line-protocol
event manager directory user policy flash:
event manager policy track101.tcl
------------------------------------------
Script:
------------------------------------------
::cisco::eem::event_register_track 101 state down
namespace import ::cisco::eem::*
namespace import ::cisco::lib::*
array set arr_einfo [event_reqinfo]
if [catch {cli_open} result] {
error $result $errorInfo
} else {
array set cli1 $result
}
if [catch {cli_exec $cli1(fd) "enable"} _cli_result] {
error $_cli_result $errorInfo
}
if [catch {cli_exec $cli1(fd) "conf t"} _cli_result] {
error $_cli_result $errorInfo
}
if [catch {cli_exec $cli1(fd) "interface BRI0"} _cli_result] {
error $_cli_result $errorInfo
}
if [catch {cli_exec $cli1(fd) "shut"} _cli_result] {
error $_cli_result $errorInfo
}
# Close open cli before exit.
catch {cli_close $cli1(fd) $cli1(tty_id)} result
------------------------------------------
Solved! Go to Solution.
08-13-2013 07:38 AM
This is bug CSCuh49281. It has to do with exec-timeout being configured. The workaround is to set the exec-timeout to default. It is not limited to EEM, though. Telnet sessions are also affected.
08-13-2013 07:38 AM
This is bug CSCuh49281. It has to do with exec-timeout being configured. The workaround is to set the exec-timeout to default. It is not limited to EEM, though. Telnet sessions are also affected.
08-13-2013 07:23 PM
Thank you for reply.
I couldn't view the bug details as CSCuh49281 is not yet publicly available.
Could you please tell what are the fixed releases?
08-13-2013 08:48 PM
There is no fixed release yet. It will be available in the next 15.4T and the next 15.2(4)M release.
08-13-2013 09:08 PM
Thank you for quick response.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide