cancel
Showing results for 
Search instead for 
Did you mean: 
Create Post
Level 7

Template Script Error with LINUX Device

Jump to solution

Hello,

We have a problem during a CLI Send Command Activities with a LINUX Red Hat Device connected with SSH2.

Info Log report that  login to device was successful but also an error "Client script error : Invalid procedure call or argument : 'Mid ' on line 244"

I see this script on the /Scripts folder but it is encrypted by KIWI CAT Tools.

Bellow "Info Log" and "Debug file" :

Info Log :

2010-11-04 13:52:42 3-Info 0 CatTools Service Performing activity - Run Now
2010-11-04 13:52:42 3-Info 0 CatTools Service Loading activity: Device.CLI.Send commands_2. Schd: 3
2010-11-04 13:52:42 4-Debug 0 CatTools Service Marshaller - Running script. Device: Interne01
2010-11-04 13:52:42 4-Debug 1 FWInterne01 SSH Fingerprint:
2010-11-04 13:52:43 4-Debug 1 FWInterne01 Connected to
2010-11-04 13:52:43 4-Debug 1 FWInterne01 Login LinuxRedHatBash: FWInterne01
2010-11-04 13:52:43 4-Debug 1 FWInterne01 Waiting for console prompt
2010-11-04 13:52:43 4-Debug 1 FWInterne01 Login to device was successful
2010-11-04 13:52:44 1-Error 1 FWInterne01 Client script error: Invalid procedure call or argument: 'Mid' on line: 244
2010-11-04 13:52:44 3-Info 0 CatTools Service All threads have finished. Now processing results...
2010-11-04 13:52:44 4-Debug 0 CatTools Service No report data found. Not sending report via e-mail.
2010-11-04 13:52:44 3-Info 0 CatTools Service Sending report via e-mail
2010-11-04 13:52:44 4-Debug 0 CatTools Service Send aborted because no To: address was provided
2010-11-04 13:52:44 4-Debug 0 CatTools Service Error notification e-mail has been sent to:
2010-11-04 13:52:44 3-Info 0 CatTools Service Run Now activity has completed

Debug File :

<NEWSESSION CatTools 3.5.0 04/11/2010 13:52:42>
<PROTOCOL=SSH2>
<DEVICE TYPE=Linux.RedHat.Bash>
<ACTIVITY TYPE=Device.CLI.Send commands>
<ACTIVITY SCRIPT=C:\Program Files (x86)\CatTools3\Scripts\Client.Device.CLI.Send commands.txt>
<USERS NAME FOR DEVICE=FWInterne01>
<C OK 13:52:42><R-13:52:42># <W-13:52:44>[13]<R-13:52:44>[13][10]#

Thank you in advance for your help.

Clement P

0 Kudos
1 Solution

Hi,

You could try using the device type called 'Generic.Device' and the device variations feature http://www.kiwisyslog.com/help/cattools/dev_devicevariations.htm to see if you can get your device supported (it may be easier if you are only doing simple operations on this device - i.e. not any of the reporting activities which would require data parsing, etc.).

If your device only ever has a '#' prompt regardless of whether it is in non-privileged, privileged (enable) or config mode, then you'd just need to set the Full Prompt Values to something like:

FULL_HOSTNAMEID = "fwinterne.trokers.local"
FULL_VTYPROMPT = "#"
FULL_ENABLEPROMPT = "#"
FULL_CONFIGPROMPT = "#"

This will then override the code which is currently having problems when trying to determine your device hostname programatically.

Regards,

Steve

View solution in original post

0 Kudos
5 Replies
Level 12

The script can't determine the hostname for the device. From the debug it looks like there may not be one as I'm only seeing a '#' rather than 'someHostname#'.

Can you send a PuTTY capture of login into the device so I can confirm this? Or alternatively try giving the device a 'hostname'if if this is possible.

0 Kudos

Hello,  and thanks for your reply.

Effectively, my device has no hostname before his "#" prompt. But hostname is correctly.

Bellow the PuTTY capture :

login as: root
Using keyboard-interactive authentication.
Password:
# hostname
fwinterne.trokers.local
#

This device is a PfSense platform (BSD), I use Linux RedHat template type because I think that this template use BASH.

Did you think that I need to create a new script and template ?

0 Kudos

Hi,

You could try using the device type called 'Generic.Device' and the device variations feature http://www.kiwisyslog.com/help/cattools/dev_devicevariations.htm to see if you can get your device supported (it may be easier if you are only doing simple operations on this device - i.e. not any of the reporting activities which would require data parsing, etc.).

If your device only ever has a '#' prompt regardless of whether it is in non-privileged, privileged (enable) or config mode, then you'd just need to set the Full Prompt Values to something like:

FULL_HOSTNAMEID = "fwinterne.trokers.local"
FULL_VTYPROMPT = "#"
FULL_ENABLEPROMPT = "#"
FULL_CONFIGPROMPT = "#"

This will then override the code which is currently having problems when trying to determine your device hostname programatically.

Regards,

Steve

View solution in original post

0 Kudos

Thanks, login into device works !

Have you an idea of UTFTD put option on the Cat tools TFTP server.

I use Cat tools TFTP Server on a Microsoft OS but UTFTP require that TFTP server was running by inetd...

################## Man Page of UTFTPD ##################

The remote host must have a tftpd daemon started by its inetd daemon and have an account defined that limits the access of the tftpd daemon. Use the procedure defined by the tftpd command to setup the TFTP environment and the nobody account.  

##################################################

On the device :

# utftpd 192.168.5.30 config config-router-20101109102049.xml
utftpd: must be started by inetd.
  Give --help option for usage information.
# sh: turning off NDELAY mode

Thanks in advance.

King regards,

Clement

0 Kudos

Hi Clement,

Does you device not support a 'tftp' command then?  For example (based on your command syntax above): 

   # tftp 192.168.5.30 config config-router-20101109102049.xml

(I'm presuming that 192.168.5.30 is the IP of the system where CatTools is installed - i.e. where the (CatTools) TFTP Server is running?)

Steve

0 Kudos