ace 4710 3.2.4 and script

Answered Question
Nov 17th, 2009
User Badges:

Hi all,

i've got a problem with script...

from debug command i receive msg

'(ctx:1) TCLPROBE(hm_tcl_exit_proc): File open failed'

same script works on ACE module....why cannot read script ACE4710?


tnx


Dan

Correct Answer by Gilles Dufour about 7 years 8 months ago

Dan,


you are missing one argument.

Argument number 5 is the regular expression.

arg list = "GET /pls/portal30/ecare.monitoring HTTP/1.0" html 0 172.18.255.172 80



I'm using something like this :


script ace_probe1.tcl "GET / HTTP/1.0" html 1 192.168.20.41 (.*) 80



Give it a try and let me know if it works.


Gilles.

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (1 ratings)
Loading.
Gilles Dufour Tue, 11/17/2009 - 04:34
User Badges:
  • Cisco Employee,

what is the script you are using ?

Which file do you try to open ?

I see the error is in context id 1, so not the admin context. Did you try it in admin ?


Gilles.

danilodicesare Tue, 11/17/2009 - 04:52
User Badges:

Hi Gilles,


script is attached and works on ACE 6K module. I've copied same script on 4710 and doesn't works (or maybe cannot open file :) ).

Yes i'm using context with ID 1 and i cannot run it from Admin 'cause i've no vlan associated at interfaces.


AceFemaster/FE# dir disk0:


1516 Nov 17 2009 12:31:32 script_ver.tcl


Usage for disk0: filesystem

1104896 bytes total used

10059776 bytes free

11164672 bytes total


AceFemaster/FE# show running-config | include script

Generating configuration....

script file name script_ver.tcl


probe scripted script_ver_foo_80

interval 15

passdetect interval 30

passdetect count 2

script script_ver.tcl "GET /test HTTP/1.0" html 1 1.1.1.1 80 OK


as i said before in normal condition (ace module) script parse file and if see word OK rserver stays alive



tnx and have good day


Dan



Attachment: 
Gilles Dufour Tue, 11/17/2009 - 05:56
User Badges:
  • Cisco Employee,

your script works for me in the appliance.

From looking at the code, the error is in the exit function...after the script was executed.

So the problem to write to file is not really an issue.


Could you get a 'show probe detail' to see what is the return status ?

Do you have a sniffer trace showing the response from the server ?


Thanks,


Gilles.

danilodicesare Tue, 11/17/2009 - 06:17
User Badges:

Hi Gilles,


AceFemaster/FE# show probe script_ver_pippo_CS01_80 detail


probe : script_ver

type : SCRIPTED

state : ACTIVE

description :

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

port : 0 address : 0.0.0.0 addr type : -

interval : 15 pass intvl : 30 pass count : 2

fail count: 5 recv timeout: 10

script filename : script_ver.tcl

------------------ probe results ------------------

associations ip-address port porttype probes failed passed health

------------ ---------------+-----+--------+--------+--------+--------+------

real : pippo_CS01[80]

serverfarm: S_pippo_80

1.1.1.1 80 REAL 2 2 0 FAILED


Socket state : RESET

No. Passed states : 0 No. Failed states : 1

No. Probes skipped : 0 Last status code : 30006

No. Out of Sockets : 0 No. Internal error: 0

Last disconnect err : Internal error: Script error

Last probe time : Tue Nov 17 15:07:35 2009

Last fail time : Tue Nov 17 15:07:20 2009

Last active time : Never



in debug i can see a empty string as exit message...


2009 Nov 17 15:09:05.761594 scripted_hm: (ctx:1) TCLWT (scripted_hm_run_probe_msg): Received MTS_RUN_MSG

2009 Nov 17 15:09:05.761656 scripted_hm: (ctx:1)tcl_wt_create_qnode: temp_qnode 0x81137b8 em_msg 0xb689e054

2009 Nov 17 15:09:05.761695 scripted_hm: (ctx:1) TCL_UTIL(hm_tcl_associate_script_buf) - ENTER em_msg = 0xb689e054

2009 Nov 17 15:09:05.761725 scripted_hm: (ctx:1) TCL_UTIL (hm_tcl_associate_script_buf) : Associating script-buf with script_ver.tcl em_msg = 0xb689e054

2009 Nov 17 15:09:05.761755 scripted_hm: (ctx:1) TCL_UTIL(hm_tcl_find_script_buf) - ENTER

2009 Nov 17 15:09:05.761785 scripted_hm: (ctx:1) TCL_UTIL(hm_tcl_find_script_buf) - Found script buf

2009 Nov 17 15:09:05.761814 scripted_hm: (ctx:1)TCL_UTIL(hm_tcl_associate_script_buf) - EXIT

2009 Nov 17 15:09:05.761844 scripted_hm: (ctx:1) TCLWT(tcl_wt_create_qnode): Created qnode 81137b8

2009 Nov 17 15:09:05.761454 scripted_hm: (ctx:1)hm_tcl_run: pid 24428 return_fd 13 ZÕô·h^UØ·(Jî·

2009 Nov 17 15:09:05.762007 scripted_hm: (ctx:1) TCL_UTIL(hm_tcl_set_env_vars): arg list = "GET /pls/portal30/ecare.monitoring HTTP/1.0" html 0 172.18.255.172 80 OK

2009 Nov 17 15:09:05.762041 scripted_hm: (ctx:1) TCL_UTIL(hm_tcl_get_argcount) - ENTER, argv("GET /pls/portal30/ecare.monitoring HTTP/1.0" html 0 172.18.255.172 80 OK)

2009 Nov 17 15:09:05.762090 scripted_hm: (ctx:1)hm_tcl_run: About to run the TCL interpreter

2009 Nov 17 15:09:05.762387 scripted_hm: (ctx:1)Tcl_Itasca_SocketObjCmd: g_num_socket 1

2009 Nov 17 15:09:05.763381 scripted_hm: (ctx:1)tclret 1

2009 Nov 17 15:09:05.763524 scripted_hm: (ctx:1) TCLPROBE(hm_tcl_exit_proc): File open failed

2009 Nov 17 15:09:05.765827 scripted_hm: (ctx:1)TCL-WT(tcl_wt_process_interp_return) - ENTER

2009 Nov 17 15:09:05.765870 scripted_hm: (ctx:1) TCLWT(tcl_wt_process_interp_return): received error from scripted probe!

2009 Nov 17 15:09:05.765903 scripted_hm: (ctx:1) TCLWT(tclwt_send_em_msg): ENTER

2009 Nov 17 15:09:05.765932 scripted_hm: (ctx:1) TCL-WT(tclwt_send_em_msg): exit msg = empty string

2009 Nov 17 15:09:05.764984 scripted_hm: (ctx:1) TCLWT(tclwt_send_em_msg): EXIT without Error

2009 Nov 17 15:09:05.765015 scripted_hm: (ctx:1)TCL-WT(tcl_wt_process_interp_return) - EXIT


for network trace i'm trying to obtain it.


tnx a lot


Dan

Correct Answer
Gilles Dufour Tue, 11/17/2009 - 07:28
User Badges:
  • Cisco Employee,

Dan,


you are missing one argument.

Argument number 5 is the regular expression.

arg list = "GET /pls/portal30/ecare.monitoring HTTP/1.0" html 0 172.18.255.172 80



I'm using something like this :


script ace_probe1.tcl "GET / HTTP/1.0" html 1 192.168.20.41 (.*) 80



Give it a try and let me know if it works.


Gilles.

Actions

This Discussion