cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1289
Views
0
Helpful
2
Replies

EEM stops at cli "telnet"

avorobyev
Level 1
Level 1

Periodically run script to check if channel is down, and restart LTE modem.

But script suddenly stopped workin on issuing telnet command

event manager applet LteReboot
event timer watchdog time 600 maxrun 550
action 000 comment "event timer watchdog time 600 maxrun 550"
action 010 track read 2
action 020 if $_track_state eq "down"
action 030 puts "LteReboot - channel down, waiting to recover"
action 040 wait 300
action 050 track read 2
action 060 if $_track_state eq "down"
action 070 puts "LteReboot - scheduling reboot"
action 090 puts "090"
action 100 cli command "telnet 10.0.19.1" pattern "login:"
action 110 puts "110"
action 120 cli command "admin" pattern "Password:"
action 130 puts "130"
action 140 cli command "123456" pattern "ZySH>"
action 150 puts "150"
action 160 cli command "reboot in 1" pattern "ZySH>"
action 170 puts "170"
action 180 cli command "exit" pattern "."
action 190 puts "190"
action 390 puts "LteReboot - scheduled"
action 400 else
action 410 puts "LteReboot not scheduled - line recovered itself"
action 420 end
action 500 end

here's debug:

Apr 25 10:41:35 MSK: EEM: policy_dir xml builtin: name:_event_type value:131
Apr 25 10:41:35 MSK: EEM: policy_dir xml builtin: name:_event_type_string value:none
Apr 25 10:41:35 MSK: EEM: policy_dir xml builtin: name:_event_severity value:severity-normal
Apr 25 10:41:35 MSK: EEM: policy_dir xml builtin: name:_none_argc value:0
Apr 25 10:41:35 MSK: %HA_EM-6-LOG: LteReboot : DEBUG(cli_lib) : : CTL : cli_open called.
Apr 25 10:41:35 MSK: %HA_EM-6-LOG: LteReboot : DEBUG(cli_lib) : : OUT : pd19-rtr-01>
Apr 25 10:41:35 MSK: %HA_EM-6-LOG: LteReboot : DEBUG(cli_lib) : : IN : pd19-rtr-01>telnet 10.0.19.1
pd19-rtr-01#
Apr 25 10:41:55 MSK: %HA_EM-6-LOG: LteReboot : DEBUG(cli_lib) : : CTL : cli_close called.
Apr 25 10:41:55 MSK: fh_server: fh_io_ipc_msg: received msg FH_MSG_CALLBACK_DONE from client 7 pclient 1
Apr 25 10:41:55 MSK: fh_io_ipc_msg: EEM callback policy LteReboot has ended with abnormal exit status of 0xFFFFFFFF
Apr 25 10:41:55 MSK: EEM policy LteReboot has exceeded it's elapsed time limit of 20.0 seconds
Apr 25 10:41:55 MSK: fh_reg_send_msg_to_fd server sending FH_MSG_EVENT_PUBLISH_DONE message to FD:none xos_ipc_sync_send to fdc->eph = 1048591)
Apr 25 10:41:55 MSK: fh_fd_none_publish_done: rc=1, re=0x8AE91E84
Apr 25 10:41:55 MSK: fh_fd_none_publish_done: rc=1, publish_expired=0
Apr 25 10:41:55 MSK: sid=2, ptp=0x8AED9938, connp=0x8B1B636C
Apr 25 10:41:55 MSK: none_conn_tm_remove: re=0x8AE91E84, ptp=0x8AED9938
Apr 25 10:41:55 MSK: fh_fd_none_conn_tm_free: ptp=0x8AED9938
Apr 25 10:41:55 MSK: fh_fd_match_event: re=0x8AE91E84, policyname=LteReboot, parameters=,
Apr 25 10:41:55 MSK: fh_reg_send_msg_to_fd server sent FH_MSG_EVENT_PUBLISH_DONE message to FD:none event passed to fdc->eph = 1048591 status 0
Apr 25 10:41:55 MSK: EEM: server decrements in use thread: jobid=4 rule id=2 in use thread=0.
Apr 25 10:41:55 MSK: fh_schedule_callback: fh_schedule_callback: cc=881FA4B8 prev_epc=8AE20524; epc=0

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

if testing telnet connection to lte modem from cisco manually:

pd19-rtr-01#telnet 10.0.19.1
Trying 10.0.19.1 ... Open

router login: admin
Password:
No entry for terminal type "vt102";
using dumb terminal settings.
ZySH> reboot in 10
ZySH>
The system is going DOWN in 10 minutes !!

ZySH> exit

[Connection to 10.0.19.1 closed by foreign host]

1 Accepted Solution

Accepted Solutions

Joe Clarke
Cisco Employee
Cisco Employee

My guess is that you need to add:

action 091 cli command "enable"

And you may need to make sure you have configured EEM to work with AAA command authorization.

View solution in original post

2 Replies 2

Joe Clarke
Cisco Employee
Cisco Employee

My guess is that you need to add:

action 091 cli command "enable"

And you may need to make sure you have configured EEM to work with AAA command authorization.

Thanks!

Now it works!

It seems like behavior changed on some IOS version. It worked with my previous script edition earlier.