cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2211
Views
10
Helpful
4
Replies

TTY write error on IOS 15.2(4)M3

samira1371
Level 1
Level 1

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

------------------------------------------

1 Accepted Solution

Accepted Solutions

Joe Clarke
Cisco Employee
Cisco Employee

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.

View solution in original post

4 Replies 4

Joe Clarke
Cisco Employee
Cisco Employee

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.

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?

There is no fixed release yet.  It will be available in the next 15.4T and the next 15.2(4)M release.

Thank you for quick response.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: