Setting locale for jails

RcNorth

Dabbler
Joined
Dec 9, 2014
Messages
14
I have created a jail to install flexget. When I try and run flexget --check I am getting an error "Your locale declares ascii as the filesystem encoding ....".

When I run the locale command from the jail I get the follow
LANG=
LC_CTYPE = "C"
LC_COLLATE="C"
LC_TIME="C"
LC_NUMBERIC="C"
LC_MONETARY="C"
LC_MESSAGES="C"
LC_ALL=

I have added "charset=UTF-8" and "lang=eng-CA.UTF-8" to the login.conf and logged back in. I get the same results.


My Setup:

OS: 9.3 Stable-201412090314
Motherboard: Gigabyte H97N
Processor: Itel Care i3-4160 LGA1150
RAM: 16Gb
Drives: 2-Seagate 4TB mirrored; 1 WD 4TB; 1 WB 500GB
OS installed on a 16Gb Patriot SuperSonic

Any help would be appreciated.


Thanks

Dean
 
Last edited:

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630

StarkJohan

Explorer
Joined
Mar 27, 2015
Messages
62
Did you ever manage get some workaround set up for this? I'm facing the same issue. Even though it's not really stopping me from using flexget not being able to set the locale annoys me...

Edit: Using the link above I finally managed to set the locale persistently.

Add setenv settings to your "/root/.cshrc" configuration file.

#example (not sure if both are needed or if LC_ALL does the trick)
setenv LC_ALL sv_SE.UTF-8
setenv LANG sv_SE.UTF-8

However, I can't say 100% that this also applies if you're running flexget with a crontab.
 
Last edited:

RcNorth

Dabbler
Joined
Dec 9, 2014
Messages
14
I added the following lines to the /root/.cshrc config file within the jail

setenv LC_ALL 'en_US.UTF-8'
setenv LANG 'en_US.UTF-8'
setenv MM_CHARSET 'UTF-8'
setenv TZ America/Edmonton

I am not running flexget crontab. I have it running as a daemon with the schedule section of the config.yml set to run every 6 hours.

Things are working great.
 

StarkJohan

Explorer
Joined
Mar 27, 2015
Messages
62
Thanks for clarifying. I don't think there was a daemon available when I started using flexget...
I swapped to the daemon as well just in case. It's neater to keep as much as possible of the configuration at a single place, i still launch the daemon @Reboot from cron though.
 

tobiasbp

Patron
Joined
Dec 2, 2015
Messages
238
In an iocage jail on FreeNAS 11.2-U2, I set the locale by adding setenv LANG en_US.UTF-8 to ~/.login

locale now returns:
Code:
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_ALL=
 

FlyingPersian

Patron
Joined
Jan 27, 2014
Messages
237
In an iocage jail on FreeNAS 11.2-U2, I set the locale by adding setenv LANG en_US.UTF-8 to ~/.login

locale now returns:
Code:
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_ALL=

I have the same issue with medusa. I'm running an iocage jail on FN 11.2 as well. Changed the env for both root and the user running medusa, ran "locale" and confirmed the output to be the same as you posted. I still keep getting the warning about the filesystem encoding. Any ideas?
 
Top