Sample Header Ad - 728x90

Jenkins does not use system's locales

10 votes
2 answers
21244 views
I got a interesting behavior in Jenkins.
Jenkins' shell does not use my systems locales. Jenkins runs as user jenkins on my system. ###Logged in as jenkins via SSH: locale displayed:
> LANG=en_US.UTF-8
> LANGUAGE=en_US:en
> LC_CTYPE="en_US.UTF-8"
> etc...
env shows LANG and LANGUAGE variables:
>LANG=en_US.UTF-8
>LANGUAGE=en_US:en
id shows the ID of user:
> uid=1008(jenkins) gid=...
###Entered above commands to a jenkins job shell: locale displayed:
> LANG=
> LANGUAGE=
> LC_CTYPE="POSIX"
> etc...
env does not show LANG and LANGUAGE variables
id shows the ID of user (as expected):
> uid=1008(jenkins) gid=...
###the files: /etc/profile contains:
> export LANG=en_US.UTF-8
> export LANGUAGE=en_US:en
/etc/default/locale contains:
> export LANG=en_US.UTF-8
> export LANGUAGE=en_US:en
startup script /etc/init.d/jenkins should export system's locales:
>\# load environments
>if [ -r /etc/default/locale ]; then
> . /etc/default/locale
> export LANG LANGUAGE
>elif [ -r /etc/environment ]; then
> . /etc/environment
> export LANG LANGUAGE
>fi

Of course I rebooted after modifying the locales ;)

Apache also uses the system's locales
My system is an Ubuntu 14.04 installation.
Did I miss to check something else?

Thank you for reading!
I hope somebody can help :)
Asked by whosit (341 rep)
Oct 29, 2014, 09:51 AM
Last activity: Nov 13, 2024, 03:28 PM