- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-12-2013 12:41 PM
Hello I have some problem with cisco switch if i use SMTP event over TCL.
My TCl scrip contain code:
if [catch {smtp_send_email $mail_msg} result] {
error $result $errorInfo
#code for dump to file
} else {#code if all ok}
If internet is work script work fine. but if internet is down switch try send message long time and script "Process Forced Exit"
I have error
Jul 12 23:35:10: %HA_EM-6-LOG: event.tcl: Process Forced Exit- MAXRUN timer expired.
Jul 12 23:35:10: %HA_EM-6-LOG: event.tcl: while executing
Jul 12 23:35:10: %HA_EM-6-LOG: event.tcl: "error $result $errorInfo"
Jul 12 23:35:10: %HA_EM-6-LOG: event.tcl: invoked from within
Jul 12 23:35:10: %HA_EM-6-LOG: event.tcl: "$slave eval $Contents"
Jul 12 23:35:10: %HA_EM-6-LOG: event.tcl: (procedure "eval_script" line 7)
Jul 12 23:35:10: %HA_EM-6-LOG: event.tcl: invoked from within
Jul 12 23:35:10: %HA_EM-6-LOG: event.tcl: "eval_script slave $scriptname"
Jul 12 23:35:10: %HA_EM-6-LOG: event.tcl: invoked from within
Jul 12 23:35:10: %HA_EM-6-LOG: event.tcl: "if {$security_level == 1} { #untrusted script
Jul 12 23:35:10: %HA_EM-6-LOG: event.tcl: interp create -safe slave
Jul 12 23:35:10: %HA_EM-6-LOG: event.tcl: interp share {} stdin slave
Jul 12 23:35:10: %HA_EM-6-LOG: event.tcl: interp share {} stdout slave
Jul 12 23:35:10: %HA_EM-6-LOG: event.tcl: ..."
Jul 12 23:35:10: %HA_EM-6-LOG: event.tcl: (file "tmpsys:/lib/tcl/base.tcl" line 50)
Jul 12 23:35:10: %HA_EM-6-LOG: event.tcl: Tcl policy execute failed:
Jul 12 23:35:10: %HA_EM-6-LOG: event.tcl: Process Forced Exit- MAXRUN timer expired.
I try change Maxrun timer but it not help (i have same error but it not print before time not end).
I try ios for switch 150-2.SE4 | 122-55.SE8 | 122-44.6
I try this code on cisco router, it work fine(if smtp server not avalable script print error 1-2sec).
Thank you.
Solved! Go to Solution.
- Labels:
-
EEM Scripting
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-13-2013 09:45 AM
No, that is not possible since the client socket connection is attempted synchronously.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-12-2013 02:48 PM
If the mailer server is not listening on tcp/25 or otherwise refuses the connection, then the socket attempt should die quickly. If the mail server is truly unreachable, then the socket will never timeout until the EEM policy terminates. This holds true on the latest version of EEM on routers as well.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-13-2013 02:09 AM
Thank you Joseph.
Possible skip in script line
if [catch {smtp_send_email $mail_msg} result] {}
if it run more 10sec?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-13-2013 04:17 AM
I have lab test on router, I have same problem (like on switch) if SMTP server not available.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-13-2013 09:45 AM
No, that is not possible since the client socket connection is attempted synchronously.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-14-2013 11:35 AM
Thank you Joseph.
