tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: catalina log date localized
Date Tue, 14 May 2013 15:56:28 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Cristian,

On 5/14/13 8:30 AM, cristian@nuzzosono.com wrote:
> Hi everybody, I'm running Guacamole server in my small office, I
> added fail2ban in order to ban ip-host after 3 login failed. 
> Everything runs fine till now, May. Looking at Catalina.out it
> seems that the date is in italian format and fail2ban doesn't
> recognize it. Never happened with the past months that are the same
> also in italian. My locale settings are:
> 
> LANG=it_IT.UTF-8 LANGUAGE= LC_CTYPE="en_US.UTF-8" 
> LC_NUMERIC="en_US.UTF-8" LC_TIME="en_US.UTF-8" 
> LC_COLLATE="en_US.UTF-8" LC_MONETARY="en_US.UTF-8" 
> LC_MESSAGES="en_US.UTF-8" LC_PAPER="en_US.UTF-8" 
> LC_NAME="en_US.UTF-8" LC_ADDRESS="en_US.UTF-8" 
> LC_TELEPHONE="en_US.UTF-8" LC_MEASUREMENT="en_US.UTF-8" 
> LC_IDENTIFICATION="en_US.UTF-8" LC_ALL=en_US.UTF-8
> 
> if I type date it shows:  Tue May 14 14:27:10 CEST 2013
> 
> but Catalina.out is:
> 
> mag 14, 2013 1:22:29 PM org.apache.catalina.startup.Catalina start 
> INFO: Server startup in 1895 ms mag 14, 2013 1:24:24 PM
> org.slf4j.impl.JCLLoggerAdapter info INFO: Reading user mapping
> file: /etc/guacamole/user-mapping.xml mag 14, 2013 1:24:24 PM
> org.slf4j.impl.JCLLoggerAdapter warn WARNING: Authentication
> attempt from 2.226.16.24 for user "cristian" failed. mag 14, 2013
> 1:46:53 PM org.slf4j.impl.JCLLoggerAdapter info INFO: Reading user
> mapping file: /etc/guacamole/user-mapping.xml mag 14, 2013 1:46:53
> PM org.slf4j.impl.JCLLoggerAdapter warn WARNING: Authentication
> attempt from 151.63.12.172 for user "null" failed.
> 
> I'm using Tomcat 6 on Ubuntu server 13.04 (GNU/Linux 
> 3.8.2-030802-generic i686)
> 
> Can you give me any advice so I can change the date format in
> catalina.out?

You probably shouldn't be relying on anything in catalina.out, as
that's mostly a dumping-ground for stuff going to stdout. Instead, you
should probably have a separate log file specifically for
authentication failures.

Can you check the environment for the running JVM? On Linux (and
possibly other *NIX's?), you can check the environment by looking in
/proc/[pid]/environ. You could also check to see if there is a
"user.country" and/or "user.language" system property set. I believe
the JVM will only default to the LC_* environment variables if
"user.language" is not already set. Also, setting LANG to it_IT might
be triggering this. You'll have to look at the platform-specific
documentation for your JVM to determine how the JVM picks the locale
setting.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJRkl6sAAoJEBzwKT+lPKRYS8oQAMRs3Gpdu7vohkTJF3+R9YXo
G0TkIV7alCuAKhldi5L5uigcnPvjWF+KwvGBUibXLNY0i3K/puwj44/eEkYkC/Q0
9KbnhMh8XLJRkrIAaRZmbDgbEVUR7Kv2tctDyGVP5e9WVJK30L0vogqzGKwawcW/
OVrQJ3BMp1t4oS8YObRwS1no8W5HQ4q+MVxAP6LXOf6S5t9bubYLVZrSQZ9fql1u
SmFBBYBEPim4HDXbL8+orjSHEJ84gKbInK/5z0BwtSwqxHqjPdUgwMqOuqtIhvHe
YWj83TgDrHy5CyONO9bQrGsLyYJVNFKp51dYSR3mVnS3i0HcqxQ6lxOm5oXlxpuT
3W0zZ/dDcdLqdezvKQar/ksSz5QW7W1slRbaWB1zSmb/arehuyqHInR8hFy7dczc
rHU44XW8DAZ4SkgOjgXovGaLeUcWxiI/QpXuF3SHBHfmHwAsdBIfS2BdUSH5X03V
Oor6KBFaZcYtV4f9Y4Bek4kqiLYoTxJp/RBZK+RZMKYROV2hv3081z3ELQ7OUrl5
dSNOEHs2HGnR+M66JeIMDaKDPKK+1RF163mt8jUFqj92norc6Ny4pZjy5qQxn5w0
30hamaBg2wKiXnRHIA+bZIMzp0JlFZA+eyC/UAEwIkoP/uHUJb71SGOLs6d3gE78
r8DDIOC1GzKy3Wj0krs7
=ygc9
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message