12-06-2006 12:13 AM
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?
Solved! Go to Solution.
12-07-2006 02:53 PM
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
12-06-2006 10:56 AM
These paths are all wrong. Do you really have a C:\progra~1\CSCOpx\lib\CRM.pm?
12-07-2006 08:41 AM
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?
12-07-2006 09:43 AM
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.
12-07-2006 01:10 PM
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"
12-07-2006 02:53 PM
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
12-08-2006 01:15 AM
Thank you , works fine now !
12-07-2006 10:28 AM
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
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide