cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1976
Views
0
Helpful
5
Replies

EEM issue

Morten Myhrstuen
Cisco Employee
Cisco Employee
Hi,
 
I’m trying to create an EEM applet to accomplish the following on a Cisco uBR10K CMTS:
 
Every hour (or, if it works well, every 30 mins) I want the output of the following commands:
“show cable modem flap-list”
“show cable modem verbose”
“show cable modem summary total”
To be uploaded to an FTP server.
 
I’ve tried to do this in different ways:
 
1:
no-osl3-cmts1#show run | sec event manager
event manager directory user policy "disk0:/eempol"
event manager applet modemcrawler
event none maxrun 600
action 1.0 cli command "enable"
action 2.0 cli command "delete /force disk0:/eempol/scmflap.txt"
action 3.0 cli command "delete /force disk0:/eempol/scmverb.txt"
action 4.0 cli command "delete /force disk0:/eempol/scmsutot.txt"
action 5.0 cli command "show cable modem flap | redirect disk0:/eempol/scmflap.txt"
action 6.0 cli command "show cable modem verbose | redirect disk0:/eempol/scmverb.txt"
action 7.0 cli command "show cable modem summary total | redirect disk0:/eempol/scmsutot.txt"
action 8.0 cli command "copy disk0:/eempol/scmflap.txt ftp://user:pass@10.10.99.200/no-osl3-cmts1-scmflap.txt"
action 9.0 cli command "copy disk0:/eempol/scmverb.txt ftp://user:pass@10.10.99.200/no-osl3-cmts1-scmverb.txt"
action 9.5 cli command "copy disk0:/eempol/scmsutot.txt ftp://user:pass@10.10.99.200/no-osl3-cmts1-scmsutot.txt"
 
 
no-osl3-cmts1#dir disk0:/eempol
Directory of disk0:/eempol/
 
    6  -rw-         408   Mar 5 2015 11:31:18 +01:00  crawlerupload.tcl
    9  -rw-     1657393  Mar 10 2015 15:43:18 +01:00  scmflap.txt
    8  -rw-   103258911  Mar 10 2015 15:47:54 +01:00  scmverb.txt
    7  -rw-       27752  Mar 10 2015 15:50:04 +01:00  scmsutot.txt
 
4102356992 bytes total (3826905088 bytes free)
 
 
This was actually working on one of out of 17 uBR10K chassis running SCH3 (by executing it manually running “event manager run modemcrawler” _and_ by running it in a cron event) for a while, but inexplicably stopped working, but I have never gotten this to work on any of the remaining 16 CMTSes running SCH2 and SCH3.
 
The only error messages I see in the log (on one of the CMTSes) is:
Mar 10 15:32:25.500 CET: %HA_EM-3-FMPD_CLI_CONNECT: Unable to establish CLI session: timeout error
 
There is enough disk space on disk0 to dump the files, but I can see that the files aren’t even being created.
 
“debug event manager all” tells me the following:
no-osl3-cmts1#event manager run modemcrawler
 
Mar 10 16:03:59.179 CET: cli_history_entry_add: free_hist_list size=0, hist_list size=7
Mar 10 16:03:59.179 CET: check_eem_cli_policy_handler: command_string=event manager run modemcrawler
Mar 10 16:03:59.179 CET: check_eem_cli_policy_handler: num_matches = 0, response_code = 1
Mar 10 16:03:59.183 CET: fh_fd_none_event_match: sync = 1, get_tty = 1, tty_buf = 2
Mar 10 16:03:59.183 CET: none_conn_tm_alloc: ptp=0xA453B570
Mar 10 16:03:59.183 CET: fh_fd_none_event_match: publish_timer=0xA4542C80, ptp=0xA453B570, max_delay=30000
Mar 10 16:03:59.183 CET: none_conn_tm_add: re=0xA8B01410, ptp=0xA453B570
Mar 10 16:03:59.183 CET: fh_fd_none_event_match: re = 0xA8B01410, num_matches = 1
Mar 10 16:03:59.183 CET: fh_send_server_sig_hndlr: received a pulse from None Event Detector on node0/0 with fdid: 12
Mar 10 16:03:59.183 CET: fh_send_none_fd_msg: msg_type=62
Mar 10 16:03:59.183 CET: fh_send_none_fd_msg: sval=0
Mar 10 16:03:59.183 CET: fh_send_server_sig_hndlr: received FH_MSG_EVENT_PUBLISH_SYNC
Mar 10 16:03:59.183 CET: fms_chkpt_msg_send_to_standby: come in
Mar 10 16:03:59.183 CET: fms_chkpt_msg_send_to_standby: chkpt successfully send message to standby
Mar 10 16:03:59.183 CET: fh_schedule_callback: fh_schedule_callback: cc=81BB9D28 prev_epc=0; epc=9D2F9278
Mar 10 16:03:59.183 CET: fh_schedule_callback: EEM callback policy modemcrawler has been scheduled to run
Mar 10 16:03:59.183 CET: fh_io_msg: received FH_MSG_API_INIT; jobid=22, processid=514, client=12, job name=EEM Callback Thread
Mar 10 16:03:59.183 CET: fh_server: fh_io_msg: received msg FH_MSG_EVENT_REQINFO from client 12 pclient 1
Mar 10 16:03:59.183 CET: %HA_EM-6-LOG: modemcrawler : DEBUG(cli_lib) : : CTL : cli_open called.
 
And then nothing.
 
I have no idea how to troubleshoot this any further, I’ve tried:
1)      Setting the session cli username to an authorized user
2)      Checked that the VTYs aren’t busy (they aren’t)
3)      Running all the commands manually, which succeeds (although the “copy” commands require some confirmations when I do this manually, but it has worked without any interaction on one of the CMTSes)
4)      Running the applet manually, and running the applet in a cron job (“event timer cron name "ModemCrawlerHourly" cron-entry "50 * * * *" maxrun 600”) – this worked on the same CMTS where it worked to run the applet manually – for a while – and then it stopped working altogether on that CMTS too
 
 
Any tips on how to proceed?

Thx
-Morten-
 
5 Replies 5

Joe Clarke
Cisco Employee
Cisco Employee

This seems like it might be a config issue on the VTY lines.  Can you post the running config from one of these uBRs?

Hi Joseph,

Here is the VTY config which is similar on all CMTS's

no-osl3-cmts1#sh run | sec line vty
line vty 0 4
 access-class 20 in vrf-also
 exec-timeout 30 0
 logging synchronous
 ipv6 access-class DENY-ALL in
 history size 50
 transport preferred ssh
 transport input telnet ssh
 transport output ssh
line vty 5 15
 access-class 20 in vrf-also
 exec-timeout 30 0
 logging synchronous
 ipv6 access-class DENY-ALL in
 history size 50
 transport preferred ssh
 transport input telnet ssh
 transport output ssh
no-osl3-cmts1#

 

Can you post the whole show run?  As well, what happens when you connect to this device via telnet or SSH?  What does the output look like to get from unconnected to enabled?

There is no AAA command authentication involved. Only enable with password.

See attached file.

Hmmm, I don't see any problems here.  But perhaps there is something strange on the uBR where the VTY cannot be opened by EEM.  Can you take vty 0, and configure ONLY the following on it:

 

line vty 0

 transport input none

 

Then see if the applet can execute CLI commands.  Note: you cannot currently be logged in on VTY 0 for this to work.