WARN: Please install an English UTF-8 locale for Chef Infra Client to use, falling back to C locale and disabling UTF-8 support

Hi,

after updating Gitlab CE (Omnibus) to 15.1.1 I get the following warning when I run “gitlab-ctl status”: WARN: Please install an English UTF-8 locale for Chef Infra Client to use, falling back to C locale and disabling UTF-8 support. “gitlab-ctl reconfigure” seems to work anyway, also otherwise I don’t see any problems in Gitlab so far. What can be the background for this message?

Regards,

Thoren.

What Linux distro are you running it on? This will help to provide the necessary commands to help generate or enable the appropriate locales. For example on Debian/Ubuntu:

dpkg-reconfigure locales

go through and enable en-US.UTF-8 or en-GB.UTF-8 or whichever one you need. I have both the US and GB ones on mine.

Oracle Linux Server. Thank you for your support!

sudo localectl
System Locale: LANG=de_DE.UTF-8
VC Keymap: de-nodeadkeys
X11 Layout: de
X11 Variant: nodeadkeys

sudo localectl list-locales
C.utf8
de_AT
de_AT.utf8
de_AT@euro
de_BE
de_BE.utf8
de_BE@euro
de_CH
de_CH.utf8
de_DE
de_DE.utf8
de_DE@euro
de_IT
de_IT.utf8
de_LI.utf8
de_LU
de_LU.utf8
de_LU@euro

Easiest would be to do this:

localectl set-locale LANG=en_US.UTF-8

then check/verify:

[root@rhel8 ~]# locale
LANG=en_GB.UTF-8
LC_CTYPE="en_GB.UTF-8"
LC_NUMERIC="en_GB.UTF-8"
LC_TIME="en_GB.UTF-8"
LC_COLLATE="en_GB.UTF-8"
LC_MONETARY="en_GB.UTF-8"
LC_MESSAGES="en_GB.UTF-8"
LC_PAPER="en_GB.UTF-8"
LC_NAME="en_GB.UTF-8"
LC_ADDRESS="en_GB.UTF-8"
LC_TELEPHONE="en_GB.UTF-8"
LC_MEASUREMENT="en_GB.UTF-8"
LC_IDENTIFICATION="en_GB.UTF-8"
LC_ALL=

mine is en_GB, but yours would show en_US after the change. If that fails, you might need to install these:

dnf install langpacks-en glibc-langpack-en

explained more here: How to Fix “Failed to set locale, defaulting to C.UTF-8” in CentOS 8

1 Like

Thanks, I will try the tips right away.

What makes me wonder is that it is actually a German system. On a second Gitlab instance I don’t get the warning, there is also de_DE.UTF-8 set, but the operating system is CentOS.

Prob due to the missing langpacks packages, even if the default is set to DE. Check if langpacks-en and glibc-langpack-en is installed, or it could even have glibc-all-langpacks installed.

In which case, you might just need to install them and not even change the locale with localeset.

1 Like

Super many thanks! The installation was enough, the error is gone, so I didn’t have to change the default. Probably it got lost during system updates that I installed in parallel with Gitlab. Have a nice weekend!

2 Likes

It could be if during install and German language was chosen and a minimal server install perhaps, that these packages just simply never were installed on the system. Or potentially if for example dnf autoremove was used, they could have been removed as orphaned packages perhaps from nothing else on the system requiring them.

Enjoy your weekend!