Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Community Member

sampleEmailScript.pl problem ?

Hello

We use LMS 2.5 / RME 4.04 and have problems with the perl script ?sampleEmailScript.pl?. We get this error message in Analyzerdebug file:

[ on dec 06 08:06:01 CET 2006 ],INFO ,[Thread-1],STDERR: Can't locate loadable object for module Win32 in @INC (@INC contains: c:\progra~1\cscopx\lib/MSWin32-x86 c:\progra~1\cscopx\lib c:\progra~1\cscopx\site\5.00502\lib c:\progra~1\cscopx\site\lib .) at c:\progra~1\cscopx\lib/CRM.pm line 60

BEGIN failed--compilation aborted at c:\progra~1\CSCOpx\files\scripts\syslog\sampleEmailScript.pl line 32.

We use a bat file in order to run the script in ?automated actions? according to below.

c:\progra~1\cscopx\bin\perl c:\progra~1\CSCOpx\files\scripts\syslog\sampleEmailScript.pl -text_message "SyslogLarm: %2 from device: %1" -email_ids jan.lindqvist@affv.nu -subject %2 -from jan.lindqvist -smtp mail.affv.nu

The script works when we try it direcly from dos prompt

Can anyone help me?

1 ACCEPTED SOLUTION

Accepted Solutions
Cisco Employee

Re: sampleEmailScript.pl problem ?

The registry looks okay. I'm not sure why the paths are being set incorrectly. However, you can try adjusting your script to call the sampleEmailScript.pl like:

c:\progra~1\cscopx\bin\perl -IC:\progra~1\cscopx\objects\perl5\lib -IC:\progra~1\cscopx\objects\perl5\site\lib -IC:\progra~1\cscopx\objects\perl5\lib\MSWin32-x86 -IC:\progra~1\cscopx\objects\perl5\site\lib\MSWin32-x86 c:\progra~1\CSCOpx\files\scripts\syslog\sampleEmailScript.pl -text_message "SyslogLarm: %2 from device: %1" -email_ids jan.lindqvist@affv.nu -subject %2 -from jan.lindqvist -smtp mail.affv.nu

7 REPLIES
Cisco Employee

Re: sampleEmailScript.pl problem ?

These paths are all wrong. Do you really have a C:\progra~1\CSCOpx\lib\CRM.pm?

Community Member

Re: sampleEmailScript.pl problem ?

I had to copy the file crm.pm to the path in orders to get it work. How and where can I change these paths?

Cisco Employee

Re: sampleEmailScript.pl problem ?

These paths are stored in the registry at HKLM\SOFTWARE\Cisco\Resource Manager\CurrentVersion\Perl. Your path elements are missing "objects\perl5". The fact that the script works from the command line makes me think there is a permissions problem triggered when it runs as casuser. Check the registry permissions of the above key as well as directory permissions for C:\progra~1\CSCOpx\objects\perl5.

Community Member

Re: sampleEmailScript.pl problem ?

C:\progra~1\CSCOpx\objects\perl5 was already set correct but i changed permission for ?casuser? to ?full control? in the registry but unfortunately it not helped. The registry key looks like thist: [HKEY_LOCAL_MACHINE\SOFTWARE\Cisco\Resource Manager\CurrentVersion\Perl]

"lib-5.00502"="C:\\PROGRA~1\\CSCOpx\\objects\\perl5\\lib"

"sitelib-5.00502"="C:\\PROGRA~1\\CSCOpx\\objects\\perl5\\site\\lib"

Cisco Employee

Re: sampleEmailScript.pl problem ?

The registry looks okay. I'm not sure why the paths are being set incorrectly. However, you can try adjusting your script to call the sampleEmailScript.pl like:

c:\progra~1\cscopx\bin\perl -IC:\progra~1\cscopx\objects\perl5\lib -IC:\progra~1\cscopx\objects\perl5\site\lib -IC:\progra~1\cscopx\objects\perl5\lib\MSWin32-x86 -IC:\progra~1\cscopx\objects\perl5\site\lib\MSWin32-x86 c:\progra~1\CSCOpx\files\scripts\syslog\sampleEmailScript.pl -text_message "SyslogLarm: %2 from device: %1" -email_ids jan.lindqvist@affv.nu -subject %2 -from jan.lindqvist -smtp mail.affv.nu

Community Member

Re: sampleEmailScript.pl problem ?

Thank you , works fine now !

Re: sampleEmailScript.pl problem ?

Try executing the script from the NMSROOT\bin directory and see if the results are the same. I suspect you have another version of perl installed on your system somewhere. When you attempt to call for perl which you have specified in your environments variable, its using the system default.

Just taking a guess here.

-nael

240
Views
4
Helpful
7
Replies
CreatePlease to create content