CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Intermediate:
Perl Error - Production

 



amar avula
Novice

Feb 15, 2010, 6:01 AM

Post #1 of 9 (1462 views)
Perl Error - Production Can't Post

Hello All,

Iam extremly in need of quick help. Here in production, when ever I execute any perl program through command line or called from third party tools, I get the attached error. This error is filling up my production server and causing the server to be unstable. This error is not coming in development and the error is coming for all perl scripts. Any assistance is highly appreciated. Does any faced this problem???

Argument "DEBUG" isn't numeric in numeric le (<=) at D:/Perl/site/lib/Log/Log4pe
rl/Level.pm line 220.
Argument "DEBUG" isn't numeric in numeric le (<=) at D:/Perl/site/lib/Log/Log4pe
rl/Level.pm line 220.
Argument "DEBUG" isn't numeric in numeric le (<=) at D:/Perl/site/lib/Log/Log4pe
rl/Level.pm line 220.
Argument "DEBUG" isn't numeric in numeric le (<=) at D:/Perl/site/lib/Log/Log4pe
rl/Level.pm line 220.
Argument "DEBUG" isn't numeric in numeric le (<=) at D:/Perl/site/lib/Log/Log4pe
rl/Level.pm line 220.
Argument "DEBUG" isn't numeric in numeric le (<=) at D:/Perl/site/lib/Log/Log4pe
rl/Level.pm line 220.
Argument "DEBUG" isn't numeric in numeric le (<=) at D:/Perl/site/lib/Log/Log4pe
rl/Level.pm line 220.


toolic
User

Feb 15, 2010, 7:38 AM

Post #2 of 9 (1456 views)
Re: [amar avula] Perl Error - Production [In reply to] Can't Post

I don't use Log4perl, but...

Are you sure you are using a recent version of the CPAN module?
CPAN has version 1.26 from Nov. 2009. Check your version with:


Code
perl -MLog::Log4perl -e 'print Log::Log4perl::VERSION'


Or, find who is calling the sub with that warning message using:

Code
perl -Mdiagnostics -MCarp=verbose yourscript.pl


It looks like there is a mistake in how a sub is being called.

Or, read the documentation for Log4perl to see how you can disable the DEBUG messages.


FishMonger
Veteran / Moderator

Feb 15, 2010, 7:51 AM

Post #3 of 9 (1455 views)
Re: [amar avula] Perl Error - Production [In reply to] Can't Post

Can you post the Log::Log4perl initialization portion from one of your scripts?

Are you passing DEBUG instead of $DEBUG in the initialization?

e.g., are you doing something like this:

Code
Log::Log4perl->easy_init(DEBUG);

instead of:

Code
Log::Log4perl->easy_init($DEBUG);



FishMonger
Veteran / Moderator

Feb 15, 2010, 7:54 AM

Post #4 of 9 (1454 views)
Re: [amar avula] Perl Error - Production [In reply to] Can't Post

The error message points to this sub in the module.

Code
sub isGreaterOrEqual { 
my $lval = shift;
my $rval = shift;

# in theory, we should check if the above really ARE valid levels.
# but we just use numeric comparison, since they aren't really classes.

# oh, yeah, and 'cuz level ints go from 0 .. N with 0 being highest,
# these are reversed.
return $lval <= $rval;
}



amar avula
Novice

Feb 15, 2010, 8:17 AM

Post #5 of 9 (1450 views)
Re: [FishMonger] Perl Error - Production [In reply to] Can't Post

Please find the initialization scripts from one of perl program:

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

use strict;
use warnings;
use English;
use File::Basename;


use Config::General qw(ParseConfig SaveConfig SaveConfigString);
use Log::Log4perl qw(:easy);

use File::Copy;
use Text::ParseWords;




#########################################################
#
# Initialisation
#
#########################################################

my %options=();
my $PerlDir;
my $ProjectDir;
my $SrvCfgFile = "serverconfig.cfg";
my $AppCfgFile;
my $AppCfgDir;
my $ServerCfg;
my $temp;
my $PerlWorkingDir;
my $SourceDir;
my $BackupDir;
my @FileList;
my $j = 0;
my $k = 0;


$AppCfgFile = $ARGV[0];
$AppCfgDir = $ARGV[1];
$ServerCfg = $ARGV[2];


amar avula
Novice

Feb 15, 2010, 8:18 AM

Post #6 of 9 (1449 views)
Re: [toolic] Perl Error - Production [In reply to] Can't Post

Iam getting the following message when I run your commands

D:\PowerCenter\Perlscripts\Library>perl -Mdiagnostics -MCarp=verbose BackupDelet
e.pl
Uncaught exception from user code:
The file "D:\PowerCenter\Perlscripts\default.cfg" does not exist within
ConfigPath: D:\PowerCenter\Perlscripts\! at D:/Perl/site/lib/Config/General.pm l
ine 369
Config::General::_open('Config::General=HASH(0x226b300)', 'D:\PowerCente
r\Perlscripts\default.cfg') called at D:/Perl/site/lib/Config/General.pm line 27
9
Config::General::new('Config::General', 'D:\PowerCenter\Perlscripts\defa
ult.cfg') called at D:/Perl/site/lib/Config/General.pm line 1109
Config::General::ParseConfig('D:\PowerCenter\Perlscripts\default.cfg') c
alled at BackupDelete.pl line 100
Carp::croak('The file "D:\PowerCenter\Perlscripts\default.cfg" does not
exist...') called at D:/Perl/site/lib/Config/General.pm line 369
Config::General::_open('Config::General=HASH(0x226b300)', 'D:\PowerCente
r\Perlscripts\default.cfg') called at D:/Perl/site/lib/Config/General.pm line 27
9
Config::General::new('Config::General', 'D:\PowerCenter\Perlscripts\defa
ult.cfg') called at D:/Perl/site/lib/Config/General.pm line 1109
Config::General::ParseConfig('D:\PowerCenter\Perlscripts\default.cfg') c
alled at BackupDelete.pl line 100


amar avula
Novice

Feb 17, 2010, 6:18 AM

Post #7 of 9 (1405 views)
Re: [amar avula] Perl Error - Production [In reply to] Can't Post

Any help highly appreciated..


FishMonger
Veteran / Moderator

Feb 17, 2010, 4:21 PM

Post #8 of 9 (1400 views)
Re: [amar avula] Perl Error - Production [In reply to] Can't Post

We're going to need to see more of your script. At the minimum we'll need to see upto the lines that are generating the errors. Depending on the logic we may need to see the entire script.


FishMonger
Veteran / Moderator

Feb 17, 2010, 4:36 PM

Post #9 of 9 (1399 views)
Re: [amar avula] Perl Error - Production [In reply to] Can't Post

Your opening post said that you're receiving errors on all scripts. Can you post a short script that demonstrates the problem so that we can try and duplicate the issue?

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives