[smokeping-users] [patch] improve LOCALE error messages to help diagnose system setup issues

Tobias Oetiker tobi at oetiker.ch
Sat Aug 28 10:00:33 CEST 2010


Hi Lee,

Yesterday Lee Thompson wrote:

> Hi smokepinger's
>
> I run smokeping on many boxes and and my Gentoo/Funtoo boxes frequently run
> into localization setup issues which will bomb out Smokeping's web
> interface.  It works fine invoked from the shell.  I use the attached patch
> to help me diagnose the server setup problem.  The behavior is identical to
> current Smokeping in that it logs a message and throws a HTTP 500 error.
> The basic Smokeping localization sanity check has uncovered "insane" setups
> where the PERL %ENV environment variables are being ignored by "setlocale"
> on several of my boxes for unknown reasons.  Obviously, smokeping should
> quit, which it does...
>
> Here is what I do to get Smokeping up and running in preference order on
> linux.
>
> 1) check /etc/locale.gen and run "sudo locale-gen"
> 2) clear the LC_ALL environment variable from the environment (
> /etc/profile.env)
> 3) Set LC_NUMERIC in the mod_perl apache config
>
> <Location /cgi-perl/*.pl>
>     SetHandler perl-script
>     PerlResponseHandler ModPerl::PerlRun
>     Options -Indexes ExecCGI
>     PerlSendHeader On
>     # for smokeping
>     PerlSetEnv LC_NUMERIC C
>     Order allow,deny
>     Allow from all
> </Location>
>
> 4) Add "export LC_NUMERIC C" to the apache init script
>
>
> Recent builds of apache 2.2.15, perl 5.10.1, mod_perl 2.0.4, and libc 2.10.1
> are taking the most drastic action which makes me think there is a bad
> upstream bug in LOCALE handling.  Even setting "PerlSetEnv LC_ALL C" in the
> apache config doesn't work which indicates the perl setlocale() call isn't
> working as documented.  I'd be interested in feedback on the patch or
> pointers into what else to do to get the locale setup correctly.  I run the
> Gentoo recommended LANG="en_US.UTF-8".

thanks ... I have added the patch ...

cheers
tobi

>
> Lee Thompson
>

-- 
Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten, Switzerland
http://it.oetiker.ch tobi at oetiker.ch ++41 62 775 9902 / sb: -9900



More information about the smokeping-users mailing list