xinetd has wrong locale
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
xinetd (Ubuntu) |
Expired
|
Undecided
|
Unassigned |
Bug Description
I have a system which somehow had the wrong locale settings.
This leads to timestamps in log files from xinetd in the wrong date format.
Normally all our systems (>200) are set to US English and the locale settings are as below.
cat /etc/default/locale
LANG=en_US.UTF-8
LANGUAGE=en
LC_CTYPE=
LC_NUMERIC=
LC_TIME=de_DE.UTF-8
LC_COLLATE=
LC_MONETARY=
LC_MESSAGES=
LC_PAPER=
LC_NAME=de_DE.UTF-8
LC_ADDRESS=
LC_TELEPHONE=
LC_MEASUREMENT=
LC_IDENTIFICATI
They should stay like this no matter what keyboard is attached.
Somehow on the affected system the settings in /etc/default/locale got changed to this:
LANG=en_US.UTF-8
LANGUAGE=en
LC_CTYPE=
LC_NUMERIC=
LC_TIME=de_DE.UTF-8
LC_COLLATE=
LC_MONETARY=
LC_MESSAGES=
LC_PAPER=
LC_NAME=de_DE.UTF-8
LC_ADDRESS=
LC_TELEPHONE=
LC_MEASUREMENT=
LC_IDENTIFICATI
I have changed them back to the US English default and invoked locale-gen.
Entering 'locale' at the shell prompt now gives the expected results but xinetd still shows the wrong values.
I restarted xinetd and even uninstalled and reinstalled it but no success.
I guess a reboot may solve the problem but I would like to avoid this.
What makes xinetd stick to the wrong locale settings?
cat /etc/default/xinetd # gives no special settings as shown below
# Default settings for xinetd. This file is sourced by /bin/sh from
# /etc/init.d/xinetd
# enable xinetd Inetd compat mode
INETD_COMPAT=Yes
# Options to pass to xinetd
#
# -stayalive comes by default : it can be removed if xinetd is expected
# not to start when no service is configured
#
XINETD_
ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: xinetd 1:2.3.15-6
ProcVersionSign
Uname: Linux 4.4.0-134-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.18
Architecture: amd64
Date: Wed Sep 5 08:29:05 2018
SourcePackage: xinetd
UpgradeStatus: No upgrade log present (probably fresh install)
I was wondering if it would just "iniherit" the bad lang from the parent until that is respawned with the fresh settings, but that would be init which doesn't have a lang env set usually - so that should be odd to check (as you say that would be a reboot).
I wonder about your "but xinetd still shows the wrong values" - how are you checking this?
Something like the following:
# xargs --null --max-args=1 echo < /proc/$(pidof xinetd)/environ | grep LANG
LANG=en_US.UTF-8
If not what is the way you are doing it?
And what would above report for you?