Locale file missing?

I have performed the upgrade to Scale 24.10. My logs started to be filled with two new error messages:

CRON[316868]- pam_env(cron:session): Unable to open env file: /etc/default/locale: No such file or directory

systemd[1]- ipa-epn.service: Failed with result ‘exit-code’.

Could you advise how to fix pls?

That is interesting. Can you tell us what you upgraded from?
Is this all that came with the error message, nothing else like an NVMe error, or some drive error that would go along with a systemd error?

I would suggest that you read this piece of information I located on the internet quite quickly.

I feel you have two ways to fix it. The first one is likely the easiest. The best way to fix the issue is likely to reinstall TrueNAS 24.10 from the ISO.

The easiest “possible” fix:

  1. Login as root (if you still have it)
  2. In the shell window enter touch /etc/environment
  3. If the system takes it without complaint, hopefully the issue is resolved.
  4. You may need to use sudo touch /etc/environment if your login account doesn’t have the correct privileges. I login as root myself.

If that fails to work, wait a while to see if anyone else has something to say.

If it were my system, I would reinstall as stated below. However my TrueNAS setup has no VMs, No Apps. It is just a NAS. This makes reinstalled a breeze. I don’t want you to try this unless it is a last resort if you do have VMs or Apps.

The better fix:

  1. Create a backup of the TrueNAS configuration file.
  2. Reinstall TrueNAS 24.10 from the ISO file.
  3. Restore the TrueNAS configuration file.

Also, in your next reply, if you wouldn’t mind providing some system information. I’m looking for quantity of RAM, all your drives, boot drive and how it is connected.

Upgraded from 24.04.2.3.

No other error messages appear.

Seems empty file creation has solved the first problem.

The second one still stays in:

systemd[1]- ipa-epn.service: Failed with result ‘exit-code’.

System: 128GB mem, boot SATA SSD, drives connected via 9300-8i.

On my TrueNAS systems, after upgrade to 24.10 I am just getting the error pam_env(cron:session): Unable to open env file: /etc/default/locale: No such file or directory

“/etc/default/locale” doesn’t exist. “/etc/environment” exists already (as an empty file), and touching it only updates the timestamp, which reverts to the earlier timestamp after reboot. I tried anyway just to rule it out, and touching that file doesn’t fix the issue I’ve reported.

Am currently on 24.10.02 and the issue is still present.

Edit: Actually I do have an ipa-epn.service issue as well…

root@gtnas01:~# systemctl status --failed
× ipa-epn.service - Execute IPA Expiring Password Notification (EPN)
     Loaded: loaded (/lib/systemd/system/ipa-epn.service; enabled; preset: enabled)
     Active: failed (Result: exit-code) since Wed 2024-11-20 16:29:49 AEDT; 26min ago
   Duration: 710ms
TriggeredBy: ● ipa-epn.timer
   Main PID: 4452 (code=exited, status=1/FAILURE)
        CPU: 666ms

Nov 20 16:29:49 gtnas01 systemd[1]: Started ipa-epn.service - Execute IPA Expiring Password Notification (EPN).
Nov 20 16:29:49 gtnas01 ipa-epn[4452]: IPA client is not configured on this system.
Nov 20 16:29:49 gtnas01 ipa-epn[4452]: The IPA-EPN command failed. See /var/log/ipaepn.log for more information
Nov 20 16:29:49 gtnas01 systemd[1]: ipa-epn.service: Main process exited, code=exited, status=1/FAILURE
Nov 20 16:29:49 gtnas01 systemd[1]: ipa-epn.service: Failed with result 'exit-code'.

I did a test install into a virtual machine with a freshly downloaded copy of TrueNAS SCALE “TrueNAS-SCALE-24.10.0.2.iso” and there’s no “/etc/default/locale” file, and it also has the failed ipa-epn.service.

Thus no one should be wasting their time with a re-install for this as it’s not an upgrade failure, as you get it all with a fresh install.

It’s up to iX Systems to sort out.

  1. IPA-EPN service
    This is the expiring password notification service. Maybe disable the service, if passwords don’t age out in TrueNAS?

2.Not sure what iX Systems should do there, but for reference my separate Debian 12.8 server system has this:

techsupport@LinuxServer01:/etc/default$ cat locale 
#  File generated by update-locale
LANG="en_AU.UTF-8"
LANGUAGE="en_AU:en"
techsupport@LinuxServer01:/etc/default$ 

And yes I’m in Australia and speak English, so maybe iX Systems have to populate that file in TrueNAS SCALE by installing and running “update-locale”, or by populating it from its own localization settings.

Did you submit a Bug for TrueNAS? Feedback :grinning: icon on upper right of TrueNAS dashboard?
Also Report A Bug on upper right top of this forum.

Thanks for the info. When I get more time tomorrow I’ll scan for existing bugs to make sure I’m not doubling up, and if there’s no mention of these two issues I’ll log them.

Edit: For the /etc/default/locale missing in TrueNas Scale, there was a bug reported on that same thing for 22.02.1 NAS-114850.

The fix was to have an empty /etc/default/locale as per the pull that was merged:

So it looks like this is a regression, and someone forgot to put it in for the new build. I will report that as a bug / regression. Should be easily fixed.

I will just add a post-init script of “touch /etc/default/locale” to stop my error messages until this gets fixed up again.

Edit2: Logged the locale file issue as Jira NAS132639

Edit 3: Logged the other issue with EPN as Jira NAS-132640